OpenShift 4: Router-default pods crashlooping cannot bind socket (Address already in use) for [0.0.0.0:80] or [0.0.0.0:443]
Issue
- Router-default pods in the namespace
openshift-ingressare unable to start successfully, restarting continually with crash-loop back-off alerting:
$ oc get pod -n openshift-ingress
NAME READY STATUS RESTARTS AGE
router-default-7799fd58bc-gnz56 0/1 CrashLoopBackOff 7 (2m5s ago) 24m
router-default-7799fd58bc-m7sgf 1/1 Running 0 7h3m
router-dmz-7dcfbd4b66-bkgkr 1/1 Running 0 3h38m
router-dmz-7dcfbd4b66-bv9qd 1/1 Running 0 3h38m
- Router-default pod logs include the following error messaging:
[ALERT] (17) : Binding [/var/lib/haproxy/conf/haproxy.config:63] for frontend public: cannot bind socket (Address already in use) for [0.0.0.0:80]
[ALERT] (17) : Binding [/var/lib/haproxy/conf/haproxy.config:92] for frontend public_ssl: cannot bind socket (Address already in use) for [0.0.0.0:443]
[ALERT] (17) : [/usr/sbin/haproxy.main()] Some protocols failed to start their listeners! Exiting.
Environment
- Red Hat OpenShift Container Platform (RHOCP) 4.x
- OVN-kubernetes
- Default
ingresscontrolleris deployed ashostNetworked(IP of router pods is the same as IP of the node):
oc get pod -o wide -n openshift-ingress
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
router-default-7799fd58bc-gnz56 0/1 CrashLoopBackOff 7 (5m2s ago) 27m 10.0.90.175 worker-2
router-default-7799fd58bc-m7sgf 1/1 Running 0 7h21m 10.0.90.147 worker-0
oc get node -o wide | grep worker
worker-2 Ready loadbalancer,worker 10.0.90.175
worker-0 Ready loadbalancer,worker 10.0.90.147
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.