legacy-knowledge-base
Publicado Jul. 25, 2002

The liferay service can't connect to database after upgrading service image

written-by

Gustavo Vasconcelos

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • After upgrading the liferay service image to version 4.0.4 or higher, Liferay DXP can no longer connect to the database service, showing errors when trying to connect to the database with the following "Caused by" clause below:
Caused by: java.net.UnknownHostException: database--route: Name does not resolve
	at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1277)
	at java.net.InetAddress.getAllByName(InetAddress.java:1193)
	at java.net.InetAddress.getAllByName(InetAddress.java:1127)
	at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:132)
	at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65)
	... 63 more

Environment

  • Liferay DXP (any version) on Liferay Cloud

Resolution

  • The root cause of the issue is a change on the database and liferay services, released on Liferay Cloud's Services Update 2020.33.1.
  • To fix the issue, upgrade the database service to version 4.0.3 or higher.
  • To prevent other issues from occurring in the future, please consider updating all your service images as a pack, with the versions listed in the Service Updates changelog.

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base