Created 06-29-2018 03:30 PM
Hello, everybody,
I have problems with the current Docker installation of the HDP Sandbox 2.6.5
I have run the installation script as indicated on the website, but the images cannot be started now.
Output docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 25e9513bc2cd hortonworks/sandbox-proxy:1.0 "nginx -g 'daemon of…" 43 minutes ago Exited (1) 24 minutes ago sandbox-proxy 9305f205699a hortonworks/sandbox-hdp:2.6.5 "/usr/sbin/init" 45 minutes ago Created sandbox-hdp
docker start sandbox-hdp
Error response from daemon: network-scoped alias is supported only for containers in user defined networks Error: failed to start containers: sandbox-hdp
I already tried google to fix the bug. But I'm getting nowhere. Have any of you already had this error and can give me a hint how to get the sandbox running? Many thanks !
Created 06-29-2018 04:35 PM
Created 06-29-2018 04:55 PM
@De ba , Could you please provide some more information ?
DId you run the script "sh docker-deploy-{HDPversion}.sh" as outlined here
From the snip you have pasted about, it looks like you tried running docker ps -a ( which will list all containers running and exited )
Can you try running just 'docker ps' and see if you get the same 2 containers listed ( HDP and proxy ) . In that case you are all set and the HDP sandbox is up and running. There is no need to manually start the container using 'docker start sandbox-hdp'
You need to add 'sandbox-hdp.hortonworks.com' into your hosts file and start accessing the links.
Created 06-29-2018 05:00 PM
Hi @vpaul
Thanks for your feedback.
I followed the instructions on the linked page and executed the script as described.
Output docker ps:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESI ran'docker start sandbox-hdp' because the container didn't start.
Created 06-29-2018 05:11 PM
Hi @De ba,
The containers should have automatically started when the script 'docker-deploy-hdp265.sh' was executed.
Did you see any errors on the console when the script 'sh docker-deploy-hdp265.sh' was being executed ?
If you have the screen shot of the script execution , please paste here, that would be really helpful in debugging.
By hosts files, I meant adding an entry in the /etc/hosts file to access the link sandbox-hdp.hortonworks.com.
Anyways if the container is not running, there is no use adding that entry.
Created 06-30-2018 07:29 AM
Hey @vpaul
Here is the log of the script:
+ registry=hortonworks + name=sandbox-hdp + version=2.6.5 + proxyName=sandbox-proxy + proxyVersion=1.0 + flavor=hdp + echo hdp + mkdir -p sandbox/proxy/conf.d + mkdir -p sandbox/proxy/conf.stream.d + docker pull hortonworks/sandbox-hdp:2.6.5 2a7fd016935e: Pull complete 87526fe8ce7c: Pull complete d91a044a9aaf: Pull complete bbffcb08266c: Pull complete 65c812fb262a: Pull complete 132f30914412: Pull complete 0f3e10681220: Pull complete 505f5a3365a7: Pull complete abaff3c0f761: Pull complete 7d75f267b911: Pull complete 18099674493a: Verifying Checksum 18099674493a: Download complete 18099674493a: Pull complete 26310ba15287: Pull complete 635c5bfe7fc8: Pull complete 2f80a5abf101: Verifying Checksum 2f80a5abf101: Download complete 2f80a5abf101: Pull docker pull hortonworks/sandbox-proxy:1.0 + [ hdp == hdf ] docker-deploy-hdp265.sh: 28: [: hdp: unexpected operator + [ hdp == hdp ] docker-deploy-hdp265.sh: 30: [: hdp: unexpected operator + docker images + grep hortonworks/sandbox-hdp+ awk {print $2} + version=2.6.5 + docker network create cda + docker run --privileged --name sandbox-hdp -h --network=cda --network-alias= -d hortonworks/sandbox-hdp:2.6.5 docker: Error response from daemon: network-scoped alias is supported only for containers in user defined networks. + echo Remove existing postgres run files. Please wait + sleep 2 + docker exec -t sandbox-hdp sh -c rm -rf /var/run/postgresql/*; systemctl restart postgresql; Error response from daemon: Container 2c42f119958b636479f0636876c331879babb874be9d07265e82db7d8b3c5e4d is not running + sed s/sandbox-hdp-security/sandbox-hdp/g assets/generate-proxy-deploy-script.sh + mv -f assets/generate-proxy-deploy-script.sh.new assets/generate-proxy-deploy-script.sh + chmod +x assets/generate-proxy-deploy-script.sh + assets/generate-proxy-deploy-script.sh + uname + grep MINGW + chmod +x sandbox/proxy/proxy-deploy.sh + sandbox/proxy/proxy-deploy.sh Digest: sha256:0b34fa5cb197717828d6ffe547c23ad9b1c09f3b953e570e37f6f09809fbf3ba Status: Downloaded newer image for hortonworks/sandbox-hdp:2.6.5 1.0: Pulling from hortonworks/sandbox-proxy Digest: sha256:42e4cfbcbb76af07e5d8f47a183a0d4105e65a1e7ef39fe37ab746e8b2523e9e Status: Image is up to date for hortonworks/sandbox-proxy:1.0 2c42f119958b636479f0636876c331879babb874be9d07265e82db7d8b3c5e4d Remove existing postgres run files. Please wait 36ff322f9d02be781b17940322623a5e858ea38be85f919c2d3dc9b9d633dd12
Created 07-01-2018 05:12 AM
Hi @De ba
The issue is here:
>>docker-deploy-hdp265.sh:30:[: hdp: unexpected operator<<
The posix shell that you are using does not recognize '==' for string equality and hence the 'hostname' variable is not set. This is resulting in a null string being passed to the 'network-alias' option in docker run command and hence the issue.
How are you executing the script 'docker-deploy-hdp265.sh' ?
You can try the following options as a work around and that should set the 'hostname' variable to a proper value and then docker run would execute successfully.
1. Can you try replacing '==' with '=' in the following if condition code.
# start the docker container and proxy
if [ "$flavor" = "hdf" ]; then
hostname="sandbox-hdf.hortonworks.com"
elif [ "$flavor" = "hdp" ]; then
hostname="sandbox-hdp.hortonworks.com"
fi
2. Try running the script as 'bash docker-deploy-hdp265.sh'
3. Though not recommended, manually set the variable 'hostname' as follows in the script instead of the if condition.
hostname="sandbox-hdp.hortonworks.com"
Let me know how it goes.
Thanks
docker-deploy-hdp265.sh
Created 07-02-2018 09:27 AM
Hey,
thanks for your help, changing the IF query has led to success. The Docker Container was successfully launched. I had always started the script before with sh docker-deploy-hdp265.sh.
Kind regards