[daemon] Windows service not starting JVM mode with -javaagent (JDK11)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[daemon] Windows service not starting JVM mode with -javaagent (JDK11)

Sebastian Götz
Hi all,

I have an issue when I try upgrading my existing application.
For years I have been using procrun to install and start the application
as a Windows service.
No it seems that there is some sort of compatibility problem. My
application is compiled with JDK 11 and also run with JDK 11.
It is configured to run in JVM mode. Now comes the main issue: it makes
use of load time weaving (AspectJ). For this I need to install a Java
agent in order to register a class transformer. I use Spring's
instrumentation support package (spring-instrument.jar) for this. When I
change the JvmOptions in the service configuration to add the javaagent
like this:

-javaagent:"lib/spring-instrument.jar"

It stops working. The service does not start and Windows event viewer
states that my service has crashed. I see no log message giving my any
hint where to start searching. Initially I used Version 1.1.0.0 of
procrun, but even with the recent 1.2.4 the problem persists. I double
checked the path to the jar file and even tried with the absolute path
in case the working directory would not match. I used the exact same
configuration formerly for this application using Oracle JDK 8. Is there
a known issue with OpenJDK 11 I am not aware of?

Kind regards
Sebastian Götz

Reply | Threaded
Open this post in threaded view
|

Re: [daemon] Windows service not starting JVM mode with -javaagent (JDK11)

Hugo Ferreira

Open or Oracle JDK?

Colleague had some issue launching a process in Windows (Oracle JDK).
In linux + OpenJDK no problem.
Error was from the Java library.

  java.io.IOException: Cannot run program "java" (in directory
"C:\Users\xxxxxxxx\IdeaProjects\toyadmos"): CreateProcess error=206, The
filename or extension is too long
     java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
     java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
     os.proc.proc$lzycompute$1(ProcessOps.scala:128)
     os.proc.proc$1(ProcessOps.scala:122)
     os.proc.spawn(ProcessOps.scala:135)


Solved by not forking.

See this:
https://github.com/microsoft/vscode-java-debug/issues/110#issuecomment-679972016

HTHs

On 12/02/21 10:38, Sebastian Götz wrote:

> Hi all,
>
> I have an issue when I try upgrading my existing application.
> For years I have been using procrun to install and start the application
> as a Windows service.
> No it seems that there is some sort of compatibility problem. My
> application is compiled with JDK 11 and also run with JDK 11.
> It is configured to run in JVM mode. Now comes the main issue: it makes
> use of load time weaving (AspectJ). For this I need to install a Java
> agent in order to register a class transformer. I use Spring's
> instrumentation support package (spring-instrument.jar) for this. When I
> change the JvmOptions in the service configuration to add the javaagent
> like this:
>
> -javaagent:"lib/spring-instrument.jar"
>
> It stops working. The service does not start and Windows event viewer
> states that my service has crashed. I see no log message giving my any
> hint where to start searching. Initially I used Version 1.1.0.0 of
> procrun, but even with the recent 1.2.4 the problem persists. I double
> checked the path to the jar file and even tried with the absolute path
> in case the working directory would not match. I used the exact same
> configuration formerly for this application using Oracle JDK 8. Is there
> a known issue with OpenJDK 11 I am not aware of?
>
> Kind regards
> Sebastian Götz
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [daemon] Windows service not starting JVM mode with -javaagent (JDK11)

Mark Thomas
In reply to this post by Sebastian Götz
Please can you be specific about exactly which JVM versions and Procrun
versions you tested and which worked and which did not?

Thanks,

Mark


On 12/02/2021 10:38, Sebastian Götz wrote:

