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

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos 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的服务已经在运行了

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