首页 > 其他分享 >jenkins切换端口

jenkins切换端口

时间:2024-01-29 09:44:59浏览次数:36  
标签:10 java 14 Aug 03 端口 切换 jenkins

jenkins修改80端口后报错

一、问题现象

#jenkins修改80端口后报错

Aug 10 10:47:40 jenkins systemd[1]: Unit jenkins.service entered failed state.
Aug 10 10:47:40 jenkins systemd[1]: jenkins.service failed.
Aug 10 10:47:41 jenkins systemd[1]: jenkins.service holdoff time over, scheduling restart.
...skipping...
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
Aug 10 14:46:03 jenkins jenkins[30282]: at org.eclipse.jetty.server.Server.doStart(Server.java:397)
Aug 10 14:46:03 jenkins jenkins[30282]: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
Aug 10 14:46:03 jenkins jenkins[30282]: at winstone.Launcher.<init>(Launcher.java:200)
Aug 10 14:46:03 jenkins jenkins[30282]: Caused: java.io.IOException: Failed to start Jetty
Aug 10 14:46:03 jenkins jenkins[30282]: at winstone.Launcher.<init>(Launcher.java:204)
Aug 10 14:46:03 jenkins jenkins[30282]: at winstone.Launcher.main(Launcher.java:403)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Aug 10 14:46:03 jenkins jenkins[30282]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Aug 10 14:46:03 jenkins jenkins[30282]: at executable.Main._main(Main.java:334)
Aug 10 14:46:03 jenkins jenkins[30282]: at executable.Main.main(Main.java:116)
Aug 10 14:46:03 jenkins systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE

二、解决思路

vim /usr/lib/systemd/system/jenkins.service
#修改用户为root
 34 User=root
 35 Group=root
 
 #修改端口为80
 67 Environment="JENKINS_PORT=80"

systemctl daemon-reload
systemctl restart jenkins

#原因:
应该是权限不够,修改完80,就会报错,改成root权限就可以了


https://blog.csdn.net/qq_33982898/article/details/130933640

标签:10,java,14,Aug,03,端口,切换,jenkins
From: https://www.cnblogs.com/world-of-yuan/p/17970325

相关文章

  • Linux如何查询是哪些进程占用了端口
    Addressalreadyinuse这个提示,想必大家遇到过,怎么能快速找到问题并解决呢?下面有几种姿势可以了解一下.在对网络连接或特定于应用程序的问题进行故障排除时,首先要检查的事情之一应该是系统上实际使用了哪些端口,以及哪个应用程序正在侦听特定的端口。本文介绍了如何使用netstat......
  • jenkins2.346.3安装官方文档
    摘自:https://www.jenkins.io/zh/download/ 摘自:https://pkg.jenkins.io/debian-stable/ JenkinsDebianPackagesThisistheDebianpackagerepositoryofJenkinstoautomateinstallationandupgrade.Tousethisrepository,firstaddthekeytoyoursystem(forthe......
  • 新版本的 Jenkins 2.388的权限修改设置Jenkins为root用户启动---亲测好用OK
    最新版本的Jenkins修改/etc/sysconfig/jenkins中的JENKINS_USER=root不会再生效,需要按照以下配置进行操作 vim/usr/lib/systemd/system/jenkins.service重新加载和重启systemctldaemon-reloadsystemctlrestartjenkins 最新版本的Jenkins修改/etc/sysconfig/jenkins......
  • windows端口
    一、解决方案1、错误原因“地址localhost:1099已在使用中“,是1099程序被占用,把1099程序后台停止掉即可。2、解决方案1、快捷键win+R打开CMD运行netstat-aon|find"1099"2、运行代码,找到程序tasklist|find"5680"3、在任务管理器中找到IntelTechnologyAccessSe......
  • npm淘宝镜像切换新域名
    前言今天做项目时,前端npm,yarn,pnpm都用不了,经过一番搜索后发现,原来的淘宝镜像换新域名了网址:npmmirror镜像站npm设置淘宝镜像npmconfigsetregistryhttps://registry.npmmirror.comyarn设置淘宝镜像yarnconfigsetregistryhttps://registry.npmmirror.com......
  • CentoS中更改ssh默认端口22
    在Centos中更改ssh默认端口22为其他端口在开始配置前,先关闭防火墙systemctl stopfirewalld.service#停止systemctldisablefirewalld.service#禁止开机启动更改ssh配置文件:vi/etc/ssh/sshd_config    注意:在不熟练操作情况下保留22端口防止不能登录,第二个就......
  • Android安卓开发:设置activity切换时的动画效果(以左出右退效果为例)
    安卓开发:设置activity切换时的动画效果(以左出右退效果为例)前言:1.我借鉴了网络上的代码2.我并没有深入了解,难免出错效果:代码:1.准备效果文件在res文件夹下的anim目录中添加slide_in_right.xml、slide_in.xml、slide_out_left_exit.xml效果文件slide_in_right.xml<?xml......
  • jenkins搭建
    1.下载安装包https://mirrors.tuna.tsinghua.edu.cn/jenkins/redhat/2.安装yum-ylocalinstalljenkins-2.361.4-1.1.noarch.rpm3.修改配置vim/etc/sysconfig/jenkins#内容如下,指定Jenkins服务运行时使用rootJENKINS_USER="root"vim/lib/systemd/systemd/jenkins.serv......
  • MFC 动态图标切换
    主要是学会获取应用实例,然后是定时器的使用。▲会一直变动,4个轮流滚。标题是属于框架的。头文件:private:HICONicon[4];构造函数:CMainFrame::CMainFrame()noexcept{//加载图标//获取应用程序icon[0]=AfxGetApp()->LoadIconW(IDI_ICON1);......
  • Apipost-cli、Jenkins持续集成配置
    安装Apipost-clinpminstall-gapipost-cli运行脚本安装好Apipost-cli后,在命令行输入生成的命令,即可执行测试用例,运行完成后会展示测试进度并生成测试报告。Jenkins配置Apipostcli基于Nodejs运行需要在jenkins上配置NodeJs依赖Step1:在插件管理中安装NodeJs在全局工具中配置Nod......