> Hi all,
>
> I have an issue when I try upgrading my existing application.
> For years I have been using procrun to install and start the application
> as a Windows service.
> No it seems that there is some sort of compatibility problem. My
> application is compiled with JDK 11 and also run with JDK 11.
> It is configured to run in JVM mode. Now comes the main issue: it makes
> use of load time weaving (AspectJ). For this I need to install a Java
> agent in order to register a class transformer. I use Spring's
> instrumentation support package (spring-instrument.jar) for this. When I
> change the JvmOptions in the service configuration to add the javaagent
> like this:
>
> -javaagent:"lib/spring-instrument.jar"
>
> It stops working. The service does not start and Windows event viewer
> states that my service has crashed. I see no log message giving my any
> hint where to start searching. Initially I used Version 1.1.0.0 of
> procrun, but even with the recent 1.2.4 the problem persists. I double
> checked the path to the jar file and even tried with the absolute path
> in case the working directory would not match. I used the exact same
> configuration formerly for this application using Oracle JDK 8. Is there
> a known issue with OpenJDK 11 I am not aware of?
>
> Kind regards
> Sebastian Götz
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [daemon] Windows service not starting JVM mode with -javaagent (JDK11)

garydgregory
Also enable debug logging.

Gary

On Fri, Feb 12, 2021, 06:48 Mark Thomas <[hidden email]> wrote:

> Please can you be specific about exactly which JVM versions and Procrun
> versions you tested and which worked and which did not?
>
> Thanks,
>
> Mark
>
>
> On 12/02/2021 10:38, Sebastian Götz wrote:
> > Hi all,
> >
> > I have an issue when I try upgrading my existing application.
> > For years I have been using procrun to install and start the application
> > as a Windows service.
> > No it seems that there is some sort of compatibility problem. My
> > application is compiled with JDK 11 and also run with JDK 11.
> > It is configured to run in JVM mode. Now comes the main issue: it makes
> > use of load time weaving (AspectJ). For this I need to install a Java
> > agent in order to register a class transformer. I use Spring's
> > instrumentation support package (spring-instrument.jar) for this. When I
> > change the JvmOptions in the service configuration to add the javaagent
> > like this:
> >
> > -javaagent:"lib/spring-instrument.jar"
> >
> > It stops working. The service does not start and Windows event viewer
> > states that my service has crashed. I see no log message giving my any
> > hint where to start searching. Initially I used Version 1.1.0.0 of
> > procrun, but even with the recent 1.2.4 the problem persists. I double
> > checked the path to the jar file and even tried with the absolute path
> > in case the working directory would not match. I used the exact same
> > configuration formerly for this application using Oracle JDK 8. Is there
> > a known issue with OpenJDK 11 I am not aware of?
> >
> > Kind regards
> > Sebastian Götz
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [daemon] Windows service not starting JVM mode with -javaagent (JDK11)

Sebastian Götz
I am sorry for the delay but here is the requested information.

The application worked fine as a Windows service with the following configuration:
  • Windows Server 2019 (Version 1809 Build 17763.437)
  • Oracle JDK 8.0.1020.14 (aka JDK 8 u 102)
  • Procrun 1.0.15.0
After upgrading the configuration to
  • OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)
  • Procrun 1.2.4.0
the services won't start anymore. In the service configuration dialog I already have set the Level to DEBUG on the Logging tab.
This is the sole output when trying to start the service (note that I had to hide some customer details manually in the logs):

