Support Questions
Find answers, ask questions, and share your expertise

Unable to connect to port 4200 WebSSH using HDP 2.5

Unable to connect to port 4200 WebSSH using HDP 2.5

New Contributor

When attempting to browse to port 4200 WebSSH on HDP 2.5 Sandbox, the connection is refused. When running netstat it appears that port is listening: tcp6 0 0 :::4200 :::* LISTEN 2484/docker-proxy. We can SSH using Putty to port 22 and 2222, and can reach all other ports like 8080, 8088, 50070, etc.

2 REPLIES 2

Re: Unable to connect to port 4200 WebSSH using HDP 2.5

@Matthew Christen

Can you provide more information about your environment? Which sandbox are you using? Are you using the Docker, VMWare or VirtualBox sandbox?

For the VMWare and VirtualBox sandboxes, remember you are running a VM and a Docker container within that VM.

When I log into the VM I see the following:

ssh -p 2122 root@localhost
root@localhost's password:
Last login: Fri Dec  2 00:07:40 2016
[root@sandbox ~]# netstat -tulpn | grep 4200
tcp6       0      0 :::4200                 :::*                    LISTEN      2533/docker-proxy

When I log into the Docker container and look for 4200 this is what I see:

ssh -p 2222 root@localhost
root@localhost's password:
Last login: Fri Dec  2 00:09:26 2016 from 10.0.2.2
[root@sandbox ~]# netstat -tulpn | grep 4200
tcp        0      0 0.0.0.0:4200                0.0.0.0:*                   LISTEN      3458/shellinaboxd

Have you verified the Docker container is properly listening on port 4200? In your post, the output is from the VM itself. Have you run netstat in the Docker container?

I'm using a VirtualBox environment, so I can't check VMWare. Log into the VM, not the Docker container. Look in /root/start_scripts/start_standbox.sh. That script should be launching the Docker container using port 4200, but it doesn't hurt to check.

Here is what I see:

#!/bin/bash
echo "Waiting for docker daemon to start up:"
until /usr/bin/docker ps 2>&1| grep STATUS>/dev/null; do  sleep 1; done;  >/dev/null
/usr/bin/docker ps -a | grep sandbox
if [ $? -eq 0 ]; then
 /usr/bin/docker start sandbox
else
docker run -v hadoop:/hadoop --name sandbox --hostname "sandbox.hortonworks.com" --privileged -d \
-p 6080:6080 \
-p 9090:9090 \
-p 9000:9000 \
-p 8000:8000 \
-p 8020:8020 \
-p 2181:2181 \
-p 42111:42111 \
-p 10500:10500 \
-p 16030:16030 \
-p 8042:8042 \
-p 8040:8040 \
-p 2100:2100 \
-p 4200:4200 \
-p 4040:4040 \
-p 8050:8050 \
-p 9996:9996 \
-p 9995:9995 \
-p 8080:8080 \
-p 8088:8088 \
-p 8886:8886 \
-p 8889:8889 \
-p 8443:8443 \
-p 8744:8744 \
-p 8888:8888 \
-p 8188:8188 \
-p 8983:8983 \
-p 1000:1000 \
-p 1100:1100 \
-p 11000:11000 \
-p 10001:10001 \
-p 15000:15000 \
-p 10000:10000 \
-p 8993:8993 \
-p 1988:1988 \
-p 5007:5007 \
-p 50070:50070 \
-p 19888:19888 \
-p 16010:16010 \
-p 50111:50111 \
-p 50075:50075 \
-p 50095:50095 \
-p 18080:18080 \
-p 60000:60000 \
-p 8090:8090 \
-p 8091:8091 \
-p 8005:8005 \
-p 8086:8086 \
-p 8082:8082 \
-p 60080:60080 \
-p 8765:8765 \
-p 5011:5011 \
-p 6001:6001 \
-p 6003:6003 \
-p 6008:6008 \
-p 1220:1220 \
-p 21000:21000 \
-p 6188:6188 \
-p 2222:22 \
sandbox /usr/sbin/sshd -D
fi
#docker exec -t sandbox /etc/init.d/startup_script start
docker exec -t sandbox make --makefile /usr/lib/hue/tools/start_scripts/start_deps.mf  -B Startup -j -i
docker exec -t sandbox nohup su - hue -c '/bin/bash /usr/lib/tutorials/tutorials_app/run/run.sh' &>/dev/nul
docker exec -t sandbox touch /usr/hdp/current/oozie-server/oozie-server/work/Catalina/localhost/oozie/SESSIONS.ser
docker exec -t sandbox chown oozie:hadoop /usr/hdp/current/oozie-server/oozie-server/work/Catalina/localhost/oozie/SESSIONS.ser
docker exec -d sandbox /etc/init.d/tutorials start
docker exec -d sandbox /etc/init.d/splash
docker exec -d sandbox /etc/init.d/shellinaboxd start

Re: Unable to connect to port 4200 WebSSH using HDP 2.5

New Contributor

We're using the VMWare sandbox.

When I log into the VM I see the following:

tcp6       0      0 :::4200                 :::*                    LISTEN      2484/docker-proxy

When I log into the Docker container I see the following:

[root@sandbox ~]# netstat -tulpn | grep 4200
[root@sandbox ~]#

(netstat in the docker container does nothing)

start_sandbox.sh contents:

#!/bin/bash
echo "Waiting for docker daemon to start up:"
until /usr/bin/docker ps 2>&1| grep STATUS>/dev/null; do  sleep 1; done;  >/dev/null
/usr/bin/docker ps -a | grep sandbox
if [ $? -eq 0 ]; then
 /usr/bin/docker start sandbox
else
docker run -v hadoop:/hadoop --name sandbox --hostname "sandbox.hortonworks.com" --privileged -d \
-p 6080:6080 \
-p 9090:9090 \
-p 9000:9000 \
-p 8000:8000 \
-p 8020:8020 \
-p 2181:2181 \
-p 42111:42111 \
-p 10500:10500 \
-p 16030:16030 \
-p 8042:8042 \
-p 8040:8040 \
-p 2100:2100 \
-p 4200:4200 \
-p 4040:4040 \
-p 8050:8050 \
-p 9996:9996 \
-p 9995:9995 \
-p 8080:8080 \
-p 8088:8088 \
-p 8886:8886 \
-p 8889:8889 \
-p 8443:8443 \
-p 8744:8744 \