Bug 918199 - It is not possible to run EAP with JSVC util
It is not possible to run EAP with JSVC util
Status: ASSIGNED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: unspecified (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity medium
: ---
: EAP 6.3.0
Assigned To: Mladen Turk
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-05 12:19 EST by Jan Stefl
Modified: 2018-03-05 10:28 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for static start-methods (921 bytes, patch)
2013-03-05 13:48 EST, Mladen Turk
no flags Details | Diff
daemon 1.0.13 with applied patch (23.71 KB, application/x-java-archive)
2013-03-05 13:50 EST, Mladen Turk
no flags Details
service.bat - service handling script (6.64 KB, application/octet-stream)
2013-04-22 10:49 EDT, Jan Stefl
no flags Details
service.conf.bat - service handling script (1.89 KB, application/octet-stream)
2013-04-22 10:49 EDT, Jan Stefl
no flags Details

  None (edit)
Description Jan Stefl 2013-03-05 12:19:06 EST
Interface of Main class changed.

more info at https://bugzilla.redhat.com/show_bug.cgi?id=918110
Comment 1 Mladen Turk 2013-03-05 13:48:25 EST
Created attachment 705599 [details]
patch for static start-methods

In case start method has private default constructor creating the instance will fail. Patch makes sure that newInstance is not invoked for static methods because it is ignored anyhow by Java spec.
Comment 2 Mladen Turk 2013-03-05 13:50:15 EST
Created attachment 705600 [details]
daemon 1.0.13 with applied patch
Comment 4 Jan Stefl 2013-03-06 04:35:29 EST
Upstream JIRA: https://issues.apache.org/jira/browse/DAEMON-283
Comment 5 Permaine Cheung 2013-03-08 09:55:33 EST
jakarta-commons-daemon-1.0.13-1.redhat_1.ep6.el6,
apache-commons-daemon-eap6-1.0.13-3.redhat_1.ep6.el6,
apache-commons-daemon-eap6-1.0.13-3.redhat_1.ep6.el5 built in Brew to include the fix on RHEL.
Comment 6 Vaclav Tunka 2013-03-11 11:34:32 EDT
Win build:
https://brewweb.devel.redhat.com/buildinfo?buildID=260225
Comment 7 Vaclav Tunka 2013-03-11 11:38:56 EDT
Solaris builds:
jakarta-commons-daemon/1.0.13/3.sun10/
Comment 8 Vaclav Tunka 2013-03-11 13:03:28 EDT
Top level windows build:
jboss-eap-native-utils-6.1.0-4.win6
Comment 9 Vaclav Tunka 2013-03-11 13:03:55 EDT
Top level solaris build:
jboss-eap-native-utils/6.1.0/4.sun10/
Comment 10 Vaclav Tunka 2013-03-12 06:06:09 EDT
Fixes shall be available in EAP 6.1.0.ER3
Comment 11 Pavel Slavicek 2013-03-12 06:18:19 EDT
Please set correct Target Milestone and Target Release.
Comment 12 Vaclav Tunka 2013-03-12 09:35:18 EDT
Fixed - thanks for the reminder. I am still fighting a little bit with Bugzilla :)
Comment 13 Pavel Slavicek 2013-03-12 10:04:22 EDT
We all :-) ... Thank you.
Comment 15 Jan Stefl 2013-04-04 07:03:50 EDT
RHEL, Solaris version is OK.
We are waiting for feedback from development to verify Windows version.
Comment 16 Jan Stefl 2013-04-11 11:11:26 EDT
On Windows failed, but fixies are in progress and awaited in the next build.
Comment 17 Vaclav Tunka 2013-04-16 16:44:49 EDT
Fixed in:
jakarta-commons-daemon-1.0.15-1.win6
Comment 18 Jan Stefl 2013-04-22 10:48:21 EDT
1. Windows build works, but common-daemon log contains errors (after stopping the service):
------------------------------------------------------------------------------
[2013-04-22 07:04:58] [info]  [ 6076] Commons Daemon procrun (1.0.15.0 32-bit) started
[2013-04-22 07:04:58] [info]  [ 6076] Service EAP61SVC name JBoss Enterprise Application Server 6.1
[2013-04-22 07:04:59] [info]  [ 6076] Service 'EAP61SVC' installed
[2013-04-22 07:04:59] [info]  [ 6076] Commons Daemon procrun finished
[2013-04-22 07:04:59] [info]  [ 2632] Commons Daemon procrun (1.0.15.0 32-bit) started
[2013-04-22 07:04:59] [info]  [ 2632] Updating service...
[2013-04-22 07:04:59] [info]  [ 2632] Service 'EAP61SVC' updated
[2013-04-22 07:04:59] [info]  [ 2632] Update service finished.
[2013-04-22 07:04:59] [info]  [ 2632] Commons Daemon procrun finished
[2013-04-22 07:06:01] [info]  [ 2496] Commons Daemon procrun (1.0.15.0 32-bit) started
[2013-04-22 07:06:01] [info]  [ 2496] Running 'EAP61SVC' Service...
[2013-04-22 07:06:01] [info]  [ 4376] Starting service...
[2013-04-22 07:06:03] [info]  [ 4376] Service started in 1713 ms.
[2013-04-22 07:06:43] [info]  [ 5820] Stopping service...
[2013-04-22 07:06:44] [error] [ 5984] Failed to set service status
[2013-04-22 07:06:44] [error] [ 5984] The handle is invalid.
------------------------------------------------------------------------------

2. Prunsrv.exe is not part of 64b natives package.