[2021-02-22 07:53:22] [debug] ( prunsrv.c:1892) [ 5988] Apache Commons Daemon procrun log initialized.
[2021-02-22 07:53:23] [info]  ( prunsrv.c:1896) [ 5988] Apache Commons Daemon procrun (1.2.4.0 64-bit) started.
[2021-02-22 07:53:23] [info]  ( prunsrv.c:1806) [ 5988] Running Service '
MyApp_COMM_SERVER'...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1577) [ 5040] Inside ServiceMain...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1032) [ 5040] reportServiceStatusE: dwCurrentState = 2, dwWin32ExitCode = 0, dwWaitHint = 3000, dwServiceSpecificExitCode = 0.
[2021-02-22 07:53:23] [info]  ( prunsrv.c:1325) [ 5040] Starting service...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:496 ) [ 5040] Checking Java options for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-javaagent:"lib/spring-instrument.jar"' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-XX:+UseG1GC' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.port=9011' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.host=localhost' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.authenticate=false' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.ssl=false' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Deu.inform.configDir=C:\.inform\isac3\config' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( javajni.c:216 ) [ 5040] Explicit RuntimeLib specified 'C:\Program Files\MyApp\isac3-comm\..\java\bin\server\jvm.dll'
[2021-02-22 07:53:23] [debug] ( javajni.c:280 ) [ 5040] Adding Java bin path to the PATH to fix loading of awt.dll: 'C:\Program Files\
MyApp\isac3-comm\..\java\bin'
[2021-02-22 07:53:23] [debug] ( javajni.c:286 ) [ 5040] Loading JVM DLL 'C:\Program Files\
MyApp\isac3-comm\..\java\bin\server\jvm.dll'
[2021-02-22 07:53:23] [debug] ( javajni.c:414 ) [ 5040] Loaded JVM DLL 'C:\Program Files\
MyApp\isac3-comm\..\java\bin\server\jvm.dll', home ''.
[2021-02-22 07:53:23] [debug] ( javajni.c:419 ) [ 5040] JNI_GetCreatedJavaVMs...
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[0] -javaagent:"lib/spring-instrument.jar"
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[1] -XX:+UseG1GC
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[2] -Dcom.sun.management.jmxremote.port=9011
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[3] -Dcom.sun.management.jmxremote.host=localhost
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[4] -Dcom.sun.management.jmxremote.authenticate=false
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[5] -Dcom.sun.management.jmxremote.ssl=false
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[6] -Deu.inform.configDir=C:\.inform\isac3\config
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[7] -Djava.class.path=isac3-comm-server.jar
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[8] exit
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[9] abort
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[10] -Xms128m
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[11] -Xmx819m
[2021-02-22 07:53:23] [debug] ( javajni.c:573 ) [ 4644] JVM aborted
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1108) [ 4644] Start exit hook called...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1109) [ 4644] JVM exit code: 1.

Kind regards

Sebastian


Am 12.02.2021 um 13:50 schrieb Gary Gregory:
Also enable debug logging.

Gary

On Fri, Feb 12, 2021, 06:48 Mark Thomas [hidden email] wrote:

Please can you be specific about exactly which JVM versions and Procrun
versions you tested and which worked and which did not?

Thanks,

Mark


On 12/02/2021 10:38, Sebastian Götz wrote:
Hi all,

I have an issue when I try upgrading my existing application.
For years I have been using procrun to install and start the application
as a Windows service.
No it seems that there is some sort of compatibility problem. My
application is compiled with JDK 11 and also run with JDK 11.
It is configured to run in JVM mode. Now comes the main issue: it makes
use of load time weaving (AspectJ). For this I need to install a Java
agent in order to register a class transformer. I use Spring's
instrumentation support package (spring-instrument.jar) for this. When I
change the JvmOptions in the service configuration to add the javaagent
like this:

-javaagent:"lib/spring-instrument.jar"

It stops working. The service does not start and Windows event viewer
states that my service has crashed. I see no log message giving my any
hint where to start searching. Initially I used Version 1.1.0.0 of
procrun, but even with the recent 1.2.4 the problem persists. I double
checked the path to the jar file and even tried with the absolute path
in case the working directory would not match. I used the exact same
configuration formerly for this application using Oracle JDK 8. Is there
a known issue with OpenJDK 11 I am not aware of?

Kind regards
Sebastian Götz



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



    


Mit freundlichen Grüßen
iNFORM Technology GmbH

Sebastian Götz

*****************************************************

iNFORM Technology GmbH
Berliner Straße 24
72458 Albstadt-Ebingen

Tel: +49 7431 9816090
[hidden email]
http://www.inform-technology.de/

*****************************************************

iNFORM Technology GmbH
Bodenseeallee 18
D-78333 Stockach
Tel: +49 7771 91896-60

*****************************************************



Geschäftsführer: Dipl.-Ing. (FH) Heinz Roth | Handelsregister: HRB 773712, Amtsgericht Stuttgart | USt-ID Nr.: DE312290945

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Reply | Threaded
Open this post in threaded view
|

Re: [daemon] Windows service not starting JVM mode with -javaagent (JDK11)

Sebastian Götz
Okay.

I got it. It appears that the double quotes are no longer allowed. When removing them the service starts:

