当 docker 和jenkins的结合出现这么个问题的时候
Error response from daemon: Cannot restart container sdh-app-server: driver failed programming external connectivity on endpoint sdh-app-server (51a952e00c006e298bcfa4f68ae68646bec9361efee6342b681eae9638f39e8d): Error starting userland proxy: listen tcp 0.0.0.0:8121: bind: address already in use
说明 docker 不能重起应用,需要做以下步聚
1、docker ps -a
ac9235aee8bc docker.io/openjdk:latest "sh -c 'java -Dsp..." 5 months ago Exited (137) 26 hours ago sdh-app-server
2、docker rm -f ac9235aee8bc
3、docker run -dit --name sdh-app-server docker.io/openjdk:latest sh -c 'java -Dspring.config.location=/data/sdh_micro_service/sdh-app-server/1.0/application.yml -Dloader.path=/data/sdh_micro_service/libs -jar /data/sdh_micro_service/sdh-ctms-server/1.0/sdh-app-server-1.0.jar --server.port=8121 >> /data/sdh_micro_service/log/sdh-app-server-1.0.jar.log 2>&1'&
4、nohup java -Dspring.config.location=/data/sdh_micro_service/sdh-app-server/1.0/application.yml -Dloader.path=/data/sdh_micro_service/libs -jar /data/sdh_micro_service/sdh-app-server/1.0/sdh-app-server-1.0.jar --server.port=8121 >> /data/sdh_micro_service/log/sdh-app-server-1.0.jar.log 2>&1&
5、jenkins 立即构建项目
阅读(1261) | 评论(0) | 转发(0) |