Bug 918199 - It is not possible to run EAP with JSVC util
Summary: It is not possible to run EAP with JSVC util
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: unspecified
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: EAP 6.3.0
Assignee: Mladen Turk
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 17:19 UTC by Jan Stefl
Modified: 2019-06-13 08:07 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-13 08:07:46 UTC
Type: Bug
Embargoed:


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

Description Jan Stefl 2013-03-05 17:19:06 UTC
Interface of Main class changed.

more info at https://bugzilla.redhat.com/show_bug.cgi?id=918110

Comment 1 Mladen Turk 2013-03-05 18:48:25 UTC
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 18:50:15 UTC
Created attachment 705600 [details]
daemon 1.0.13 with applied patch

Comment 4 Jan Stefl 2013-03-06 09:35:29 UTC
Upstream JIRA: https://issues.apache.org/jira/browse/DAEMON-283

Comment 5 Permaine Cheung 2013-03-08 14:55:33 UTC
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 15:34:32 UTC
Win build:
https://brewweb.devel.redhat.com/buildinfo?buildID=260225

Comment 7 Vaclav Tunka 2013-03-11 15:38:56 UTC
Solaris builds:
jakarta-commons-daemon/1.0.13/3.sun10/

Comment 8 Vaclav Tunka 2013-03-11 17:03:28 UTC
Top level windows build:
jboss-eap-native-utils-6.1.0-4.win6

Comment 9 Vaclav Tunka 2013-03-11 17:03:55 UTC
Top level solaris build:
jboss-eap-native-utils/6.1.0/4.sun10/

Comment 10 Vaclav Tunka 2013-03-12 10:06:09 UTC
Fixes shall be available in EAP 6.1.0.ER3

Comment 11 Pavel Slavicek 2013-03-12 10:18:19 UTC
Please set correct Target Milestone and Target Release.

Comment 12 Vaclav Tunka 2013-03-12 13:35:18 UTC
Fixed - thanks for the reminder. I am still fighting a little bit with Bugzilla :)

Comment 13 Pavel Slavicek 2013-03-12 14:04:22 UTC
We all :-) ... Thank you.

Comment 15 Jan Stefl 2013-04-04 11:03:50 UTC
RHEL, Solaris version is OK.
We are waiting for feedback from development to verify Windows version.

Comment 16 Jan Stefl 2013-04-11 15:11:26 UTC
On Windows failed, but fixies are in progress and awaited in the next build.

Comment 17 Vaclav Tunka 2013-04-16 20:44:49 UTC
Fixed in:
jakarta-commons-daemon-1.0.15-1.win6

Comment 18 Jan Stefl 2013-04-22 14:48:21 UTC
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 14:49:36 UTC
Created attachment 738558 [details]
service.bat - service handling script

Comment 20 Jan Stefl 2013-04-22 14:49:54 UTC
Created attachment 738559 [details]
service.conf.bat - service handling script

Comment 21 Jan Stefl 2013-04-26 13:03:22 UTC
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 11:23:09 UTC
I am waiting for Mladen to confirm this.

Comment 23 Mladen Turk 2013-04-30 11:59:35 UTC
(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 12:28:15 UTC
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 12:38:06 UTC
(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 14:38:22 UTC
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 07:39:19 UTC
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 07:42:39 UTC
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 10:29:10 UTC
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 12:13:45 UTC
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 14:47:10 UTC
Mladen,

any updates with https://issues.apache.org/jira/browse/DAEMON-296 ?

Comment 34 Mladen Turk 2013-07-08 14:59:09 UTC
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 16:40:40 UTC
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.