当前位置:网站首页>curl: (56) Recv failure: Connection reset by peer
curl: (56) Recv failure: Connection reset by peer
2022-06-29 15:14:00 【1 Yile】
Docker Redirection problem :curl: (56) Recv failure: Connection reset by peer

Solutions
The following considerations , Aiming at docker Deploy springboot project , I am here springboot Configuration file for application.properties Set the port to 8848

1、 Consider whether the port conflicts , For example, the port of the currently running project is 8848, However, there is an old project running before the project runs , And the port of the old project is also 8848
# View port usage
netstat -lntp | grep 8848
2、 Consider whether the project port has forgotten to be exposed , The premise is that the project uses dockerfile structure , if dockerCompose Look at the third point
■ The details are as follows : You can see that the port location is empty

dockerfile Content :

Solution 1:dockerfile Add... To the file EXPOSE Port number , And select the port mapping when creating the startup container -p Port number : Container port (expose 8848)

add EXPOSE How the port number is exposed , Only expose to other containers for use , It cannot be exposed to the host for use , namely curl localhost: Port number It's not accessible , You need to do port mapping -p Host port :dockerfile Exposed ports , Then you can access... On the host

3、 Consider whether the project has configuration files for multiple environments [application.yml or application.properties], For example, the existing development environment [application.properties], There are also configuration files for the production environment [application-prod.properties], And your goal is docker The running configuration file is for the production environment , You need to select the configuration file of the generation environment before packaging

Add the command line -U clean package The role of : Make the packaging more complete , Avoid packaged jar The package could not be downloaded completely from the remote warehouse , appear was cached in the local repository Error of , Add the command line -U clean package
4、 Consider using -p Do port mapping , Whether the port number is filled in normally during the test :

5、 Test in browser , Consider whether the security group or firewall of the server is released :

If this article is helpful to you, remember to give me a compliment , thank !
边栏推荐
- Lumiprobe reactive dye miscellaneous dye: BDP FL ceramide
- curl: (56) Recv failure: Connection reset by peer
- 中国软冰淇淋市场预测与投资前景研究报告(2022版)
- go学习(四、面向接口)
- Ink drop typesetting
- Knowledge points: what are the know-how of PCB wiring?
- What is the relationship between synchronized and multithreading
- MCS: discrete random variable - Hyper geometric distribution
- Material dynamic self illumination
- Lumiprobe reactive dye cycloalkyne dye: af488 dbco, 5 isomer
猜你喜欢

Weigao blood purification sprint to Hong Kong: annual revenue of RMB 2.9 billion, net profit decreased by 12.7%

Whitelabel error page access

Const usage

MCS: discrete random variables - geometric distribution

威高血液净化冲刺香港:年营收29亿 净利降12.7%

Unity C basic review 27 - delegation example (p448)

For example, the visual appeal of the live broadcast of NBA Finals can be seen like this?

Northwestern Polytechnic University attacked by overseas e-mail

Unity C# 基础复习28——带返回的委托(P449)

二级指针
随机推荐
宜明昂科冲刺港股:年内亏损7.3亿 礼来与阳光人寿是股东
Weigao blood purification sprint to Hong Kong: annual revenue of RMB 2.9 billion, net profit decreased by 12.7%
BioVendor遊離輕鏈(κ和λ)Elisa 試劑盒的化學性質
Lumiprobe 点击化学丨非荧光叠氮化物:叠氮化物-PEG3-OH
const用法精讲
捷氢科技冲刺科创板:拟募资10.6亿 上汽集团是大股东
文本预处理库spaCy的基本使用(快速入门)
MCS:离散随机变量——Poisson分布
ROS notes (10) - Launch file startup
Unity C# 基础复习28——带返回的委托(P449)
Slow bear market, bit Store provides stable stacking products to help you cross the bull and bear
MCS:多元随机变量——离散随机变量
Indice d'évaluation du logiciel hautement simultané (site Web, interface côté serveur)
又拍云 Redis 的改进之路
材质 动态自发光
MCS:多元随机变量——多项式分布
Ink drop typesetting
Trigonometric function corresponding to drawing circle on plane coordinate
Huashu high tech rushes to the scientific innovation board: the actual controller xuxiaoshu and his son, who plan to raise 660million yuan, are both American nationals
Unity C# 基础复习26——初识委托(P447)