当前位置:网站首页>curl (7) Failed connect to localhost8080; Connection refused
curl (7) Failed connect to localhost8080; Connection refused
2022-07-30 05:26:00 【m0_67391518】
curl: (7) Failed connect to localhost:8080; Connection refused
If you are also curl, Baidu is normal, curl (own IP) is normal, but a curl http://localhost:8080 will give you an error, then you can try the following methods!
I have searched for many methods before, saying that the problem of nignx, or the problem of the port, I have tried it for a long time to no avail.Followed by a blogger who said that you can look at the log, I opened the log and looked at it, and found the problem 
There is a logs file in the tomcat folder

Find the filename of the image above and open it with a text editor
Here tells me that /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre/bin/java/bin/java is actually installed, but there is noThe so-called /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre/bin/java/bin/java directory, but /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/
So let's check the jdk path now

Then use vi /etc/profile to modify the path configuration of jdk
Set the previous JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre/bin/java/bin/java
Change to the current JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.el7_9.x86_64/jre

Update the next file
source /etc/profile
Restart tomcat, and then curl can access successfully
/
边栏推荐
- This article will take you through js to deal with the addition, deletion, modification and inspection of tree structure data
- LeetCode Algorithm 328. 奇偶链表
- 22. Why do you need a message queue?What are the advantages of using the message queue?
- Hexagon_V65_Programmers_Reference_Manual (11)
- RadonDB MySQL on K8s 2.1.3 发布!
- 从想当亿万富翁到职场、创业、爱情、抑郁、学医学武,我的程序人生
- 行业案例|数字化经营底座助力寿险行业转型
- RadonDB MySQL Kubernetes 2.2.0 发布!
- 22-07-29 西安 分布式事务、Seata
- C语言中的基本库函数(qsort)
猜你喜欢

Divide and conquer. L2-025

Kyligence 亮相第五届南方信息大会并获评“CIO 优选数字化服务商”

(RCE) Remote Code/Command Execution Vulnerability Vulnerability Exercise

为Bitbucket 和 Sourcetree 设置SSL认证

2022鹏城杯web

MySQL基础(DDL、DML、DQL)

std::vector中保存指针时用法
![[Vitis] Code implementation of ZCU102 development board PS-side control PL-side reset](/img/f2/429e3dd157647bb614595a83843140.png)
[Vitis] Code implementation of ZCU102 development board PS-side control PL-side reset

程序员大保健指南,给自己的身心偶尔放松的机会

Unity stepping on the pit record - the use of GetComponent
随机推荐
RadonDB MySQL on K8s 2.1.4 发布!
Small program npm package--API Promise
Hexagon_V65_Programmers_Reference_Manual(12)
【LeetCode】Day107-除自身以外数组的乘积
go语言学习笔记三
Dynamically bind href url
C语言实现安全性极高的游戏存档并读档
Discourse Custom Header Links
C language implements highly secure game archives and reads files
Simulation problem (below)
VisualStudio2022 local debugging entry is particularly slow problem solving
MySQL - 函数及约束命令
Unity踩坑记录 —— GetComponent的使用
工具 | 常用 PostgreSQL 预防数据丢失方案
ms project2010项目管理软件使用技巧总结
Nuxt3 learning
Three Solutions for SaaS Multi-tenant Data Isolation
How can I make (a == 1 && a == 2 && a == 3) to be true?
BindingExpression path error: 'selectMenusList' property not found on 'object' ''ViewModel'
go language study notes 4