Upgrade to Jenkins 2 failed

2,221 views
Skip to first unread message

David Aldrich

unread,
May 12, 2016, 5:48:45 AM5/12/16
to jenkins...@googlegroups.com
Hi

I have tried to upgrade our Jenkins test server from 1.656 to 2.3 by copying the 2.3 war to:

/usr/lib/jenkins/

and restarting Jenkins using:

sudo /etc/init.d/jenkins restart

Now I cannot connect to Jenkins:

"This site can't be reached
jenkinstest.<snip> refused to connect."

Any suggestions please?

Best regards

David

Daniel Beck

unread,
May 12, 2016, 8:22:42 AM5/12/16
to jenkins...@googlegroups.com

> On 12.05.2016, at 11:48, David Aldrich <David....@EMEA.NEC.COM> wrote:
>
> Any suggestions please?

Check /var/log/jenkins/jenkins.log.

My guess is that your service config file defines an AJP port, which causes startup to fail. See the 2.0 changelog.

David Aldrich

unread,
May 12, 2016, 9:08:12 AM5/12/16
to jenkins...@googlegroups.com
Hi Daniel

> My guess is that your service config file defines an AJP port, which causes
> startup to fail. See the 2.0 changelog.

Thanks, I think you are correct:

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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at Main._main(Main.java:246)
at Main.main(Main.java:91)
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:31)
at winstone.Launcher.spawnListener(Launcher.java:205)

David Aldrich

unread,
May 13, 2016, 4:16:06 AM5/13/16
to jenkins...@googlegroups.com
Hi Daniel

> My guess is that your service config file defines an AJP port, which causes
> startup to fail. See the 2.0 changelog.

Are there any hints on how to resolve this condition, i.e. where an AJP port is used in a Jenkins 1.x installation, but we want upgrade to 2.x?

The changelog doesn't help much:

"Jenkins now requires Servlet 3.1. Upgraded embedded Winstone-Jetty to Jetty 9 accordingly. This removes AJP support when using the embedded Winstone-Jetty container. (issue 23378)"

Best regards

David
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/1780206F-DF36-4288-
> 9012-AA84DE1889DF%40beckweb.net.
> For more options, visit https://groups.google.com/d/optout.
>
>
> Click
> https://www.mailcontrol.com/sr/yKJMtL9aqbDGX2PQPOmvUpnwDS3JbRsAeX8
> e1qA0Rtar1fL+uywvpeaPk!wtfopGfB6xLcT7d3aiyla!1rT5xQ== to report this
> email as spam.

Stephen Connolly

unread,
May 13, 2016, 4:54:15 AM5/13/16
to jenkins...@googlegroups.com
You'd need to deploy on a servlet container that has AJP support and supports servlet 3.1... unsure if Tomcat 8+ still support AJP but that would seem to be where you'd need to start

Daniel Beck

unread,
May 13, 2016, 5:28:51 AM5/13/16
to jenkins...@googlegroups.com

> On 13.05.2016, at 10:15, David Aldrich <David....@EMEA.NEC.COM> wrote:
>
> Are there any hints on how to resolve this condition, i.e. where an AJP port is used in a Jenkins 1.x installation, but we want upgrade to 2.x?

If you're actually using AJP, follow Stephen's advice.

However, some of the native packages enabled it by default for no real reason, and in that case it suffices to just disable/remove the option.

David Aldrich

unread,
May 13, 2016, 5:34:50 AM5/13/16
to jenkins...@googlegroups.com
> However, some of the native packages enabled it by default for no real reason,
> and in that case it suffices to just disable/remove the option.

Please tell me how I would disable/remove it.

David

Daniel Beck

unread,
May 13, 2016, 5:56:47 AM5/13/16
to jenkins...@googlegroups.com

> On 13.05.2016, at 11:34, David Aldrich <David....@EMEA.NEC.COM> wrote:
>
> Please tell me how I would disable/remove it.

Depends on how you installed Jenkins.

https://wiki.jenkins-ci.org/display/JENKINS/Native+Packages should explain where the config file is.

Stephen Connolly

unread,
May 13, 2016, 5:58:25 AM5/13/16
to jenkins...@googlegroups.com
When you upgrade if using the built in jetty the feature is removed in the newer code.

If you were using AJP then you need to switch to Tomcat as your servlet container.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Marcin Wieczorek

unread,
May 13, 2016, 6:21:37 AM5/13/16
to Jenkins Users, David....@emea.nec.com
Ran into the same problem and finally found this: https://issues.jenkins-ci.org/browse/JENKINS-33776

That solved it for me.

Marcin

Mingxing Tian

unread,
Jul 19, 2016, 5:05:39 AM7/19/16
to Jenkins Users, David....@emea.nec.com

This is an FAQ. Solution is to disable AJP. See details in jira

Quote from above link for reference


JENKINS_AJP_PORT="-1" in /etc/sysconfig/jenkins solved problem

Reply all
Reply to author
Forward
0 new messages