惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
月光博客
月光博客
人人都是产品经理
人人都是产品经理
美团技术团队
J
Java Code Geeks
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客
博客园 - 【当耐特】
GbyAI
GbyAI
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
D
Docker
Vercel News
Vercel News
小众软件
小众软件
NISL@THU
NISL@THU
Simon Willison's Weblog
Simon Willison's Weblog
雷峰网
雷峰网
Spread Privacy
Spread Privacy
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Palo Alto Networks Blog
爱范儿
爱范儿
L
LINUX DO - 热门话题
博客园_首页
I
Intezer
博客园 - Franky
Security Latest
Security Latest
Scott Helme
Scott Helme
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
Schneier on Security
O
OpenAI News
WordPress大学
WordPress大学
TaoSecurity Blog
TaoSecurity Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
G
Google Developers Blog
M
MIT News - Artificial intelligence
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
Forbes - Security
Forbes - Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News | PayPal Newsroom
量子位
博客园 - 三生石上(FineUI控件)

Html - 标签 - cywhat's blog

Jenkins添加html报告并发送到邮箱 html简单实现button加载中且置灰不可点击 Django发送邮箱验证码实现以及邮箱html模板
Jenkins端口修改之后没有生效
cywhat · 2023-04-07 · via Html - 标签 - cywhat's blog

1、问题

jenkins通过systemctl start jenkins.service启动服务,端口不是配置文件里自定义的端口

2、排查

1、系统service配置

1
2
3
4
vim /lib/systemd/system/jenkins.service

# 修改端口号
Environment="JENKINS_PORT=9898"

/img/img73.png

2、etc下的系统配置

1
2
3
4
vim /etc/sysconfig/jenkins

# 修改端口号
JENKINS_PORT="9898"

/img/img74.png

3、通过systemctl status查看启动配置文件的路径

1
systemctl status jenkins.service

/img/img75.png

1
2
3
4
5
注意需要排查上面图片中框选出来的`1`和`2`

1:系统配置文件路径,上面已经更改了没问题

2:该文件是一个重写文件,问题就在这里,需要把里面的端口号也更改为9898
1
vim /etc/systemd/system/jenkins.service.d/override.conf

/img/img76.png

3、解决

1
2
3
4
5
# 重新加载systemctl配置
systemctl daemon-reload

# 重启jenkins
systemctl restart jenkins.service

4、查看jenkins服务

1
netstat -ntlp   #有端口为9898的服务已经在运行了

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