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
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
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.
Did this article resolve your issue ?