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

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

Linux - 标签 - cywhat's blog

Linux生成自定义名称的ssh证书 Jmeter进行分布式压测 Linux卸载RabbitMQ Linux安装RabbitMQ Pkg_resources.DistributionNotFound:The Supervisor==3.4 Jenkins添加html报告并发送到邮箱 Jenkins插件无法安装解决 Jenkins报错 Bash:newman:command Not Found Linux安装newman生成postman脚本报告
Jenkins端口修改之后没有生效
cywhat · 2023-04-07 · via Linux - 标签 - 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的服务已经在运行了

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