{"action":"created","issue":{"url":"https://api.github.com/repos/rancherio/rancher/issues/136","labels_url":"https://api.github.com/repos/rancherio/rancher/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/rancherio/rancher/issues/136/comments","events_url":"https://api.github.com/repos/rancherio/rancher/issues/136/events","html_url":"https://github.com/rancherio/rancher/issues/136","id":59164966,"number":136,"title":"Agent says: ERROR: http://10.1.3.4:8080/v1 is not accessible (although server gave the URL, and is reachable)","user":{"login":"feliksik","id":8527652,"avatar_url":"https://avatars.githubusercontent.com/u/8527652?v=3","gravatar_id":"","url":"https://api.github.com/users/feliksik","html_url":"https://github.com/feliksik","followers_url":"https://api.github.com/users/feliksik/followers","following_url":"https://api.github.com/users/feliksik/following{/other_user}","gists_url":"https://api.github.com/users/feliksik/gists{/gist_id}","starred_url":"https://api.github.com/users/feliksik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliksik/subscriptions","organizations_url":"https://api.github.com/users/feliksik/orgs","repos_url":"https://api.github.com/users/feliksik/repos","events_url":"https://api.github.com/users/feliksik/events{/privacy}","received_events_url":"https://api.github.com/users/feliksik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-26T23:50:38Z","updated_at":"2015-02-27T05:54:59Z","closed_at":null,"body":"My agent won't connect to my server (might be related to #130)\r\n\r\n```\r\n# sudo docker run -it --privileged -v /var/run/docker.sock:/var/run/docker.sock -e CATTLE_AGENT_IP=10.1.3.7 rancher/agent http://10.1.3.4:8080/v1/scripts/3635CE52990768911608:1424991600000:U44wMQIpHVVCGYw7Kbgqh0doeg\r\nINFO: Attempting to connect to: http://10.1.3.4:8080/v1\r\nERROR: http://10.1.3.4:8080/v1 is not accessible\r\nERROR: http://10.1.3.4:8080/v1 is not accessible\r\nERROR: http://10.1.3.4:8080/v1 is not accessible\r\n```\r\n\r\nbut the server is reachable from the agent host:  \r\n```\r\n# curl -v http://10.1.3.4:8080/v1/scripts/3635CE52990768911608:1424991600000:U44wMQIpHVVCGYw7Kbgqh0doeg\r\n* Hostname was NOT found in DNS cache\r\n*   Trying 10.1.3.4...\r\n* Connected to 10.1.3.4 (10.1.3.4) port 8080 (#0)\r\n> GET /v1/scripts/3635CE52990768911608:1424991600000:U44wMQIpHVVCGYw7Kbgqh0doeg HTTP/1.1\r\n> User-Agent: curl/7.35.0\r\n> Host: 10.1.3.4:8080\r\n> Accept: */*\r\n> \r\n< HTTP/1.1 200 OK\r\n< X-API-Schemas: http://10.1.3.4:8080/v1/schemas\r\n< Vary: Accept-Encoding, User-Agent\r\n< Content-Type: text/plain\r\n< WWW-Authenticate: Basic realm=\"Enter API access key and secret key as username and password\"\r\n< Content-Length: 258\r\n* Server Jetty(8.1.11.v20130520) is not blacklisted\r\n< Server: Jetty(8.1.11.v20130520)\r\n< \r\n#!/bin/sh\r\n\r\nexport CATTLE_REGISTRATION_ACCESS_KEY=\"registrationToken\"\r\nexport CATTLE_REGISTRATION_SECRET_KEY=\"3635CE52990768911608:1424991600000:U44wMQIpHVVCGYw7Kbgqh0doeg\"\r\nexport CATTLE_URL=\"http://10.1.3.4:8080/v1\"\r\nexport DETECTED_CATTLE_AGENT_IP=\"10.1.3.7\"\r\n* Connection #0 to host 10.1.3.4 left intact\r\n```\r\n\r\n \r\nThe server logs do not say anything after \r\n```\r\n23:40:04.294 [main] INFO  ConsoleStatus - [DONE ] [17581ms] Startup Succeeded, Listening on port 8080\r\n```\r\n \r\nIs there a way to debug this? "},"comment":{"url":"https://api.github.com/repos/rancherio/rancher/issues/comments/76342519","html_url":"https://github.com/rancherio/rancher/issues/136#issuecomment-76342519","issue_url":"https://api.github.com/repos/rancherio/rancher/issues/136","id":76342519,"user":{"login":"pshouse","id":175036,"avatar_url":"https://avatars.githubusercontent.com/u/175036?v=3","gravatar_id":"","url":"https://api.github.com/users/pshouse","html_url":"https://github.com/pshouse","followers_url":"https://api.github.com/users/pshouse/followers","following_url":"https://api.github.com/users/pshouse/following{/other_user}","gists_url":"https://api.github.com/users/pshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/pshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pshouse/subscriptions","organizations_url":"https://api.github.com/users/pshouse/orgs","repos_url":"https://api.github.com/users/pshouse/repos","events_url":"https://api.github.com/users/pshouse/events{/privacy}","received_events_url":"https://api.github.com/users/pshouse/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T05:54:59Z","updated_at":"2015-02-27T05:54:59Z","body":"I had the same problem. Turns out if you configure access controls on the server, the agent fails the connectivity test in run.sh with a 401 error. Started a fresh server container with no access control and the agent started with no problems."}}