sunmingtao / sample-code

3 stars 4 forks source link

dl-trove-service local error: org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource #297

Closed sunmingtao closed 3 years ago

sunmingtao commented 3 years ago

Start the local server, hit any endpoint to see the error below

HTTP ERROR 500 javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
URI:    /Repository/changes/findingAidsAtomised
STATUS: 500
MESSAGE:    javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
SERVLET:    appServlet
CAUSED BY:  javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
CAUSED BY:  org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
CAUSED BY:  org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
CAUSED BY:  com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
CAUSED BY:  com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
CAUSED BY:  java.net.ConnectException: Connection refused: connect
sunmingtao commented 3 years ago

Turns out the local mysql database server is not started..However, the local dl-trove-service server can still start without the db started!.