3. It would be nice, if files "service.bat" and "service.conf.bat" would be part of sbin directory as prunsrv.exe  (see attachment).
Mladen, do you agree?
Comment 19 Jan Stefl 2013-04-22 10:49:36 EDT
Created attachment 738558 [details]
service.bat - service handling script
Comment 20 Jan Stefl 2013-04-22 10:49:54 EDT
Created attachment 738559 [details]
service.conf.bat - service handling script
Comment 21 Jan Stefl 2013-04-26 09:03:22 EDT
Mladen, could you please provide info to comment18:1
Vaclav, could you please provide info to comment18:2,3

Thank you very much.
Comment 22 Vaclav Tunka 2013-04-30 07:23:09 EDT
I am waiting for Mladen to confirm this.
Comment 23 Mladen Turk 2013-04-30 07:59:35 EDT
(In reply to comment #18)
> 1. Windows build works, but common-daemon log contains errors (after
> stopping the service):
> [2013-04-22 07:06:43] [info]  [ 5820] Stopping service...
> [2013-04-22 07:06:44] [error] [ 5984] Failed to set service status
> [2013-04-22 07:06:44] [error] [ 5984] The handle is invalid.
> -----------------------------------------------------------------------------

This is probably a bug. File an upstream JIRA inside Commons Daemon, and I'll see
how to fix it. Does the service stops?

> 
> 2. Prunsrv.exe is not part of 64b natives package.
> 

It should be.
Comment 24 Jan Stefl 2013-04-30 08:28:15 EDT
Mladen,
thanks for the info.
Yes, the service stops. Upstream JIRA was created:
https://issues.apache.org/jira/browse/DAEMON-296
Comment 25 Mladen Turk 2013-04-30 08:38:06 EDT
(In reply to comment #24)
> Mladen,
> thanks for the info.
> Yes, the service stops. Upstream JIRA was created:
> https://issues.apache.org/jira/browse/DAEMON-296

OK, since it stops it's a minor issue.
Can you please turn debug logging and attach it to JIRA issue.
Just the part after 'Stopping service...'
Comment 26 Jan Stefl 2013-04-30 10:38:22 EDT
After setting logging level to Debug, behaviour was changed a little.

net stop EAP61SVC 
returns:
---------------------------------------------------------------------------
The JBoss Enterprise Application Server 6.1 service is stopping.
A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

The JBoss Enterprise Application Server 6.1 service was stopped successfully.
---------------------------------------------------------------------------



And log contains
------------------------------------------------------------------------------------------
[2013-04-30 07:32:50] [debug] ( prunsrv.c:844 ) [ 2028] reportServiceStatusE: 4, 0, 0, 0
[2013-04-30 07:32:50] [debug] ( prunsrv.c:1528) [ 2028] Waiting for worker to finish...
[2013-04-30 07:32:50] [debug] ( prunsrv.c:1533) [ 2028] Worker finished.
[2013-04-30 07:32:50] [debug] ( prunsrv.c:1559) [ 2028] Waiting for all threads to exit
[2013-04-30 07:32:52] [debug] ( prunsrv.c:844 ) [ 5504] reportServiceStatusE: 4, 0, 0, 0
[2013-04-30 07:33:17] [debug] ( prunsrv.c:844 ) [ 5504] reportServiceStatusE: 3, 0, 3000, 0
[2013-04-30 07:33:17] [info]  ( prunsrv.c:943 ) [ 5548] Stopping service...
[2013-04-30 07:33:17] [debug] ( javajni.c:941 ) [ 4904] Java Worker thread started java/lang/System:exit
[2013-04-30 07:33:18] [debug] ( prunsrv.c:844 ) [ 5548] reportServiceStatusE: 3, 0, 20000, 0
[2013-04-30 07:33:18] [debug] ( javajni.c:471 ) [ 5276] Exit hook with exit code 0
[2013-04-30 07:33:18] 
------------------------------------------------------------------------------------------
Comment 27 Jan Stefl 2013-05-07 03:39:19 EDT
There are still followings productization issues.

1. prunsrv.exe is missing for 64b windows version.
2. service.bat and service.conf.bat was not added into sbin direcotory

Verified with EAP ER6.
Comment 28 Jan Stefl 2013-05-07 03:42:39 EDT
Dev (minor) issue mentioned in comment 26 still manifests. But whole process works (instaling, starting, stopping, removing service).

Verified with EAP ER6.
Comment 29 Vaclav Tunka 2013-05-07 06:29:10 EDT
The prunsrv.exe was not picked by Brew in the last build, fixed for ER7 in:
jakarta-commons-daemon-1.0.15-4.win6
Comment 32 Jan Stefl 2013-05-13 08:13:45 EDT
Dev (minor) issue mentioned in comment 26 still manifests. But whole process works (instaling, starting, stopping, removing service).

Relavant upsteram JIRA could be found on:
https://issues.apache.org/jira/browse/DAEMON-296

Verified with EAP ER8.
Comment 33 Jan Stefl 2013-07-08 10:47:10 EDT
Mladen,

any updates with https://issues.apache.org/jira/browse/DAEMON-296 ?
Comment 34 Mladen Turk 2013-07-08 10:59:09 EDT
I'll be sorting various Commons Daemon issues this and next week and make new release afterwards.
So work in progress :)
Comment 35 Aleksandar Kostadinov 2013-09-25 12:40:40 EDT
I just want to point out that we need a documentation addition so we have any bases to test jsvc. Without documentation to know the supported use case for this binary we also don't know what to test of it.

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