[2021-02-22 09:24:34] [debug] ( prunsrv.c:1892) [ 1704] Apache Commons Daemon procrun log initialized.
[2021-02-22 09:24:34] [info]  ( prunsrv.c:1896) [ 1704] Apache Commons Daemon procrun (1.2.4.0 64-bit) started.
[2021-02-22 09:24:34] [info]  ( prunsrv.c:1806) [ 1704] Running Service 'MyApp_COMM_SERVER'...
[2021-02-22 09:24:34] [debug] ( prunsrv.c:1577) [  348] Inside ServiceMain...
[2021-02-22 09:24:34] [debug] ( prunsrv.c:1032) [  348] reportServiceStatusE: dwCurrentState = 2, dwWin32ExitCode = 0, dwWaitHint = 3000, dwServiceSpecificExitCode = 0.
[2021-02-22 09:24:34] [info]  ( prunsrv.c:1325) [  348] Starting service...
[2021-02-22 09:24:34] [debug] ( prunsrv.c:496 ) [  348] Checking Java options for environment variable requirements
[2021-02-22 09:24:34] [debug] ( prunsrv.c:500 ) [  348] Checking '-javaagent:lib\spring-instrument.jar' for environment variable requirements
[2021-02-22 09:24:34] [debug] ( prunsrv.c:500 ) [  348] Checking '-XX:+UseG1GC' for environment variable requirements
[2021-02-22 09:24:34] [debug] ( prunsrv.c:500 ) [  348] Checking '-Dcom.sun.management.jmxremote.port=9011' for environment variable requirements
[2021-02-22 09:24:34] [debug] ( prunsrv.c:500 ) [  348] Checking '-Dcom.sun.management.jmxremote.host=localhost' for environment variable requirements
[2021-02-22 09:24:34] [debug] ( prunsrv.c:500 ) [  348] Checking '-Dcom.sun.management.jmxremote.authenticate=false' for environment variable requirements
[2021-02-22 09:24:34] [debug] ( prunsrv.c:500 ) [  348] Checking '-Dcom.sun.management.jmxremote.ssl=false' for environment variable requirements
[2021-02-22 09:24:34] [debug] ( prunsrv.c:500 ) [  348] Checking '-Deu.inform.configDir=C:\.inform\isac3\config' for environment variable requirements
[2021-02-22 09:24:34] [debug] ( javajni.c:216 ) [  348] Explicit RuntimeLib specified 'C:\Program Files\
MyApp\isac3-comm\..\java\bin\server\jvm.dll'
[2021-02-22 09:24:34] [debug] ( javajni.c:280 ) [  348] Adding Java bin path to the PATH to fix loading of awt.dll: 'C:\Program Files\
MyApp\isac3-comm\..\java\bin'
[2021-02-22 09:24:34] [debug] ( javajni.c:286 ) [  348] Loading JVM DLL 'C:\Program Files\
MyApp\isac3-comm\..\java\bin\server\jvm.dll'
[2021-02-22 09:24:34] [debug] ( javajni.c:414 ) [  348] Loaded JVM DLL 'C:\Program Files\
MyApp\isac3-comm\..\java\bin\server\jvm.dll', home ''.
[2021-02-22 09:24:34] [debug] ( javajni.c:419 ) [  348] JNI_GetCreatedJavaVMs...
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[0] -javaagent:lib\spring-instrument.jar
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[1] -XX:+UseG1GC
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[2] -Dcom.sun.management.jmxremote.port=9011
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[3] -Dcom.sun.management.jmxremote.host=localhost
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[4] -Dcom.sun.management.jmxremote.authenticate=false
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[5] -Dcom.sun.management.jmxremote.ssl=false
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[6] -Deu.inform.configDir=C:\.inform\isac3\config
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[7] -Djava.class.path=isac3-comm-server.jar
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[8] exit
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[9] abort
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[10] -Xms128m
[2021-02-22 09:24:34] [debug] ( javajni.c:817 ) [ 6564] Jvm Option[11] -Xmx819m
[2021-02-22 09:24:38] [debug] ( javajni.c:1003) [ 6564] argv[0] = start
[2021-02-22 09:24:38] [debug] ( javajni.c:1062) [ 6564] Java worker thread started for eu/inform/comm/CommServerApplication:main
[2021-02-22 09:24:38] [debug] ( javajni.c:1068) [ 6564] JNI calling static void method eu/inform/comm/CommServerApplication:main
[2021-02-22 09:24:39] [debug] ( prunsrv.c:1389) [  348] Java started 'eu/inform/comm/CommServerApplication'.
[2021-02-22 09:24:39] [info]  ( prunsrv.c:1488) [  348] Service started in 4155 milliseconds.
[2021-02-22 09:24:39] [debug] ( prunsrv.c:1032) [  348] reportServiceStatusE: dwCurrentState = 4, dwWin32ExitCode = 0, dwWaitHint = 0, dwServiceSpecificExitCode = 0.
[2021-02-22 09:24:39] [debug] ( prunsrv.c:1732) [  348] Waiting for worker to finish...
[2021-02-22 09:24:39] [debug] ( javajni.c:1157) [  348] WaitForSingleObject 0x0000000000000264 -1 milliseconds (INFINITE=-1)...

