Bug 1283422 - java-1.8.0-openjdk: java alternatives broken after F22->F23 upgrade [NEEDINFO]
java-1.8.0-openjdk: java alternatives broken after F22->F23 upgrade
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk (Show other bugs)
23
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-18 17:47 EST by Daniel Rindt
Modified: 2015-12-09 03:15 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-09 03:15:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
jvanek: needinfo? (drindt)


Attachments (Terms of Use)
F23 Stock SystemD Unit File (305 bytes, text/plain)
2015-11-19 10:49 EST, rmarshall
no flags Details
F23 Stock Jenkins Startup Script (6.55 KB, application/x-shellscript)
2015-11-19 10:51 EST, rmarshall
no flags Details
F23 Stock Jenkins Sysconfig (2.66 KB, text/plain)
2015-11-19 10:57 EST, rmarshall
no flags Details

  None (edit)
Description Daniel Rindt 2015-11-18 17:47:03 EST
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 10:49 EST
Created attachment 1096753 [details]
F23 Stock SystemD Unit File
Comment 2 rmarshall 2015-11-19 10:51 EST
Created attachment 1096760 [details]
F23 Stock Jenkins Startup Script
Comment 3 rmarshall 2015-11-19 10:57 EST
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 02:22:24 EST
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 08:33:21 EST
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 03:35:46 EST
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 07:31:42 EST
(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 10:44:41 EST
[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 11:00:02 EST
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 11:05:45 EST
Michal, that fixed it.
Comment 11 Michal Srb 2015-11-25 08:24:47 EST
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 08:30:13 EST
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 10:09:19 EST
(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 10:10:07 EST
Neither did I.
Comment 15 Michal Srb 2015-11-25 10:31:25 EST
(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 12:51:41 EST
Could this be the "java-1.8.0-openjdk dnf reinstall breaking alternatives" bug?
Comment 17 jiri vanek 2015-12-09 03:15:58 EST
maybe... but does not osund like it.

Note You need to log in before you can comment on or make changes to this bug.