Communication issues between Weave Flux and Fluxcloud
Closed this issue · 2 comments
Docteur-RS commented
Hey ! 🚀
Describe the bug
- Weave Flux cannot connect to Fluxcloud (connection refused)
- Fluxcloud has handshake issues when not finding a token inside the Connection header...
To Reproduce
- Install Weave Flux (helm operator is active) + uncomment
--connect: ws
- Create Mattermost incomming Webhook
- Install Fluxcloud using
examples/fluxcloud.yaml
- Wait for events to appear on Mattermost... Die of old age...
As the connection from Weave Flux to Fluxcloud seems buggy, there is no logs posted anywhere.
Expected behavior
Connection from Weave Flux to Fluxcloud should be working and logs should be posted to the webhook.
Logs
Logs of fluxcloud:
Using Webhook exporter
Request for:/v11/daemon
client connected!
Request for:/
upgrade:websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header
Request for:/
upgrade:websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header
Request for:/
upgrade:websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header
Request for:/
upgrade:websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header
Logs of Weave Flux:
...
caller=upstream.go:118 component=upstream err="executing websocket ws://fluxcloud/v11/daemon: dial tcp 10.233.55.12:80: connect: connection refused"
...
examples/fluxcloud.yaml
spec:
securityContext:
runAsUser: 999
containers:
- name: fluxcloud
image: justinbarrick/fluxcloud:v0.3.9
imagePullPolicy: Always
ports:
- containerPort: 3032
env:
- name: EXPORTER_TYPE
value: webhook
- name: WEBHOOK_URL
value: http://10.10.2.100:8080/hooks/cbzjhjthxbyzzqmq1bgj1i5f8o
- name: GITHUB_URL
value: http://10.10.2.100:10080/INFRA/projects.git
- name: LISTEN_ADDRESS
value: ":3032"
Additional context
- Kubernetes: 1.14.3
- Fluxcloud: justinbarrick/fluxcloud:v0.3.9
- Weave Flux: fluxcd/flux:1.15.0
oliviabarrick commented
This sounds like an issue with your cluster’s CNI.
As for the logs for requests to /, those are most likely not from Flux - e.g. a health check or similar.
alexclifford commented
FWIW, this happened me to because I deployed fluxcloud into its own namespace therefore its service hostname was fluxcloud.fluxcloud
instead of just fluxcloud
:
executing websocket ws://fluxcloud/v11/daemon: dial tcp 10.233.55.12:80: connect: connection refused
Just needed to update the connect URI to ws://fluxcloud.fluxcloud
.