Thank you.


Am 22.02.2021 um 07:59 schrieb Sebastian Götz:
I am sorry for the delay but here is the requested information.

The application worked fine as a Windows service with the following configuration:
  • Windows Server 2019 (Version 1809 Build 17763.437)
  • Oracle JDK 8.0.1020.14 (aka JDK 8 u 102)
  • Procrun 1.0.15.0
After upgrading the configuration to
  • OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)
  • Procrun 1.2.4.0
the services won't start anymore. In the service configuration dialog I already have set the Level to DEBUG on the Logging tab.
This is the sole output when trying to start the service (note that I had to hide some customer details manually in the logs):

[2021-02-22 07:53:22] [debug] ( prunsrv.c:1892) [ 5988] Apache Commons Daemon procrun log initialized.
[2021-02-22 07:53:23] [info]  ( prunsrv.c:1896) [ 5988] Apache Commons Daemon procrun (1.2.4.0 64-bit) started.
[2021-02-22 07:53:23] [info]  ( prunsrv.c:1806) [ 5988] Running Service '
MyApp_COMM_SERVER'...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1577) [ 5040] Inside ServiceMain...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1032) [ 5040] reportServiceStatusE: dwCurrentState = 2, dwWin32ExitCode = 0, dwWaitHint = 3000, dwServiceSpecificExitCode = 0.
[2021-02-22 07:53:23] [info]  ( prunsrv.c:1325) [ 5040] Starting service...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:496 ) [ 5040] Checking Java options for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-javaagent:"lib/spring-instrument.jar"' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-XX:+UseG1GC' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.port=9011' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.host=localhost' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.authenticate=false' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Dcom.sun.management.jmxremote.ssl=false' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( prunsrv.c:500 ) [ 5040] Checking '-Deu.inform.configDir=C:\.inform\isac3\config' for environment variable requirements
[2021-02-22 07:53:23] [debug] ( javajni.c:216 ) [ 5040] Explicit RuntimeLib specified 'C:\Program Files\MyApp\isac3-comm\..\java\bin\server\jvm.dll'
[2021-02-22 07:53:23] [debug] ( javajni.c:280 ) [ 5040] Adding Java bin path to the PATH to fix loading of awt.dll: 'C:\Program Files\
MyApp\isac3-comm\..\java\bin'
[2021-02-22 07:53:23] [debug] ( javajni.c:286 ) [ 5040] Loading JVM DLL 'C:\Program Files\
MyApp\isac3-comm\..\java\bin\server\jvm.dll'
[2021-02-22 07:53:23] [debug] ( javajni.c:414 ) [ 5040] Loaded JVM DLL 'C:\Program Files\
MyApp\isac3-comm\..\java\bin\server\jvm.dll', home ''.
[2021-02-22 07:53:23] [debug] ( javajni.c:419 ) [ 5040] JNI_GetCreatedJavaVMs...
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[0] -javaagent:"lib/spring-instrument.jar"
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[1] -XX:+UseG1GC
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[2] -Dcom.sun.management.jmxremote.port=9011
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[3] -Dcom.sun.management.jmxremote.host=localhost
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[4] -Dcom.sun.management.jmxremote.authenticate=false
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[5] -Dcom.sun.management.jmxremote.ssl=false
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[6] -Deu.inform.configDir=C:\.inform\isac3\config
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[7] -Djava.class.path=isac3-comm-server.jar
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[8] exit
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[9] abort
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[10] -Xms128m
[2021-02-22 07:53:23] [debug] ( javajni.c:817 ) [ 4644] Jvm Option[11] -Xmx819m
[2021-02-22 07:53:23] [debug] ( javajni.c:573 ) [ 4644] JVM aborted
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1108) [ 4644] Start exit hook called...
[2021-02-22 07:53:23] [debug] ( prunsrv.c:1109) [ 4644] JVM exit code: 1.

