{"action":"closed","issue":{"url":"https://api.github.com/repos/drone/drone/issues/1091","labels_url":"https://api.github.com/repos/drone/drone/issues/1091/labels{/name}","comments_url":"https://api.github.com/repos/drone/drone/issues/1091/comments","events_url":"https://api.github.com/repos/drone/drone/issues/1091/events","html_url":"https://github.com/drone/drone/issues/1091","id":94197315,"number":1091,"title":"Cannot connect to services image","user":{"login":"sonots","id":2290461,"avatar_url":"https://avatars.githubusercontent.com/u/2290461?v=3","gravatar_id":"","url":"https://api.github.com/users/sonots","html_url":"https://github.com/sonots","followers_url":"https://api.github.com/users/sonots/followers","following_url":"https://api.github.com/users/sonots/following{/other_user}","gists_url":"https://api.github.com/users/sonots/gists{/gist_id}","starred_url":"https://api.github.com/users/sonots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonots/subscriptions","organizations_url":"https://api.github.com/users/sonots/orgs","repos_url":"https://api.github.com/users/sonots/repos","events_url":"https://api.github.com/users/sonots/events{/privacy}","received_events_url":"https://api.github.com/users/sonots/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-10T02:23:06Z","updated_at":"2015-07-10T15:46:01Z","closed_at":"2015-07-10T15:46:00Z","body":"Hi, I am writing .drone.yml as:\r\n\r\n```\r\nimage: \"bradrydzewski/ruby:2.0.0\"\r\nenv:\r\n  - RAILS_ENV=test\r\nscript:\r\n  - pwd\r\n  - whoami\r\n  - rbenv versions\r\n  - lsof -P | grep TCP\r\n  - ps -ef | grep socat\r\n  - mysql -uroot -h127.0.0.1 -P3306 -e 'show databases'\r\nservices:\r\n  - mysql\r\n  - redis\r\n```\r\n\r\nbut mysql connection fails. The output of drone console is as follows:\r\n\r\n```\r\n$ whoami\r\nubuntu\r\n$ rbenv versions\r\n* 2.0.0-p353 (set by RBENV_VERSION environment variable)\r\n$ lsof -P | grep TCP\r\nsocat    42 ubuntu    3u  IPv4 458517      0t0    TCP *:3306 (LISTEN)\r\nsocat    43 ubuntu    3u  IPv4 458519      0t0    TCP *:6379 (LISTEN)\r\n$ ps -ef | grep socat\r\nubuntu      42    40  0 02:36 ?        00:00:00 socat TCP-LISTEN:6379,fork TCP:192.168.5.107:6379\r\nubuntu      43    39  0 02:36 ?        00:00:00 socat TCP-LISTEN:3306,fork TCP:192.168.5.106:3306\r\n$ mysql -uroot -h127.0.0.1 -P3306 -e 'show databases'\r\n2015/07/10 02:16:39 socat[221] E connect(3, AF=2 192.168.5.106:3306, 16): No route to host\r\nERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0\r\n```\r\n\r\nCan you tell me how to troubleshoot this?\r\n\r\nOn host OS, iptables -L tell like this:\r\n\r\n```\r\n$ iptables -t nat -L -n\r\nChain PREROUTING (policy ACCEPT)\r\ntarget     prot opt source               destination\r\nDOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL\r\n\r\nChain INPUT (policy ACCEPT)\r\ntarget     prot opt source               destination\r\n\r\nChain OUTPUT (policy ACCEPT)\r\ntarget     prot opt source               destination\r\nDOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL\r\n\r\nChain POSTROUTING (policy ACCEPT)\r\ntarget     prot opt source               destination\r\nMASQUERADE  all  --  192.168.5.0/24       0.0.0.0/0\r\nMASQUERADE  tcp  --  192.168.5.106        192.168.5.106        tcp dpt:3306\r\nMASQUERADE  tcp  --  192.168.5.107        192.168.5.107        tcp dpt:6379\r\n\r\nChain DOCKER (2 references)\r\ntarget     prot opt source               destination\r\nDNAT       tcp  --  0.0.0.0/0            127.0.0.1            tcp dpt:32810 to:192.168.5.106:3306\r\nDNAT       tcp  --  0.0.0.0/0            127.0.0.1            tcp dpt:32811 to:192.168.5.107:6379\r\n```\r\n\r\n```\r\n$ ps -ef | grep docker\r\nroot     13552 14675  0 10:37 ?        00:00:00 docker-proxy -proto tcp -host-ip 127.0.0.1 -host-port 32800 -container-ip 192.168.5.106 -container-port 3306\r\nroot     13650 14675  0 10:37 ?        00:00:00 docker-proxy -proto tcp -host-ip 127.0.0.1 -host-port 32801 -container-ip 192.168.5.107 -container-port 6379\r\n```\r\nThe information of host os is as follows:\r\n\r\n```\r\n$ cat /etc/redhat-release\r\nCentOS Linux release 7.1.1503 (Core)\r\n$ uname -a\r\nLinux xxxxxx 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n$ rpm -qa | grep drone\r\ndrone-0.3.0_alpha-1435875221.x86_64\r\n$ docker --version\r\nDocker version 1.7.0, build 0baf609\r\n```\r\n\r\nIf you need some more information, please let me know. thanks"}}