Prakhar Agarwal
Prakhar Agarwal

Reputation: 33

frequently crashing of pod in openshift

Getting this in log while deploying image in openshift:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.13. Set the 'ServerName' directive globally to suppress this message

(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80

(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down AH00015: Unable to open logs

Dockerfile:

FROM httpd:2.4

RUN echo "hello app" > /usr/local/apache2/htdocs/hello.html

also getting the error if i use EXPOSE 80

Upvotes: 1

Views: 1751

Answers (1)

Rick Rackow
Rick Rackow

Reputation: 1843

Ports up to 1024 are so called privileged ports this means that in order to bind to them, the user has to have root capabilities. In your case, you are trying have your service listen on port 80, which is in that privileged port range. By default openshift is not running any containers inside the Pods as root.

You will either have to adjust the user as which it runs or have it listen on a different port.

Upvotes: 3

Related Questions