Kind regards

Sebastian


Am 12.02.2021 um 13:50 schrieb Gary Gregory:
Also enable debug logging.

Gary

On Fri, Feb 12, 2021, 06:48 Mark Thomas [hidden email] wrote:

Please can you be specific about exactly which JVM versions and Procrun
versions you tested and which worked and which did not?

Thanks,

Mark


On 12/02/2021 10:38, Sebastian Götz wrote:
Hi all,

I have an issue when I try upgrading my existing application.
For years I have been using procrun to install and start the application
as a Windows service.
No it seems that there is some sort of compatibility problem. My
application is compiled with JDK 11 and also run with JDK 11.
It is configured to run in JVM mode. Now comes the main issue: it makes
use of load time weaving (AspectJ). For this I need to install a Java
agent in order to register a class transformer. I use Spring's
instrumentation support package (spring-instrument.jar) for this. When I
change the JvmOptions in the service configuration to add the javaagent
like this:

-javaagent:"lib/spring-instrument.jar"

It stops working. The service does not start and Windows event viewer
states that my service has crashed. I see no log message giving my any
hint where to start searching. Initially I used Version 1.1.0.0 of
procrun, but even with the recent 1.2.4 the problem persists. I double
checked the path to the jar file and even tried with the absolute path
in case the working directory would not match. I used the exact same
configuration formerly for this application using Oracle JDK 8. Is there
a known issue with OpenJDK 11 I am not aware of?

Kind regards
Sebastian Götz


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




Mit freundlichen Grüßen
iNFORM Technology GmbH

Sebastian Götz

*****************************************************

iNFORM Technology GmbH
Berliner Straße 24
72458 Albstadt-Ebingen

Tel: +49 7431 9816090
[hidden email]
http://www.inform-technology.de/

*****************************************************

iNFORM Technology GmbH
Bodenseeallee 18
D-78333 Stockach
Tel: +49 7771 91896-60

*****************************************************



Geschäftsführer: Dipl.-Ing. (FH) Heinz Roth | Handelsregister: HRB 773712, Amtsgericht Stuttgart | USt-ID Nr.: DE312290945

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


Mit freundlichen Grüßen
iNFORM Technology GmbH

Sebastian Götz

*****************************************************

iNFORM Technology GmbH
Berliner Straße 24
72458 Albstadt-Ebingen

Tel: +49 7431 9816090
[hidden email]
http://www.inform-technology.de/

*****************************************************

iNFORM Technology GmbH
Bodenseeallee 18
D-78333 Stockach
Tel: +49 7771 91896-60

*****************************************************



Geschäftsführer: Dipl.-Ing. (FH) Heinz Roth | Handelsregister: HRB 773712, Amtsgericht Stuttgart | USt-ID Nr.: DE312290945

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Reply | Threaded
Open this post in threaded view
|

Re: [daemon] Windows service not starting JVM mode with -javaagent (JDK11)

Mark Thomas
On 22/02/2021 08:40, Sebastian Götz wrote:
> Okay.
>
> I got it. It appears that the double quotes are no longer allowed. When
> removing them the service starts:

See the 1.2.0 changelog and https://issues.apache.org/jira/browse/DAEMON-399

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]