Rancher: Rancher Server is not accessible // Unable to create custom hosts

Created on 4 Jan 2017  路  1Comment  路  Source: rancher/rancher

Rancher Version:
1.3.0
Docker Version:
1.12.5
OS and where are the hosts located? (cloud, bare metal, etc):
macOS // docker-machine // rancherOS v0.7.1
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
single node // data volume
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:

  1. Add new host // Custom
  2. Copy auto-generated command // paste in terminal inside host to be registered
  3. Run command

Results:
On docker logs <container-name> it returns ERROR: http://<rancher-server-ip>/v1 is not accessible. Notice rancher server is installed at http://<rancher-server-ip>:8080.

  • The command to register new host doesn't come with port 8080.
  • Adding port manually does work but container stops. Logs report the following:
INFO: Running Agent Registration Process, CATTLE_URL=http://192.168.99.100:8080/v1
INFO: Attempting to connect to: http://192.168.99.100:8080/v1
INFO: http://192.168.99.100:8080/v1 is accessible
INFO: Inspecting host capabilities
INFO: Boot2Docker: false
INFO: Host writable: true
INFO: Token: xxxxxxxx
INFO: Running registration
Traceback (most recent call last):
  File "./register.py", line 11, in <module>
    secret_key=os.environ['CATTLE_REGISTRATION_SECRET_KEY'])
  File "/usr/local/lib/python2.7/dist-packages/cattle.py", line 45, in from_env
    return gdapi.from_env(prefix=prefix, factory=Client, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 613, in from_env
    return _from_env(prefix=prefix, factory=factory, **args)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 632, in _from_env
    return factory(**result)
  File "/usr/local/lib/python2.7/dist-packages/cattle.py", line 12, in __init__
    super(Client, self).__init__(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 197, in __init__
    self._load_schemas()
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 315, in _load_schemas
    response = self._get_response(self._url)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 264, in _get_response
    headers=self._headers)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 501, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.99.100', port=80): Max retries exceeded with url: /v1 (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fbd4717e810>: Failed to establish a new connection: [Errno 111] Connection refused',))

I tried it because upgrading rancher server from v1.2.2 to v1.3.0 screwed my host running locally. No infrastructure container could be upgraded successfully but ipsec. So I removed the host and tried creating a new one.

Expected:
New host added

Most helpful comment

Set Settings -> Host Registration URL to the appropriate address with port.

>All comments

Set Settings -> Host Registration URL to the appropriate address with port.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danipolo picture danipolo  路  3Comments

sankaet picture sankaet  路  3Comments

nagliyvred picture nagliyvred  路  3Comments

5an1ty picture 5an1ty  路  3Comments

guruvan picture guruvan  路  3Comments