[JBoss JIRA] (WFCORE-5067) Wildfly as Windows Service fails to stop in a timely fashion
by Cedric HENRY (Jira)
[ https://issues.redhat.com/browse/WFCORE-5067?page=com.atlassian.jira.plug... ]
Cedric HENRY edited comment on WFCORE-5067 at 7/28/20 8:46 AM:
---------------------------------------------------------------
While further investigating the issue in matter after the documenting my assumption in the comment mentioned in the description, I have discovered in the _wildfly-stderr.2020-07-28.log_ file from server the following message:
{noformat}
2020-07-28 13:03:48 Commons Daemon procrun stderr initialized
" was unexpected at this time.{noformat}
which matches an attempt in stopping the Wildfly windows service.
Hence, I have looked into _service.bat_ (under _%JBOSS_HOME%\bin\service_) and I have observed the difference of formatting between STARTPARAM and STOPPARAM, as well as the [PROCRUN|https://commons.apache.org/proper/commons-daemon/procrun.html] documentation, and the fact _jboss-cli.bat_ is apparently not called on service stop...
Looking into this, I have worked out a solution tested on the standalone configuration with WIldfly 10.1.0.Final.
h2. The Solution
STOPPARAM must not use the " character (as mentioned in the error message above), thus shall be formatted otherwise
* *For Standalone Configuration:***
On line 475 of the service.bat script
{code:java}
set STOPPARAM=/c#!STOP_SCRIPT!#--controller=%CONTROLLER%#--connect#--command=:shutdown(timeout=0)%CREDENTIALS%
{code}
Note that this implies having {{CREDENTIALS}} formatted as follow when set (line 444):
{code:java}
CREDENTIALS=#--user=%JBOSSUSER%#--password=%JBOSSPASS%
{code}
* *For Domain Configuration:*
On line 469 of the service.bat script (not tested though)
{code:java}
set STOPPARAM=/c#%STOP_SCRIPT%#--controller=%CONTROLLER%#--connect#--command=/host=!DC_HOST!:shutdown(timeout=0)%CREDENTIALS%{code}
was (Author: cedric-henry):
While further investigating the issue in matter after the documenting my assumption in the comment mentioned in the description, I have discovered in the _wildfly-stderr.2020-07-28.log_ file from server the following message:
{noformat}
2020-07-28 13:03:48 Commons Daemon procrun stderr initialized
" was unexpected at this time.{noformat}
which matches an attempt in stopping the Wildfly windows service.
Hence, I have looked into _service.bat_ (under _%JBOSS_HOME%\bin\service_) and I have observed the difference of formatting between STARTPARAM and STOPPARAM, as well as the [PROCRUN|https://commons.apache.org/proper/commons-daemon/procrun.html] documentation, and the fact _jboss-cli.bat_ is apparently not called on service stop...
Looking into this, I have worked out a solution testing in the standalone configuration.
h2. The Solution
STOPPARAM must not use the " character (as mentioned in the error message above), thus shall be formatted otherwise
* *For Standalone Configuration:***
On line 475 of the service.bat script
{code:java}
set STOPPARAM=/c#!STOP_SCRIPT!#--controller=%CONTROLLER%#--connect#--command=:shutdown(timeout=0)%CREDENTIALS%
{code}
Note that this implies having {{CREDENTIALS}} formatted as follow when set (line 444):
{code:java}
CREDENTIALS=#--user=%JBOSSUSER%#--password=%JBOSSPASS%
{code}
* *For Domain Configuration:*
On line 469 of the service.bat script (not tested though)
{code:java}
set STOPPARAM=/c#%STOP_SCRIPT%#--controller=%CONTROLLER%#--connect#--command=/host=!DC_HOST!:shutdown(timeout=0)%CREDENTIALS%{code}
> Wildfly as Windows Service fails to stop in a timely fashion
> ------------------------------------------------------------
>
> Key: WFCORE-5067
> URL: https://issues.redhat.com/browse/WFCORE-5067
> Project: WildFly Core
> Issue Type: Bug
> Reporter: Cedric HENRY
> Assignee: Jeff Mesnil
> Priority: Major
>
> As already discussed under WFCORE-1719, there a problem when stopping the 'Wildfly' service resulting in error dialog about the service not stopping in a timely fashion.
> Further details got also provided in the comment https://issues.redhat.com/browse/WFCORE-1719?focusedCommentId=143...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 1 month
[JBoss JIRA] (WFCORE-1719) Wildfly 10.1.0.CR1 does not start as a windows service
by Cedric HENRY (Jira)
[ https://issues.redhat.com/browse/WFCORE-1719?page=com.atlassian.jira.plug... ]
Cedric HENRY commented on WFCORE-1719:
--------------------------------------
Investigating further I have found a solution for the Windows Service stop action issue.
I have documented the issue and solution under WFCORE-5067
> Wildfly 10.1.0.CR1 does not start as a windows service
> ------------------------------------------------------
>
> Key: WFCORE-1719
> URL: https://issues.redhat.com/browse/WFCORE-1719
> Project: WildFly Core
> Issue Type: Bug
> Components: Scripts
> Affects Versions: 2.2.0.Final
> Environment: Windows 8/Windows Server 2012
> Oracle Java 8
> Reporter: Anton Yudin
> Assignee: Tomaž Cerar
> Priority: Major
> Fix For: 3.0.0.Alpha6, 2.2.1.CR1
>
> Attachments: screenshot-1.png
>
>
> Wildfly fails to start as a windows service.
> Installation works fine:
> {code}
> .\service.bat install
> Using the X86-64bit version of prunsrv
> "C:\applications\wildfly-10.1.0.CR1-test\bin\service\amd64\wildfly-service" install Wildfly --DisplayName=WildFly --Description=""WildFly Application Server"" --LogLevel=INFO --LogPath="C:\applications\wildfly-10.1.0.CR1-test\standalone\log" --LogPrefix=service --StdOutput=auto --StdError=auto --StartMode=exe --Startup=manual --StartImage=cmd.exe --StartPath="C:\applications\wildfly-10.1.0.CR1-test\bin" ++StartParams="/c#set#NOPAUSE=Y#&&#standalone.bat#-Djboss.server.base.dir=C:\applications\wildfly-10.1.0.CR1-test\standalone#--server-config=standalone.xml" --StopMode=exe --StopImage=cmd.exe --StopPath="C:\applications\wildfly-10.1.0.CR1-test\bin" ++StopParams="/c jboss-cli.bat --controller=localhost:9990 --connect --command=:shutdown"
> Service Wildfly installed
> {code}
> Windows reports this error:
> {quote}
> Windows could not start the Wildfly on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code1.
> {quote}
> {code}
> Event log report:
> The Wildfly service terminated with the following service-specific error:
> Incorrect function.
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
> <System>
> <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager"/>
> <EventID Qualifiers="49152">7024</EventID>
> <Version>0</Version>
> <Level>2</Level>
> <Task>0</Task>
> <Opcode>0</Opcode>
> <Keywords>0x8080000000000000</Keywords>
> <TimeCreated SystemTime="2016-08-13T21:40:42.402218400Z"/>
> <EventRecordID>196500</EventRecordID>
> <Correlation/>
> <Execution ProcessID="668" ThreadID="10184"/>
> <Channel>System</Channel>
> <Computer>ITPC7.intra.rfgh.net</Computer>
> <Security/>
> </System>
> -
> <EventData>
> <Data Name="param1">Wildfly</Data>
> <Data Name="param2">%%1</Data>
> <Binary>570069006C00640066006C0079000000</Binary>
> </EventData>
> </Event>
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 1 month
[JBoss JIRA] (WFCORE-5067) Wildfly as Windows Service fails to stop in a timely fashion
by Cedric HENRY (Jira)
[ https://issues.redhat.com/browse/WFCORE-5067?page=com.atlassian.jira.plug... ]
Cedric HENRY commented on WFCORE-5067:
--------------------------------------
While further investigating the issue in matter after the documenting my assumption in the comment mentioned in the description, I have discovered in the _wildfly-stderr.2020-07-28.log_ file from server the following message:
{noformat}
2020-07-28 13:03:48 Commons Daemon procrun stderr initialized
" was unexpected at this time.{noformat}
which matches an attempt in stopping the Wildfly windows service.
Hence, I have looked into _service.bat_ (under _%JBOSS_HOME%\bin\service_) and I have observed the difference of formatting between STARTPARAM and STOPPARAM, as well as the [PROCRUN|https://commons.apache.org/proper/commons-daemon/procrun.html] documentation, and the fact _jboss-cli.bat_ is apparently not called on service stop...
Looking into this, I have worked out a solution testing in the standalone configuration.
h2. The Solution
STOPPARAM must not use the " character (as mentioned in the error message above), thus shall be formatted otherwise
* *For Standalone Configuration:***
On line 475 of the service.bat script
{code:java}
set STOPPARAM=/c#!STOP_SCRIPT!#--controller=%CONTROLLER%#--connect#--command=:shutdown(timeout=0)%CREDENTIALS%
{code}
Note that this implies having {{CREDENTIALS}} formatted as follow when set (line 444):
{code:java}
CREDENTIALS=#--user=%JBOSSUSER%#--password=%JBOSSPASS%
{code}
* *For Domain Configuration:*
On line 469 of the service.bat script (not tested though)
{code:java}
set STOPPARAM=/c#%STOP_SCRIPT%#--controller=%CONTROLLER%#--connect#--command=/host=!DC_HOST!:shutdown(timeout=0)%CREDENTIALS%{code}
> Wildfly as Windows Service fails to stop in a timely fashion
> ------------------------------------------------------------
>
> Key: WFCORE-5067
> URL: https://issues.redhat.com/browse/WFCORE-5067
> Project: WildFly Core
> Issue Type: Bug
> Reporter: Cedric HENRY
> Assignee: Jeff Mesnil
> Priority: Major
>
> As already discussed under WFCORE-1719, there a problem when stopping the 'Wildfly' service resulting in error dialog about the service not stopping in a timely fashion.
> Further details got also provided in the comment https://issues.redhat.com/browse/WFCORE-1719?focusedCommentId=143...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 1 month
[JBoss JIRA] (DROOLS-5534) MarshallingException occurs during REST request (JSON) unmarshalling in KIE server.
by Toshiya Kobayashi (Jira)
[ https://issues.redhat.com/browse/DROOLS-5534?page=com.atlassian.jira.plug... ]
Toshiya Kobayashi updated DROOLS-5534:
--------------------------------------
Story Points: 5 (was: 3)
> MarshallingException occurs during REST request (JSON) unmarshalling in KIE server.
> -----------------------------------------------------------------------------------
>
> Key: DROOLS-5534
> URL: https://issues.redhat.com/browse/DROOLS-5534
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 7.40.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Toshiya Kobayashi
> Priority: Major
> Attachments: full_error_messages.txt, reproducer_02699633_1.zip
>
>
> A user's decision service deployed on KIE server receives REST commands from client, MarshallingException due to class loading failure occurs during JSON unmarshalling before the commands are processed. I attached a simplified reproducer reproducer_02699633_1.zip expressing the issue, and the error message is like below:
> {noformat}
> Caused by: com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id 'com.example.reproducer.common.params.ContactParam' as a subtype of [simple type, class com.example.reproducer.common.base.IRuleParam]: no such class found
> at [Source: (String)"{ "lookup" : "ksession-rules", "commands" : [ { "insert" : { "object" : { "com.example.reproducer.common.base.Fact1": { "parameter" : { "@class" : "com.example.reproducer.common.params.ContactParam", "contactInfo" : 123456789 } } } } }, { "fire-all-rules" : "" } ]}"; line: 1, column: 185] (through reference chain: org.drools.core.command.runtime.BatchExecutionCommandImpl["commands"]->java.util.ArrayList[0]->org.drools.core.command.runtime.rule.InsertObjectCommand["object"]->com.example.reproducer.common.base.Fact1["parameter"])
> {noformat}
> For full error messages, see full_error_messages.txt in Attachment.
> The user's decision service (kjar) uses classes in another module jar as a library. ContactParam class which is a sub type of IRuleParam interface is in the kjar and IRuleParam interface is in the module jar.
> Also, @JsonTypeInfo(use = Id.CLASS) annotation is given to IRuleParam like below in order for JSON implementation to recognize a given class to Fact1.parameter as a sub type of IRuleParam.
> {code:java}
> @JsonTypeInfo(use = Id.CLASS)
> public interface IRuleParam {
> }
> {code}
> Both classes contained in the module jar and classes in the kjar should be loaded.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 1 month
[JBoss JIRA] (WFCORE-1719) Wildfly 10.1.0.CR1 does not start as a windows service
by Cedric HENRY (Jira)
[ https://issues.redhat.com/browse/WFCORE-1719?page=com.atlassian.jira.plug... ]
Cedric HENRY commented on WFCORE-1719:
--------------------------------------
Hello,
I have had to recently use Wildfly 10.1.0.Final as a Windows Service on Win 10) and meeting the Service Stop issue.
Out of curiosity, I have looked over the Internet about _Windows Service_ Stop timeout and found [https://www.coretechnologies.com/blog/windows-services/increase-sh.... Based on its content, I have understood that _windows_ intends to stop the service in 20 seconds or less.
Furthermore, I have seen in the Wildfly _service.bat_, the STOPARAM use the ':shutdown' CLI command, which may take some time because it is a graceful shutdown...
As a first test, I have edited the batch file to use ':shutdown(timeout=20)', as well as ':shutdown(timeout=0)' for immediate shutdown, reinstalled the service and tried stopping the service on the Windows server.
Unfortunately and surprisingly to me, I got the same outcome about the service not responding in a timely fashion.
As a another test, hoping to get more information in the console, I have used:
{code:java}
service.bat stop
{code}
The outcome is that the internal {{prunsrv.exe stop Wildfly}} lasts quite some time regardless of the shutdown timeout set, to end up with the message:
{code:java}
C:\JBoss_Wildfly\wildfly-10.1.0.Final\bin\service>service.bat stop
Using the X86-64bit version of prunsrv
Service Wildfly stopping...
ERROR: Failed to load service Wildfly configuration
{code}
Then, with service started, I have run the command meant to be ran on the service stop action.
{code:java}
C:\JBoss_Wildfly\wildfly-10.1.0.Final\bin>jboss-cli.bat --controller=localhost:9990 --connect --command=:shutdown
{"outcome" => "success"}
Press any key to continue . . .
{code}
Executing it results in having the stopped immediately.
What I have observed with that last test is:
* the _server.log_ records the shutdown action in the logs when the CLI command is executed as-if, but
* when the Windows Service stop action used, not such recording appears in _server.log_
My assumption is that the Windows Service stop action, or {{prunsrv.exe stop Wildfly}}, does not succeed to execute the Jboss CLI command (in STOPARAM in _service.bat_) to shutdown JBoss...
> Wildfly 10.1.0.CR1 does not start as a windows service
> ------------------------------------------------------
>
> Key: WFCORE-1719
> URL: https://issues.redhat.com/browse/WFCORE-1719
> Project: WildFly Core
> Issue Type: Bug
> Components: Scripts
> Affects Versions: 2.2.0.Final
> Environment: Windows 8/Windows Server 2012
> Oracle Java 8
> Reporter: Anton Yudin
> Assignee: Tomaž Cerar
> Priority: Major
> Fix For: 3.0.0.Alpha6, 2.2.1.CR1
>
> Attachments: screenshot-1.png
>
>
> Wildfly fails to start as a windows service.
> Installation works fine:
> {code}
> .\service.bat install
> Using the X86-64bit version of prunsrv
> "C:\applications\wildfly-10.1.0.CR1-test\bin\service\amd64\wildfly-service" install Wildfly --DisplayName=WildFly --Description=""WildFly Application Server"" --LogLevel=INFO --LogPath="C:\applications\wildfly-10.1.0.CR1-test\standalone\log" --LogPrefix=service --StdOutput=auto --StdError=auto --StartMode=exe --Startup=manual --StartImage=cmd.exe --StartPath="C:\applications\wildfly-10.1.0.CR1-test\bin" ++StartParams="/c#set#NOPAUSE=Y#&&#standalone.bat#-Djboss.server.base.dir=C:\applications\wildfly-10.1.0.CR1-test\standalone#--server-config=standalone.xml" --StopMode=exe --StopImage=cmd.exe --StopPath="C:\applications\wildfly-10.1.0.CR1-test\bin" ++StopParams="/c jboss-cli.bat --controller=localhost:9990 --connect --command=:shutdown"
> Service Wildfly installed
> {code}
> Windows reports this error:
> {quote}
> Windows could not start the Wildfly on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code1.
> {quote}
> {code}
> Event log report:
> The Wildfly service terminated with the following service-specific error:
> Incorrect function.
> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
> <System>
> <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager"/>
> <EventID Qualifiers="49152">7024</EventID>
> <Version>0</Version>
> <Level>2</Level>
> <Task>0</Task>
> <Opcode>0</Opcode>
> <Keywords>0x8080000000000000</Keywords>
> <TimeCreated SystemTime="2016-08-13T21:40:42.402218400Z"/>
> <EventRecordID>196500</EventRecordID>
> <Correlation/>
> <Execution ProcessID="668" ThreadID="10184"/>
> <Channel>System</Channel>
> <Computer>ITPC7.intra.rfgh.net</Computer>
> <Security/>
> </System>
> -
> <EventData>
> <Data Name="param1">Wildfly</Data>
> <Data Name="param2">%%1</Data>
> <Binary>570069006C00640066006C0079000000</Binary>
> </EventData>
> </Event>
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 1 month
[JBoss JIRA] (DROOLS-5535) Drools - KieServices.Factory.get() returns null
by Ashish Srivastava (Jira)
[ https://issues.redhat.com/browse/DROOLS-5535?page=com.atlassian.jira.plug... ]
Ashish Srivastava edited comment on DROOLS-5535 at 7/28/20 7:29 AM:
--------------------------------------------------------------------
.
was (Author: ashishsr):
I am trying multiple solutions which are mentioned in StackOverflow
[https://stackoverflow.com/questions/47556233/drools-7-4-1-kieservices-fac...]
[https://stackoverflow.com/questions/60971872/kieservices-kieservices-kies...]
[https://stackoverflow.com/questions/47332148/nullpointer-in-kieservices-f...]
[https://stackoverflow.com/questions/50258016/running-drools-as-a-fat-jarc...]
[https://stackoverflow.com/questions/50258016/running-drools-as-a-fat-jarc...] [https://stackoverflow.com/questions/46690139/exception-child-services-hav...]
> Drools - KieServices.Factory.get() returns null
> -----------------------------------------------
>
> Key: DROOLS-5535
> URL: https://issues.redhat.com/browse/DROOLS-5535
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.36.0.Final
> Reporter: Ashish Srivastava
> Assignee: Mario Fusco
> Priority: Major
>
> I try to integrate a Drools project in a maven application. The Drools app is running perfectly on his own, but when I try to integrate it in the *quarkus project*, I get a java.lang.NullPointerException.
> After some researches, it seems to happen because KieServices.Factory.get() return me null because of kie.conf.
> Drools Site Quote is: Many modules of Drools (e.g. drools-core, drools-compiler) have a file named {{kie.conf}} containing the names of the classes implementing the services provided by the corresponding module. When running Drools in a fat JAR, for example created by the Maven Shade Plugin, those various {{kie.conf}} files need to be merged, otherwise , the fat JAR will contain only 1 kie.conf from a single dependency, resulting into errors. You can merge resources in the Maven Shade Plugin using transformers, like this:
> ([https://docs.jboss.org/drools/release/7.14.0.Final/drools-docs/html_singl...])
> how can we configure the same for Quarkus Project ? or is there any way to load these file externally ..
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 1 month