Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Connection refused -- 2.6

avatar
Explorer

Following the tutorials, installed Docker, installed Sandbox, troubleshooted for hours and finally got Ambari up and working. Came back 2 weeks later to do the Atlas tutorials, and can't connect. In OSX terminal, I an starting with command ssh root@127.0.0.1 -p 8080;. I am getting a Connection refused error. Did I miss some simple step? Thanks in advance.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@L Hurley

Great to hear it worked for you 🙂 Now you ought to reward the best answer so members can promptly help other members to resolve issues instantly @HCC

Have a great weekend

View solution in original post

23 REPLIES 23

avatar
Master Mentor

@L Hurley

Can you please try the following to see if it works:

1. SSH on port 2222 to Sandbox. The default password will be "hadoop". If you face any error/exception while doing the ssh as following then please paste the output/error.

# ssh root@127.0.0.1 -p 2222

2. Please chekc if you are able to access the web terminal?

http://127.0.0.1:4200

3. Many times it happens that during the Sandbox startup some services are not started properly that causes ports not getting opened properly. So please try restarting the Sandbox image (Power off and power on) then again try the step 1 & 2 as mentioned above.

.

avatar
Explorer

It seems I have this problem solved now, but so that I learn more -- how do you safely power down the sandbox? and then to power up, I just do "docker start sandbox" and then ssh in on port 2222? I have tried so many things that I want to walk away with this clarified. So, 1) how to power down and 2) and I correct in how to power up? Thanks!

avatar
Contributor

Sometimes your docker instance may not be running.

To check if sandbox is running:

 docker ps -a

If not running, then try to start sandbox with docker command

docker start sandbox

avatar
Explorer

@Ramesh Prasad @Jay SenSharma @Sonu Sahi Thanks for your help. Looks @like my image is gone. No clue how that happened 😞 Trying to download again, but it keeps canceling. I imagine it will be problematic to try to install it now since it was installed previously? Argh.

avatar
Explorer

I added comments above. I have reinstalled the image. I think I deleted it from my downloads at some point, because I thought if it was loaded into Docker, it was loaded into Docker. Can you confirm this is true or not -- that I need to keep the tar file on my laptop? Because now that I have downloaded it again and reinstalled, I'm still getting the connection error. Also, when you say start and stop the image, do you just mean command line "docker start sandbox" and how to stop? I'm a newbie -- thanks for all your help!!

avatar
Explorer

I tried running the script again, per the Sandbox Deployment and Install guide, and it looks like the container is still not running:

Loris-MacBook-Pro:Desktop lorihurley$ docker start sandbox

sandbox

Loris-MacBook-Pro:Desktop lorihurley$ sh start_sandbox-hdp2.sh

Waiting for docker daemon to start up:

ba112ddd357esandbox-hdp "/usr/sbin/sshd -D" 2 weeks ago Exited (255) 2 weeks agosandbox-hdp

Error response from daemon: driver failed programming external connectivity on endpoint sandbox-hdp (c4f0630e5c909893ef7fee6ea8f4d8644238a9dd4a38b3da3168c8d0880f786f): Bind for 0.0.0.0:60080 failed: port is already allocated

Error: failed to start containers: sandbox-hdp

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Waiting for ambari agent to connect

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Waiting for ambari services to start

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Error response from daemon: Container ba112ddd357e3a08eb7fe253d5d8a8749c34970d25fe312635c04693d8a1147f is not running

Loris-MacBook-Pro:Desktop lorihurley$

avatar
Master Mentor

@L Hurley

From the output it looks like you are already inside the "sandbox" ssh session. As we see prompt as "[root@sandbox ~]"

[root@sandbox ~]# ssh root@127.0.0.1 -p 2222
ssh: connect to host 127.0.0.1 port 2222: Connection refused

.

So once you are already inside the Sandbox ssh session then you do not need to reconnect it to port 2222.

Is there any specific reason you want to do that?

- You can also use the Web Terminal Login to your sandnox using the following URL on your browser

http://127.0.0.1:4200 

.

sandbox login: root                                                                                                                                                   
root@sandbox.hortonworks.com's password: hadoop                                                                                                               

avatar
Explorer

When I go to the URL I get error:

This page isn’t working

127.0.0.1 didn’t send any data.

ERR_EMPTY_RESPONSE

avatar
Guru

hi @L Hurley

Are you specifying the port?

http://127.0.0.1:8080/

When you are logged in as root@sandbox, try also running: ambari-server status and ensure its running.

avatar
Explorer

Looks like it's not:

[root@sandbox ~]# ambari-server status

Using python/usr/bin/python

Ambari-server status

Ambari Server not running. Stale PID File at: /var/run/ambari-server/ambari-server.pid

[root@sandbox ~]#