gijzelaerr / discodocker

docker files for setting up disco
7 stars 3 forks source link

ssh: connect to host localhost port 22: Connection refused #2

Closed lc3t35 closed 10 years ago

lc3t35 commented 10 years ago

Trying with the last version of disco (removed tag/0.5 : discodocker works fine with current repo, except little messages -> for another issue) , the test is failing, climbing back the stack of commands, i launched discobase with bash :

# cd /disco
# bin/disco nodaemon
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:true]
Eshell V5.10.4  (abort with ^G)
(disco_8989_master@cefba1d31d29)1> 08:12:18.997 [info] Application lager started on node disco_8989_master@cefba1d31d29
08:12:19.073 [info] Application inets started on node disco_8989_master@cefba1d31d29
08:12:19.075 [info] DISCO BOOTS
08:12:19.077 [info] Disco proxy disabled
08:12:19.079 [info] DDFS master starts
08:12:19.083 [info] Event server starts
08:12:19.084 [info] Disco config starts
08:12:19.095 [info] DISCO SERVER STARTS
08:12:19.096 [info] Fair scheduler starts
08:12:19.096 [info] Scheduler uses fair policy
08:12:19.098 [info] Fair scheduler: Fair policy
08:12:19.103 [info] Config table updated
08:12:19.237 [info] Starting node "disco_8989_slave" on "localhost" ("localhost")
08:12:19.245 [info] web server (mochiweb) starts
08:12:19.246 [info] Application disco started on node disco_8989_master@cefba1d31d29
ssh: connect to host localhost port 22: Connection refused
08:12:51.251 [info] Connection timed out to "localhost"
08:13:06.253 [warning] Restarting monitor for "localhost"
08:13:06.255 [info] Starting node "disco_8989_slave" on "localhost" ("localhost")
ssh: connect to host localhost port 22: Connection refused
08:13:38.269 [info] Connection timed out to "localhost"
08:13:53.270 [warning] Restarting monitor for "localhost"
08:13:53.284 [info] Starting node "disco_8989_slave" on "localhost" ("localhost")
ssh: connect to host localhost port 22: Connection refused
...

But webserver is available on port 8989 -> then stop disco and try

# ssh localhost
ssh: connect to host localhost port 22: Connection refused
# ps -aux
no sshd !

Launching sshd and everything is back to normal.

Moving to https://github.com/phusion/baseimage-docker instead of ubuntu to have a better environnement. Read http://phusion.github.io/baseimage-docker/ ;)

Still having the problem of sshd not launching .... I suspect a problem with /etc/hosts and ::1 ipv6 .... digging .... Was able to have a job launched with interactive bash after launching /usr/sbin/sshd

gijzelaerr commented 10 years ago

I've updated the image to Ubuntu 14.04 and docker 1.5.3 and it works for me. please try again.

gijzelaerr commented 10 years ago

I'm not sure what you are trying to do or what is your issue. I have no problem sshing to the master from the test image:

λ  docker run -it --link=discomaster:discomaster --volumes-from discomaster gijzelaerr/discotest /bin/bash
root@7e5aa903c49a:/# ssh discomaster
The authenticity of host 'discomaster (172.17.0.52)' can't be established.
ECDSA key fingerprint is bb:0f:17:16:40:42:ac:b1:b3:70:15:b6:58:76:d5:ac.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'discomaster,172.17.0.52' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.16.1-tinycore64 x86_64)

 * Documentation:  https://help.ubuntu.com/

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@d2bfc61c9293:~#
lc3t35 commented 10 years ago

Ubuntu 14.04, Docker version 1.1.2, build d84a070, rebuild all with updated repo. Ssh working fine between test and master. Job launched -> same problem than #3

Working on this here : https://github.com/lc3t35/discophusion