Can't add custom agent running on same node as rancher server

I am trying to register a new host on the same host that also runs the rancher server, but can’t seem to get this to work. This registers fine on other nodes not running rancher server.

Any advise on what the issue may be would be great.

The Command I am using

sudo docker run -e CATTLE_SCRIPT_DEBUG=true -e CATTLE_AGENT_IP=192.168.8.100 -e CATTLE_HOST_LABELS='type=appserver' -d --privileged -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.8.2 http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is

The Output

[[run.sh:32] hostname
[run.sh:32] CONTAINER=862af054d395
[run.sh:33] '[' http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is = run ']'
[run.sh:37] [[ http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is != \i\n\s\p\e\c\t\-\h\o\s\t ]]
[run.sh:37] [[ http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is != \-\- ]]
[run.sh:37] [[ http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is != \s\t\a\t\e ]]
[[run.sh:38] docker inspect -f '{{.Config.Image}}' 862af054d395
[run.sh:38] RUNNING_IMAGE=rancher/agent:v0.8.2
[run.sh:41] [[ -n rancher/agent:v0.8.2 ]]
[run.sh:41] [[ rancher/agent:v0.8.2 != rancher/agent:v0.8.2 ]]
[run.sh:347] '[' 1 == 0 ']'
[run.sh:352] [[ http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is =~ http.* ]]
[run.sh:353] echo
[run.sh:354] setup_cattle_url http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:326] '[' http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is = register ']'
[run.sh:332] '[' http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is = upgrade ']'
[run.sh:335] CATTLE_URL=http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:338] grep -qE '127.0.0.1|localhost'
[run.sh:338] echo http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:343] export CATTLE_URL
[run.sh:355] '[' http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is = upgrade ']'
[[run.sh:358] print_url http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[[[run.sh:244] sed -e 's!/v1/scripts.*!/v1!'
[[[run.sh:244] echo http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[[run.sh:244] local url=http://192.168.8.100:8383/v1
[[run.sh:245] echo http://192.168.8.100:8383/v1
[run.sh:358] info Running Agent Registration Process, CATTLE_URL=http://192.168.8.100:8383/v1
[run.sh:19] echo INFO: Running Agent Registration Process, CATTLE_URL=http://192.168.8.100:8383/v1
[run.sh:360] verify_docker_client_server_version
[[run.sh:120] cut -d: -f2
[[run.sh:120] grep 'Client version'
[[run.sh:120] docker version
[run.sh:120] local 'client_version= 1.6.0'
[run.sh:121] info 'Checking for Docker version >=' 1.6.0
[run.sh:19] echo INFO: 'Checking for Docker version >=' 1.6.0
[run.sh:122] grep 'Server version'
[run.sh:122] docker version
[[run.sh:126] grep 'Server version'
[[run.sh:126] docker version
[run.sh:126] info Found Server version: 1.9.1
[run.sh:19] echo INFO: Found Server version: 1.9.1
[run.sh:127] for i in version info
[run.sh:128] read LINE
[run.sh:128] docker version
[run.sh:129] info 'docker version:' Client version: 1.6.0
[run.sh:19] echo INFO: 'docker version:' Client version: 1.6.0
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' Client API version: 1.18
[run.sh:19] echo INFO: 'docker version:' Client API version: 1.18
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' Go version '(client):' go1.4.2
[run.sh:19] echo INFO: 'docker version:' Go version '(client):' go1.4.2
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' Git commit '(client):' 4749651
[run.sh:19] echo INFO: 'docker version:' Git commit '(client):' 4749651
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' OS/Arch '(client):' linux/amd64
[run.sh:19] echo INFO: 'docker version:' OS/Arch '(client):' linux/amd64
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' Server version: 1.9.1
[run.sh:19] echo INFO: 'docker version:' Server version: 1.9.1
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' Server API version: 1.21
[run.sh:19] echo INFO: 'docker version:' Server API version: 1.21
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' Go version '(server):' go1.4.2
[run.sh:19] echo INFO: 'docker version:' Go version '(server):' go1.4.2
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' Git commit '(server):' a34a1d5
[run.sh:19] echo INFO: 'docker version:' Git commit '(server):' a34a1d5
[run.sh:128] read LINE
[run.sh:129] info 'docker version:' OS/Arch '(server):' linux/amd64
[run.sh:19] echo INFO: 'docker version:' OS/Arch '(server):' linux/amd64
[run.sh:128] read LINE
[run.sh:127] for i in version info
[run.sh:128] read LINE
[run.sh:128] docker info
[run.sh:129] info 'docker info:' Containers: 7
[run.sh:19] echo INFO: 'docker info:' Containers: 7
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Images: 52
[run.sh:19] echo INFO: 'docker info:' Images: 52
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Storage Driver: devicemapper
[run.sh:19] echo INFO: 'docker info:' Storage Driver: devicemapper
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Pool Name: docker-8:1-262184-pool
[run.sh:19] echo INFO: 'docker info:' Pool Name: docker-8:1-262184-pool
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Pool Blocksize: 65.54 kB
[run.sh:19] echo INFO: 'docker info:' Pool Blocksize: 65.54 kB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Base Device Size: 107.4 GB
[run.sh:19] echo INFO: 'docker info:' Base Device Size: 107.4 GB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Backing Filesystem: ext4
[run.sh:19] echo INFO: 'docker info:' Backing Filesystem: ext4
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Data file: /dev/loop0
[run.sh:19] echo INFO: 'docker info:' Data file: /dev/loop0
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Metadata file: /dev/loop1
[run.sh:19] echo INFO: 'docker info:' Metadata file: /dev/loop1
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Data Space Used: 3.237 GB
[run.sh:19] echo INFO: 'docker info:' Data Space Used: 3.237 GB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Data Space Total: 107.4 GB
[run.sh:19] echo INFO: 'docker info:' Data Space Total: 107.4 GB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Data Space Available: 37.63 GB
[run.sh:19] echo INFO: 'docker info:' Data Space Available: 37.63 GB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Metadata Space Used: 4.526 MB
[run.sh:19] echo INFO: 'docker info:' Metadata Space Used: 4.526 MB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Metadata Space Total: 2.147 GB
[run.sh:19] echo INFO: 'docker info:' Metadata Space Total: 2.147 GB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Metadata Space Available: 2.143 GB
[run.sh:19] echo INFO: 'docker info:' Metadata Space Available: 2.143 GB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Udev Sync Supported: true
[run.sh:19] echo INFO: 'docker info:' Udev Sync Supported: true
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Deferred Removal Enabled: false
[run.sh:19] echo INFO: 'docker info:' Deferred Removal Enabled: false
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Deferred Deletion Enabled: false
[run.sh:19] echo INFO: 'docker info:' Deferred Deletion Enabled: false
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Deferred Deleted Device Count: 0
[run.sh:19] echo INFO: 'docker info:' Deferred Deleted Device Count: 0
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Data loop file: /var/lib/docker/devicemapper/devicemapper/data
[run.sh:19] echo INFO: 'docker info:' Data loop file: /var/lib/docker/devicemapper/devicemapper/data
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
[run.sh:19] echo INFO: 'docker info:' Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Library Version: 1.02.77 '(2012-10-15)'
[run.sh:19] echo INFO: 'docker info:' Library Version: 1.02.77 '(2012-10-15)'
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Execution Driver: native-0.2
[run.sh:19] echo INFO: 'docker info:' Execution Driver: native-0.2
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Kernel Version: 3.13.0-68-generic
[run.sh:19] echo INFO: 'docker info:' Kernel Version: 3.13.0-68-generic
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Operating System: Ubuntu 14.04.3 LTS
[run.sh:19] echo INFO: 'docker info:' Operating System: Ubuntu 14.04.3 LTS
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' CPUs: 1
[run.sh:19] echo INFO: 'docker info:' CPUs: 1
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Total Memory: 894 MiB
[run.sh:19] echo INFO: 'docker info:' Total Memory: 894 MiB
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Name: rancher-server
[run.sh:19] echo INFO: 'docker info:' Name: rancher-server
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' ID: KUWW:6NGO:PURV:4LVH:KIPH:VVC5:5GHE:A6WK:EL62:AIJV:MQGI:D3ZE
[run.sh:19] echo INFO: 'docker info:' ID: KUWW:6NGO:PURV:4LVH:KIPH:VVC5:5GHE:A6WK:EL62:AIJV:MQGI:D3ZE
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Http Proxy:
[run.sh:19] echo INFO: 'docker info:' Http Proxy:
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' Https Proxy:
[run.sh:19] echo INFO: 'docker info:' Https Proxy:
[run.sh:128] read LINE
[run.sh:129] info 'docker info:' No Proxy:
[run.sh:19] echo INFO: 'docker info:' No Proxy:
[run.sh:128] read LINE
WARNING: No swap limit support
[run.sh:361] '[' http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is '!=' upgrade ']'
[run.sh:362] wait_for
[[run.sh:250] print_url http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[[[run.sh:244] sed -e 's!/v1/scripts.*!/v1!'
[[[run.sh:244] echo http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[[run.sh:244] local url=http://192.168.8.100:8383/v1
[[run.sh:245] echo http://192.168.8.100:8383/v1
[run.sh:250] local url=http://192.168.8.100:8383/v1
[run.sh:251] info 'Attempting to connect to: http://192.168.8.100:8383/v1'
[run.sh:19] echo INFO: 'Attempting to connect to: http://192.168.8.100:8383/v1'
[run.sh:252] (( i=0 ))
[run.sh:252] (( i < 300 ))
[run.sh:253] curl -f -s http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:261] info 'http://192.168.8.100:8383/v1 is accessible'
[run.sh:19] echo INFO: 'http://192.168.8.100:8383/v1 is accessible'
[run.sh:262] break
[run.sh:364] setup_env http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:292] '[' http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is '!=' upgrade ']'
[[run.sh:293] ./resolve_url.py http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:293] local env=http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:294] load http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[[run.sh:167] curl -sL http://192.168.8.100:8383/v1/scripts/D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[run.sh:167] local 'content=#!/bin/sh

export CATTLE_REGISTRATION_ACCESS_KEY="registrationToken"
export CATTLE_REGISTRATION_SECRET_KEY="D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is"
export CATTLE_URL="http://192.168.8.100:8383/v1"
export DETECTED_CATTLE_AGENT_IP="172.17.0.1"'
[run.sh:169] [[ #!/bin/sh

export CATTLE_REGISTRATION_ACCESS_KEY="registrationToken"
export CATTLE_REGISTRATION_SECRET_KEY="D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is"
export CATTLE_URL="http://192.168.8.100:8383/v1"
export DETECTED_CATTLE_AGENT_IP="172.17.0.1" =~ .!/bin/sh.* ]]
[run.sh:170] eval '#!/bin/sh

export CATTLE_REGISTRATION_ACCESS_KEY="registrationToken"
export CATTLE_REGISTRATION_SECRET_KEY="D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is"
export CATTLE_URL="http://192.168.8.100:8383/v1"
export DETECTED_CATTLE_AGENT_IP="172.17.0.1"'
[[run.sh:172] export CATTLE_REGISTRATION_ACCESS_KEY=registrationToken
[[run.sh:172] CATTLE_REGISTRATION_ACCESS_KEY=registrationToken
[[run.sh:173] export CATTLE_REGISTRATION_SECRET_KEY=D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[[run.sh:173] CATTLE_REGISTRATION_SECRET_KEY=D2331A0EFD36353BF956:1450360800000:2zDSKabLQ0He5vI0DOTiN9l3Is
[[run.sh:174] export CATTLE_URL=http://192.168.8.100:8383/v1
[[run.sh:174] CATTLE_URL=http://192.168.8.100:8383/v1
[[run.sh:175] export DETECTED_CATTLE_AGENT_IP=172.17.0.1
[[run.sh:175] DETECTED_CATTLE_AGENT_IP=172.17.0.1
[run.sh:297] info Inspecting host capabilities
[run.sh:19] echo INFO: Inspecting host capabilities
[[run.sh:298] inspect_host
[[run.sh:68] docker run --rm --privileged -v /run:/run -v /var/lib:/var/lib rancher/agent:v0.8.2 inspect-host
[run.sh:298] local 'content=INFO: env TOKEN=230b72c9455fcc18d6722458d57ceefe9813b24fd2d3615d141ccdf3ff7c760c1a81eebd1c27180bb9dc24a3a41ff07a2c4ae3fb3e15b8a7c01d507bd390870f
INFO: env CATTLE_VAR_LIB_WRITABLE=true
INFO: env CATTLE_RANCHEROS=false
INFO: env CATTLE_SYSTEMD=false'
[run.sh:300] grep -v 'INFO: env'
[run.sh:300] echo 'INFO: env TOKEN=230b72c9455fcc18d6722458d57ceefe9813b24fd2d3615d141ccdf3ff7c760c1a81eebd1c27180bb9dc24a3a41ff07a2c4ae3fb3e15b8a7c01d507bd390870f
INFO: env CATTLE_VAR_LIB_WRITABLE=true
INFO: env CATTLE_RANCHEROS=false
INFO: env CATTLE_SYSTEMD=false'
[run.sh:300] true
[[run.sh:301] grep 'INFO: env'
[[run.sh:301] sed 's/INFO: env//g'
[[run.sh:301] echo 'INFO: env TOKEN=230b72c9455fcc18d6722458d57ceefe9813b24fd2d3615d141ccdf3ff7c760c1a81eebd1c27180bb9dc24a3a41ff07a2c4ae3fb3e15b8a7c01d507bd390870f
INFO: env CATTLE_VAR_LIB_WRITABLE=true
INFO: env CATTLE_RANCHEROS=false
INFO: env CATTLE_SYSTEMD=false'
[run.sh:301] eval TOKEN=230b72c9455fcc18d6722458d57ceefe9813b24fd2d3615d141ccdf3ff7c760c1a81eebd1c27180bb9dc24a3a41ff07a2c4ae3fb3e15b8a7c01d507bd390870f CATTLE_VAR_LIB_WRITABLE=true CATTLE_RANCHEROS=false CATTLE_SYSTEMD=false
[[run.sh:301] TOKEN=230b72c9455fcc18d6722458d57ceefe9813b24fd2d3615d141ccdf3ff7c760c1a81eebd1c27180bb9dc24a3a41ff07a2c4ae3fb3e15b8a7c01d507bd390870f
[[run.sh:301] CATTLE_VAR_LIB_WRITABLE=true
[[run.sh:301] CATTLE_RANCHEROS=false
[[run.sh:301] CATTLE_SYSTEMD=false
[run.sh:303] export CATTLE_SYSTEMD
[run.sh:305] info System: false
[run.sh:19] echo INFO: System: false
[run.sh:306] info Host writable: true
[run.sh:19] echo INFO: Host writable: true
[[run.sh:307] echo 230b72c9455fcc18d6722458d57ceefe9813b24fd2d3615d141ccdf3ff7c760c1a81eebd1c27180bb9dc24a3a41ff07a2c4ae3fb3e15b8a7c01d507bd390870f
[[run.sh:307] sed 's/........*/xxxxxxxx/g'
[run.sh:307] info Token: xxxxxxxx
[run.sh:19] echo INFO: Token: xxxxxxxx
[run.sh:309] [[ -z '' ]]
[run.sh:310] info Running registration
[run.sh:19] echo INFO: Running registration
[run.sh:311] register
[[run.sh:194] ./register.py 230b72c9455fcc18d6722458d57ceefe9813b24fd2d3615d141ccdf3ff7c760c1a81eebd1c27180bb9dc24a3a41ff07a2c4ae3fb3e15b8a7c01d507bd390870f
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 37, in from_env
    return gdapi.from_env(prefix=prefix, factory=Client, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 608, in from_env
    return _from_env(prefix=prefix, factory=factory, **args)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 627, 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 195, in __init__
    self._load_schemas()
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 313, in _load_schemas
    response = self._get_response(self._url)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 262, in _get_response
    headers=self._headers)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 477, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 465, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
[run.sh:194] ENV=

Are you trying to use something locally using VirtualBox? There are a couple of similar Github issues, but I haven’t had time to test it out.

I never have any issues when I’m trying to add a host on the same node as rancher server when using a host from a cloud provider, so I think it’s something to do when running locally.


Yes I am running locally with virtualbox.

Can you actually see the UI when you go to http://192.168.8.100:8383?

How did you launch Rancher server command?

Yes I can see rancher UI running on http://192.168.8.100:8383. The only issue is trying to register an agent on same rancher server node.

I launched rancher server with this command

docker run --name=rancher-server -l io.rancher.container.system=rancher-agent --restart=always -d -p 8383:8080 rancher/server

Can you try launching a custom agent on a different VM instead of using the same one as rancher server? Does that one work?

This registers fine on other nodes not running rancher server

Looks like a regression :

I previously successfully installed the agent on the same host on 2015/10/15 (in Debian 8 Jessie), using Virtualbox.

Today, I’m trying a fresh install (in Ubuntu 14 Trusty) also in Virtualbox : impossible to get the host to be detected, even with the IP in parameter as indicated in the faqs on hosts (http://docs.rancher.com/rancher/faqs/hosts/) and in the docs on custom hosts (http://docs.rancher.com/rancher/rancher-ui/infrastructure/hosts/custom/#adding-hosts-to-the-same-machine-as-rancher-server)

See also : https://github.com/rancher/rancher/issues/872 ?

I wonder if the issue could be with this line item of rancher-server.

Have you tried launching racnher-server without that label and then trying to add it as a host? Is there a reason why you have added that label onto the rancher/server command?