Red Hat Bugzilla – Bug 1283422
java-1.8.0-openjdk: java alternatives broken after F22->F23 upgrade
Last modified: 2015-12-09 03:15:58 EST
Description of problem:
Jenkins can't started on system boot.
Version-Release number of selected component (if applicable):
Start jenkins via "service jenkins start"
Steps to Reproduce:
1. Just try to start it described before.
Jenkins doesn't start and this is reported in the logs.
Jenkins should start
[root@localhost ~]# systemctl -l status jenkins.service
● jenkins.service - Jenkins continuous build server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mi 2015-11-18 23:20:59 CET; 25min ago
Process: 1689 ExecStart=/usr/libexec/jenkins/jenkins start (code=exited, status=1/FAILURE)
Nov 18 23:20:59 localhost.localdomain systemd: Starting Jenkins continuous build server...
Nov 18 23:20:59 localhost.localdomain jenkins: Starting Jenkins bash: -c: line 0: unexpected EOF while looking for matching `''
Nov 18 23:20:59 localhost.localdomain jenkins: bash: -c: line 1: syntax error: unexpected end of file
Nov 18 23:20:59 localhost.localdomain jenkins: [FAILED]
Nov 18 23:20:59 localhost.localdomain systemd: jenkins.service: Control process exited, code=exited status=1
Nov 18 23:20:59 localhost.localdomain systemd: Failed to start Jenkins continuous build server.
Nov 18 23:20:59 localhost.localdomain systemd: jenkins.service: Unit entered failed state.
Nov 18 23:20:59 localhost.localdomain systemd: jenkins.service: Failed with result 'exit-code'.
Created attachment 1096753 [details]
F23 Stock SystemD Unit File
Created attachment 1096760 [details]
F23 Stock Jenkins Startup Script
Created attachment 1096763 [details]
F23 Stock Jenkins Sysconfig
I was working with you on this in IRC yesterday evening - I did an install via the stock package in F23 and it worked just fine so my belief that it is something specific to your local configuration was confirmed.
Diff your local configs against the attached from the F23 package.
diff <local_file> <f23_file>
The full paths to the files attached are:
If everything aligns - then systemctl daemon-reload would update the config systemd is calling to the one you verified above.
Ping me again on IRC today if the above doesn't work.
Jenkins Package Maintainers: I checked stock F23 to ensure it worked "out of the box" but one detail left out in the original report from last night is that this is an upgrade installation. Daniel started with F22 with Jenkins installed and working and then used the upgrade process to move to F23. I have not confirmed that the stock F22->F23 upgrade path works.
Daniel - please post here what you find in the diffs if that resolves your issue.
The files i have compared against the attachments via the diff command and there is nothing different. The files are exactly matching in their content to each other.
Thanks for the bug report guys. Daniel, could you please try to run "rpm -V jenkins" and "rpm -V jenkins-webapp" and paste the output (if any) here? Thanks.
Copied the plain output for you:
Last login: Fri Nov 20 08:15:45 2015 from 192.168.178.31
[root@localhost ~]# rpm -V jenkins
[root@localhost ~]# rpm -V jenkins-webapp
(In reply to Daniel Rindt from comment #6)
> Copied the plain output for you:
> Last login: Fri Nov 20 08:15:45 2015 from 192.168.178.31
> [root@localhost ~]# rpm -V jenkins
> [root@localhost ~]# rpm -V jenkins-webapp
> [root@localhost ~]#
Thanks Daniel. Could you please also try following command and paste the output here?
$ java -version
In the mean time, I will try to upgrade from F22 to F23 and see what happens.
[root@tvbox ~]# java -version
-bash: java: Command not found.
[root@tvbox ~]# which java
/usr/bin/which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
[root@tvbox ~]# rpm -qa|grep jdk
It looks like a problem with Java alternatives. You could try to fix it manually:
# alternatives --config java
- choose OpenJDK 8 from the list of available implementations
# alternatives --config javac
- pick OpenJDK 8 again
Michal, that fixed it.
I am glad it did the trick. I am reassigning this bug to openjdk as it looks like Java alternatives didn't survive F22->F23 upgrage. I wasn't able to reproduce it though.
Alternatives for javas do survive f22->f23 update. I'm wondering what the configuration of the target machine was that it got broken.
Is there possibility to get it? Otherwise I'm afraid it will go to close, insufficient data.
(In reply to Michal Srb from comment #11)
> I am reassigning this bug to openjdk as it looks
> like Java alternatives didn't survive F22->F23 upgrage.
There must be something more specific than this. I upgraded from F22 to F23 and didn't notice any breakage in alternatives.
Neither did I.
(In reply to Omair Majid from comment #13)
> (In reply to Michal Srb from comment #11)
> > I am reassigning this bug to openjdk as it looks
> > like Java alternatives didn't survive F22->F23 upgrage.
> There must be something more specific than this. I upgraded from F22 to F23
> and didn't notice any breakage in alternatives.
Like I said, I wasn't able to reproduce it either, but comment #8 suggests that java alternatives were broken after upgrade from F22 to F23. I reassigned it to openjdk because I thought you guys should know something like this happened. It seems to be an isolated incident, so feel free to close it if Daniel won't be able to give you more details.
Could this be the "java-1.8.0-openjdk dnf reinstall breaking alternatives" bug?
maybe... but does not osund like it.