当前位置:网站首页>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 !
边栏推荐
- SOFARegistry 源码|数据同步模块解析
- Unity C basic review 27 - delegation example (p448)
- 获取Text组件内容的宽度
- Chapter IX app project test (4) test tools
- Get the width of text component content
- Northwestern Polytechnic University attacked by overseas e-mail
- 广州期货正规吗?如果有人喊你用自己的手机登,帮忙开户,安全吗?
- LeetCode-1188. 设计有限阻塞队列
- Chapter IX app project test (the end of this chapter)
- BioVendor游离轻链(κ和λ)Elisa 试剂盒的化学性质
猜你喜欢

华曙高科冲刺科创板:拟募资6.6亿 实控人许小曙父子均为美国籍

真正的软件测试人员 =“半个产品+半个开发”?

Unity C# 基础复习26——初识委托(P447)

携程季报图解:净营收41亿 与疫情前相比已被“腰斩”

技术沟通遇到3个为什么背后的逻辑

Wechat official account - menu

MCS: multivariate random variable - discrete random variable

Trigonometric function corresponding to drawing circle on plane coordinate

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

Sofaregistry source code | data synchronization module analysis
随机推荐
两个字的名字如何变成有空格的3个字符的名字
西北工业大学遭境外电邮攻击
symfony框架安全组件(security)防火墙配置
获取Text组件内容的宽度
目前股票开户安全吗?可以直接网上开户吗
Whitelabel error page access
Informatics Olympiad all in one 1194: mobile route
BioVendor游离轻链(κ和λ)Elisa 试剂盒的化学性质
Unity C # basic review 26 - first acquaintance Commission (p447)
message from server: “Host ‘xxxxxx‘ is blocked because of many connection errors; unblock with ‘m
信息学奥赛一本通1002:输出第二个整数
华曙高科冲刺科创板:拟募资6.6亿 实控人许小曙父子均为美国籍
信息学奥赛一本通1001:Hello,World!
Create an API rapid development platform, awesome!
Jet hydrogen technology rushes to the scientific innovation board: SAIC Group is the major shareholder to raise 1.06 billion yuan
Lumiprobe reactive dye cycloalkyne dye: af488 dbco, 5 isomer
Evaluation index of high concurrency software (website, server interface)
卫龙更新招股书:年营收48亿 创始人刘卫平家族色彩浓厚
wieshark抓包mysql协议简单分析
Bash summary online log