Support Questions

Find answers, ask questions, and share your expertise

sandbox-proxy container crashes shortly after starting

avatar
New Contributor

Trying to set up HDP (3.0.1) on a fresh install of Ubuntu 18.04.3 on a 64bit PC.

Followed the instructions for deploying the Hortonworks Sandbox on Docker at https://www.cloudera.com/tutorials/sandbox-deployment-and-install-guide/3.html.

 

After running

 

sh docker-deploy-hdp30.sh

 

both images are successfully downloaded and can be started by

 

docker start sandbox-hdp
docker start sandbox-proxy

 

 

Unfortunately however, the sandbox-proxy container crashes after 2 seconds. I know this because submitting

 

docker ps

 

right after starting it shows that it does run for a moment.

 

 

docker logs sandbox-proxy

 

 returns this error message:

 

[emerg] 1#1: host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9
nginx: [emerg] host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9

 

 

This is essentially step 1 of the setup and deployment guide so I'm not sure what I could have done wrong. Here is output of running the deployment shell script: https://pastebin.com/FZyeqawX

Any suggestions on how to resolve this issue will be greatly appreciated.

11 REPLIES 11

avatar
Explorer

I am struggling with this issue as well?

Anyone have any ideas?

avatar
New Contributor

The deploy script is using the bash == operator to compare strings when it has to set the $hostname variable.

However, the script is executed with sh and not bash. So the comparison fails, the $hostname is not set and it results in a bugged call of the docker run command.

 

So, remove the of the two = when it compares the flavor to set $hostname variable properly. Or, you can run the script with bash instead of sh.

 

Bye!

avatar

this is still  not fixed now....

 

change the == to one =

 

make sure you mitigate all conflicting port numbers

avatar

this is fixed now

 

dont know how to remove a message?

avatar
New Contributor

For me there were a couple of issues.

 

I already had some of the ports in use, e.g. 9000, 8080, etc.  So the 'sandbox-proxy' did not start.

 

After freeing up those ports, the line which started the sandbox-hdp, failed with -

docker: Error response from daemon: Conflict. The container name "/sandbox-hdp" is already in use by container.
This is because we have named the container.   We can free that up with the following line -

 

docker rm sanbox-hdp

 

After this, both sandbox-hdp and sandbox-proxy started ok.

If you are super keen you could add something like this to the shell script, just before the docker run line

 

exists=`docker ps -a | grep $name`

if [ "$exists" != "" ]

then

  echo -n "Removing old $name"

  docker rm $name

fi

avatar
New Contributor

I am using HDP 3.0.1 (VirtualBox), what I did is:

(1) login: ssh -p 2122 root@localhost

(2) add following code in http-hdp.proxy (for NiFi)

(3) docker restart sandbox-proxy

and then same issue showed up: 

[emerg] 1#1: host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9

nginx: [emerg] host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9

 

There's only 2 containers, sandbox-proxy and sandbox-hdp-security, and there's no http-hdp.conf under /etc/nginx/conf.d

 

avatar

OK, i am on docker just ran the script, I also had some port conflicts, fixed those. but the proxy container still dies after two seconds.

 

log:

 

 
2020/05/28 12:12:24 [emerg] 1#1: host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9
nginx: [emerg] host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9
2020/05/28 12:13:49 [emerg] 1#1: host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9
nginx: [emerg] host not found in upstream "sandbox-hdp" in /etc/nginx/conf.d/http-hdp.conf:9

do I need to set this in my /etc/hosts file on my ubuntu 18.04 host ?

avatar

turned out the sandbox-hdp container was not on the cda network ...?

after adding it to the cda network (the same as the sandbox-proxy) the sandbox proxy keeps running...

still issues with it but one step further ...

avatar

the splash screen opens ok now at http://sandbox-hdp.hortonworks.com:1080/splash.html#

 

but anything else still an issue:

 

2020/05/28 12:53:33 [error] 7#7: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 172.24.0.1, server: sandbox-hdp.hortonworks.com, request: "GET / HTTP/1.1", upstream: "http://172.24.0.2:8080/", host: "sandbox-hdp.hortonworks.com:8080", referrer: "http://sandbox-hdp.hortonworks.com:1080/splash.html"
172.24.0.1 - - [28/May/2020:12:53:33 +0000] "GET / HTTP/1.1" 502 173 "http://sandbox-hdp.hortonworks.com:1080/splash.html" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0" "-"
2020/05/28 12:53:33 [error] 7#7: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 172.24.0.1, server: sandbox-hdp.hortonworks.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://172.24.0.2:8080/favicon.ico", host: "sandbox-hdp.hortonworks.com:8080"
172.24.0.1 - - [28/May/2020:12:53:33 +0000] "GET /favicon.ico HTTP/1.1" 502 173 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0" "-"