OK, changing the port the container listens on from 80 to less privileged 8080 seems to fix the issue.... Just the relationship between the mounting of volumes and the port binding is not obvious...
On Sun, Mar 6, 2016 at 1:13 AM, Mohamed Lrhazi < [email protected]> wrote: > I am getting the following error when I add the volume.... the pod gets > started successfully when I remove the volume. > > oc volumes dc avesterra-api-2 --add --type=hostPath > --path=/GU/home/ml623/tmp --name=vol --mount-path=/vol --overwrite > > oc volumes dc avesterra-api-2 --remove --name=vol > > I did try : > > oc adm policy add-scc-to-user anyuid -n avesterra-server-dev -z default > > and also added: allowHostDirVolumePlugin: true > > > > localhost :: ~/PycharmProjects/avesterra-api-2 » oc status -v > > In project avesterra-server-dev on server > https://openshift-1.uis.georgetown.edu:8443 > > svc/avesterra-api-2 - 172.30.39.7 ports 22, 80 > dc/avesterra-api-2 deploys istag/avesterra-api-2:latest <- > bc/avesterra-api-2 docker build of ssh:// > [email protected]:7999/av/avesterra-api-2.git#master > #19 deployed 2 minutes ago - 3 pods > #18 deployment failed 14 minutes ago > #17 deployment failed 16 minutes ago: The deployment was cancelled as > a newer deployment was found running > exposed by route/avesterra-api-2 on pod port 80-tcp > > Errors: > * container "avesterra-api-2" in pod/avesterra-api-2-19-osnf8 is > crash-looping > > The container is starting and exiting repeatedly. This usually means > the container is unable > to start, misconfigured, or limited by security restrictions. Check > the container logs with > > oc logs -p avesterra-api-2-19-osnf8 -c avesterra-api-2 > > Current security policy prevents your containers from being run as the > root user. Some images > may fail expecting to be able to change ownership or permissions on > directories. Your admin > can grant you access to run containers that need to run as the root > user with this command: > > oadm policy add-scc-to-user anyuid -n avesterra-server-dev -z default > > > View details with 'oc describe <resource>/<name>' or list everything with > 'oc get all'. > > localhost :: ~/PycharmProjects/avesterra-api-2 » oc logs -p > avesterra-api-2-19-9w0y7 -c avesterra-api-2 > Traceback (most recent call last): > File "/app/main.py", line 353, in <module> > main() > File "/app/main.py", line 335, in main > app.listen(options.port) > File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1825, > in listen > server.listen(port, address) > File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line > 126, in listen > sockets = bind_sockets(port, address=address) > File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line > 196, in bind_sockets > sock.bind(sockaddr) > File "/usr/lib/python2.7/socket.py", line 224, in meth > return getattr(self._sock,name)(*args) > socket.error: [Errno 13] Permission denied >
_______________________________________________ users mailing list [email protected] http://lists.openshift.redhat.com/openshiftmm/listinfo/users
