Bug 1283422

Summary: java-1.8.0-openjdk: java alternatives broken after F22->F23 upgrade
Product: [Fedora] Fedora Reporter: Daniel Rindt <drindt>
Component: java-1.8.0-openjdkAssignee: jiri vanek <jvanek>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: ahughes, dbhole, drindt, java-sig-commits, jerboaa, jvanek, mizdebsk, msrb, omajid, rmarshall, sgehwolf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-09 08:15:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
F23 Stock SystemD Unit File
none
F23 Stock Jenkins Startup Script
none
F23 Stock Jenkins Sysconfig none

Description Daniel Rindt 2015-11-18 22:47:03 UTC
Description of problem:
Jenkins can't started on system boot.

Version-Release number of selected component (if applicable):
jenkins-1.625.1-1.fc23.noarch

How reproducible:
Start jenkins via "service jenkins start"

Steps to Reproduce:
1. Just try to start it described before.
2.
3.

Actual results:
Jenkins doesn't start and this is reported in the logs.

Expected results:
Jenkins should start

Additional info:
[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[1]: Starting Jenkins continuous build server...
Nov 18 23:20:59 localhost.localdomain jenkins[1689]: Starting Jenkins bash: -c: line 0: unexpected EOF while looking for matching `''
Nov 18 23:20:59 localhost.localdomain jenkins[1689]: bash: -c: line 1: syntax error: unexpected end of file
Nov 18 23:20:59 localhost.localdomain jenkins[1689]: [FAILED]
Nov 18 23:20:59 localhost.localdomain systemd[1]: jenkins.service: Control process exited, code=exited status=1
Nov 18 23:20:59 localhost.localdomain systemd[1]: Failed to start Jenkins continuous build server.
Nov 18 23:20:59 localhost.localdomain systemd[1]: jenkins.service: Unit entered failed state.
Nov 18 23:20:59 localhost.localdomain systemd[1]: jenkins.service: Failed with result 'exit-code'.

Comment 1 rmarshall 2015-11-19 15:49:49 UTC
Created attachment 1096753 [details]
F23 Stock SystemD Unit File

Comment 2 rmarshall 2015-11-19 15:51:21 UTC
Created attachment 1096760 [details]
F23 Stock Jenkins Startup Script

Comment 3 rmarshall 2015-11-19 15:57:27 UTC
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:
/etc/systemd/system/multi-user.target.wants/jenkins.service
/etc/sysconfig/jenkins
/usr/libexec/jenkins/jenkins

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.

Comment 4 Daniel Rindt 2015-11-20 07:22:24 UTC
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.

Comment 5 Michal Srb 2015-11-20 13:33:21 UTC
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.

Comment 6 Daniel Rindt 2015-11-21 08:35:46 UTC
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 ~]#

Comment 7 Michal Srb 2015-11-23 12:31:42 UTC
(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.

Comment 8 Daniel Rindt 2015-11-23 15:44:41 UTC
[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
java-1.8.0-openjdk-headless-1.8.0.65-3.b17.fc23.x86_64
ldapjdk-4.18-17.fc23.noarch
java-1.8.0-openjdk-devel-1.8.0.65-3.b17.fc23.x86_64
slf4j-jdk14-1.7.12-2.fc23.noarch
java-1.8.0-openjdk-1.8.0.65-3.b17.fc23.x86_64

Comment 9 Michal Srb 2015-11-23 16:00:02 UTC
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

Comment 10 Daniel Rindt 2015-11-23 16:05:45 UTC
Michal, that fixed it.

Comment 11 Michal Srb 2015-11-25 13:24:47 UTC
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.

Comment 12 jiri vanek 2015-11-25 13:30:13 UTC
Hello!

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.

Comment 13 Omair Majid 2015-11-25 15:09:19 UTC
(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.

Comment 14 Mikolaj Izdebski 2015-11-25 15:10:07 UTC
Neither did I.

Comment 15 Michal Srb 2015-11-25 15:31:25 UTC
(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.

Comment 16 Severin Gehwolf 2015-11-25 17:51:41 UTC
Could this be the "java-1.8.0-openjdk dnf reinstall breaking alternatives" bug?

Comment 17 jiri vanek 2015-12-09 08:15:58 UTC
maybe... but does not osund like it.

Comment 18 Red Hat Bugzilla 2023-09-14 03:13:19 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days