I get a failing pipeline (deployment stage) because of backend pod error - Azure

Viewed 47

It is Kotlin-Spring application, deployed on the cloud.

One pod for the backend and the second for the MongoDB. Both of them are currently with status "Running" (even with this error!)

After pushing some code changes to the GitLab repo, I tried to run the pipeline but it fails in the deployment stage (after "helm upgrade").

This the pipeline GitLab logs: Pipeline logs

And this is what I find in the backend pod which has the status "Running" (using Lens):

2022-09-05 21:35:16.664  INFO 1 --- [ter.local:27017] org.mongodb.driver.cluster               : Exception in monitor thread while connecting to server nl-dev-mongodb.nl-fe.svc.cluster.local:27017

com.mongodb.MongoSocketException: nl-dev-mongodb.nl-fe.svc.cluster.local: Name or service not known
    at com.mongodb.ServerAddress.getSocketAddress(ServerAddress.java:188) ~[mongodb-driver-core-3.8.2.jar!/:na]
    at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:64) ~[mongodb-driver-core-3.8.2.jar!/:na]
    at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:62) ~[mongodb-driver-core-3.8.2.jar!/:na]
    at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:126) ~[mongodb-driver-core-3.8.2.jar!/:na]
    at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.8.2.jar!/:na]
    at java.lang.Thread.run(Thread.java:750) [na:1.8.0_322]
Caused by: java.net.UnknownHostException: nl-dev-mongodb.nl-fe.svc.cluster.local: Name or service not known
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_322]
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929) ~[na:1.8.0_322]
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324) ~[na:1.8.0_322]
    at java.net.InetAddress.getAllByName0(InetAddress.java:1277) ~[na:1.8.0_322]
    at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[na:1.8.0_322]
    at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[na:1.8.0_322]
    at java.net.InetAddress.getByName(InetAddress.java:1077) ~[na:1.8.0_322]
    at com.mongodb.ServerAddress.getSocketAddress(ServerAddress.java:186) ~[mongodb-driver-core-3.8.2.jar!/:na]
    ... 5 common frames omitted
2022-09-05T21:35:16.665025861Z

Also I get this error in the pod: not starting up correctly Starting up error

This is an extract of the "application.properties" file: application.properties file

This the Dockerfile used in the project: Dockerfile

How can fix this?

Is it because he is not finding the .jar file in the target folder (from Dockerfile)? but I didn't touch there! Is it realated to the "na" in the logs?

0 Answers
Related