rancher: lb-service-haproxy shows "Failed to initialize Kubernetes controller: KUBERNETES_URL is not set" in log
Rancher Version:
Rancher v1.6.5 Cattle v0.182.1 User Interface v1.6.9 Rancher CLI v0.6.2 Rancher Compose v0.12.5
Agent : rancher/agent:v1.2.5 Server: rancher/agent:stable ha-proxy :lb-service-haproxy:v0.7.6
Docker Version:
17.03.2-ce, build f5ec1e2
OS and where are the hosts located? (cloud, bare metal, etc): rancheros-v1.1.0-hvm-1 - ami-4866042b on AWS
Environment Type: Cattle
Logs:
20/09/2017 02:43:42time="2017-09-19T21:13:42Z" level=error msg="Failed to initialize Kubernetes controller: KUBERNETES_URL is not set"
20/09/2017 02:43:42time="2017-09-19T21:13:42Z" level=info msg="Starting Rancher LB service"
20/09/2017 02:43:42time="2017-09-19T21:13:42Z" level=info msg="LB controller: rancher"
20/09/2017 02:43:42time="2017-09-19T21:13:42Z" level=info msg="LB provider: haproxy"
20/09/2017 02:43:42time="2017-09-19T21:13:42Z" level=info msg="starting rancher controller"
20/09/2017 02:43:42time="2017-09-19T21:13:42Z" level=info msg="Healthcheck handler is listening on :10241"
20/09/2017 02:43:43time="2017-09-19T21:13:43Z" level=info msg=" -- starting haproxy\n * Starting haproxy haproxy\n[WARNING] 261/211342 (36) : config : 'option forwardfor' ignored for proxy 'default' as it requires HTTP mode.\n[WARNING] 261/211342 (37) : config : 'option forwardfor' ignored for proxy 'default' as it requires HTTP mode.\n ...done.\n"
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 20 (3 by maintainers)
@superseb thanks.
I’ve tried to ping some random container and they seems to work, it’s mentioned the following:
Every so often, the IP of the host will accidentally pick up the docker bridge IP instead of the actual IP. These are typically 172.17.42.1 or starting with 172.17.x.x. If this is the case, you need to re-register your host with the correct IP by explicitly setting the CATTLE_AGENT_IP environment variable in the docker run command.
When I look the hosts configuration I have the main host (the one I connect to play around) which has actually ip 172.17.X.Y, while the second host (private) have 134.158.Z.W… does this means that the main host picked up the wrong ip address?