搭建好jenkins以后,运行报jdbc问题
来源:14-5 在线报告维护小系统的搭建

慕粉1474609674
2020-09-17
本地运行可以,搭建好jenkins以后,运行就会报下面错误
"{“timestamp”:“2020-09-17T10:18:00.490+0000”,“status”:500,“error”:“Internal Server Error”,“message”:“nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.\n### The error may exist in class path resource [mapper/mysql.xml]\n### The error may involve com.test.controller.login\n### The error occurred while executing a query\n### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.”,“path”:"/v1/login"}[\r][\n]"
1回答
-
慕粉1474609674
提问者
2020-09-18
已解决,
pid=$(ps x | grep "SpringMybatisTest-1.0-SNAPSHOT.jar" | grep -v grep | awk '{print $1}')
上面脚本中少个| ,加上就好了
00
相似问题