Jenkins升级报错:AJP support is removed in Winstone 3.0 due to Jetty 9 not supporting AJP 解决方法
升级Jenkins,替换完/usr/lib/jenkins目录下jenkins.war 包后,启动 Jenkins 日志/var/log/jenkins/jenkins.log 报错如下:
SEVERE: Container startup failed
java.io.IOException: Failed to start a listener: winstone.Ajp13ConnectorFactory
at winstone.Launcher.spawnListener(Launcher.java:207)
at winstone.Launcher.<init>(Launcher.java:148)
at winstone.Launcher.main(Launcher.java:352)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at Main._main(Main.java:293)
at Main.main(Main.java:132)
Caused by: java.lang.UnsupportedOperationException: AJP support is removed in Winstone 3.0 due to Jetty 9 not supporting AJP. For reverse proxying, please use HTTP instead of AJP.
at winstone.Ajp13ConnectorFactory.start(Ajp13ConnectorFactory.java:32)
at winstone.Launcher.spawnListener(Launcher.java:205)
... 8 more
解决方法:
修改文件 /etc/sysconfig/jenkins:
将 “JENKINS_AJP_PORT” 修改成: JENKINS_AJP_PORT="-1"
重启 Jenkins问题解决了。