openshift-labs / learn-katacoda

The OpenShift learning portal, powered by Katacoda
https://learn.openshift.com
159 stars 266 forks source link

Linux Container Internals 2.0 - Lab 5: Container Orchestration example either pods do not connect or start correctly #1043

Open vingong opened 3 years ago

vingong commented 3 years ago

Wordpress times out when trying to connect to mysql .

MySQL Connection Error: (2002) Connection timed out PHP Warning: mysqli::__construct(): (HY000/2002): Connection timed out in Standard input code on line 10

The good bad pod never initializes and there are no logs to share .

sking226 commented 3 years ago

I have the same error. See logs below:

$ oc logs $(oc get pods | grep wordpress- | awk '{print $1}') warning: both WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP found Connecting to WORDPRESS_DB_HOST (mysql) instead of the linked mysql container PHP Notice: Undefined offset: 1 in Standard input code on line 6 PHP Warning: mysqli::__construct(): (HY000/2002): Connection timed out in Standard input code on line 10

MySQL Connection Error: (2002) Connection timed out

/////////////

The above issue is impacting the rest of Lab 5: Container Orchestration.

If the Openshift/katacoda team can take a look and resolve the issue, would be very appreciated. The labs are very helpful to learn container/K8 (Openshift).

Many thanks