Menu

#55 System Tray not able to show current status

Any
open
rzo
None
8
2023-11-29
2023-11-29
Kamil
No

Hello,

JDK 17
YAJSW 13.10

We have a problem with System Tray. We are sure that service is running, but the System Tray Icon stays black for the whole time, current status is not updated (it shows as if the service was not working but it is not true). However at the same time we are able to open the Tray icon and Start/Stop the service via the Tray. So only the current status is not up to date.

When I tried doing the following manually:
1. run stopService.bat
2. run startService.bat
3. run systemTrayIcon.bat

... I see in the command prompt of the SystemTrayIcon process:

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: connect: /127.0.0.1:15002

But the interesting part is that when I do the following:
1. run stopService.bat
2. close the Tray manually via the Icon
3. run runConsole.bat
4. run systemTrayIcon.bat

....the System Tray is working correctly (status is updated and the icon is green when it should be green). No error about "AnnotatedConnectException"

Previously we used JDK 8 and YAJSW 12.08 and System Tray worked correctly out of the box.

Here is the conf file:

wrapper.tmp.path = ${jna_tmpdir}
wrapper.java.app.jar = lib\\***.jar
wrapper.java.additional.1 = -Dlogging.config=lib\\logback.xml
wrapper.java.additional.2 = -Xmx3g
wrapper.java.additional.3 = -Djava.io.tmpdir=${wrapper_home}\\..\\..\\tmp
wrapper.java.command.minVersion = 17
wrapper.console.loglevel=INFO
wrapper.logfile=${wrapper_home}/log/wrapper.log
wrapper.logfile.maxsize=10m
wrapper.logfile.maxfiles=10
wrapper.console.title=***
wrapper.ntservice.name=***
wrapper.ntservice.displayname=***
wrapper.ntservice.description=***
wrapper.ntservice.failure_actions.actions=RESTART
wrapper.ntservice.failure_actions.actions_delay=1000
wrapper.ntservice.interactive=true
wrapper.ntservice.console=true
wrapper.ntservice.starttype=AUTO_START
wrapper.debug=true
wrapper.tray=true
wrapper.tray.port=15002
wrapper.console.visible=true
wrapper.console.minimized=false
wrapper.console.loglevel=DEBUG
wrapper.logfile.loglevel=DEBUG
wrapper.tray.icon = ${wrapper_home}/../***_logo.png
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.default=RESTART
wrapper.tray.commands = console
wrapper.tray.commands = startService
wrapper.tray.commands = stopService
wrapper.tray.commands = exitTray
[DEFAULT]
wrapper.working.dir=C:\Program Files (x86)\***
wrapper.java.command=C:\\Program Files\\Amazon Corretto\\jdk17.0.9_8\\bin\\java.exe

Please could you help with this issue?

Discussion

  • rzo

    rzo - 2023-11-29

    in the case that the tray is not working corretly:
    pls provide the output of the tray console and of the wrapper log file.

    thanks.

    -- Ron

     
  • Kamil

    Kamil - 2023-11-29

    When we do:
    1. run startService.bat
    2. run systemTrayIconW.bat

    What we see in the console of "startService.bat":

    C:\Program Files (x86)\***\lib\yajsw\bat>if not defined in_subprocess (cmd /k set in_subprocess=y & "C:\Program Files (x86)\***\lib\yajsw\bat\startService.bat"  )  & exit )                                                                                                                                                                    C:\Program Files (x86)\***\lib\yajsw\bat>if not defined in_subprocess (cmd /k set in_subprocess=y & "C:\Program Files (x86)\***\lib\yajsw\bat\startService.bat"  )  & exit )                                                                                                                                                                    C:\Program Files (x86)\***\lib\yajsw\bat>pushd C:\Program Files (x86)\***\lib\yajsw\bat\                                                                                                                                C:\Program Files (x86)\***\lib\yajsw\bat>call setenv.bat                                                    "java" -Xmx30m -Dwrapper_home="C:\Program Files (x86)\***\lib\yajsw\bat\/.." -Djna_tmpdir="C:\Program Files (x86)\***\lib\yajsw\bat\/../tmp" -Djava.net.preferIPv4Stack=true -jar "C:\Program Files (x86)\***\lib\yajsw\bat\/../wrapper.jar" -t "C:\Program Files (x86)\***\lib\yajsw\bat\/../conf/wrapper.conf"        YAJSW: yajsw-stable-13.10                                                                                               OS   : Windows 10/10.0/amd64                                                                                            JVM  : Amazon.com Inc./17.0.9/C:\Program Files\Amazon Corretto\jdk17.0.9_8/64                                           Looking in classpath from org.rzo.yajsw.boot.WrapperClassLoader@7adf9f5f for /com/sun/jna/win32-x86-64/jnidispatch.dll  Found library resource at jar:file:/C:/Program%20Files%20(x86)/***/lib/yajsw/./lib/core/jna/jna-5.12.1.jar!/com/sun/jna/win32-x86-64/jnidispatch.dll                                                                              Extracting library to C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp\jna1358938850534988145.dll            Trying C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp\jna1358938850534988145.dll                           Found jnidispatch at C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp\jna1358938850534988145.dll             ************* STARTING *** ***********************                                                                                                                                                                               Service *** started                    
    

    What we see in the console of "systemTrayIcon.bat" :

        C:\Program Files (x86)\***\lib\yajsw\bat>if not defined in_subprocess (cmd /k set in_subprocess=y & "C:\Program Files (x86)\***\lib\yajsw\bat\systemTrayIcon.bat"  )  & exit )                                                                                                                                                                  C:\Program Files (x86)\***\lib\yajsw\bat>if not defined in_subprocess (cmd /k set in_subprocess=y & "C:\Program Files (x86)\***\lib\yajsw\bat\systemTrayIcon.bat"  )  & exit )                                                                                                                                                                  C:\Program Files (x86)\***\lib\yajsw\bat>pushd C:\Program Files (x86)\***\lib\yajsw\bat\                                                                                                                                C:\Program Files (x86)\***\lib\yajsw\bat>call setenv.bat                                                    "java" -Xmx30m -Dwrapper_home="C:\Program Files (x86)\***\lib\yajsw\bat\/.." -Djna_tmpdir="C:\Program Files (x86)\***\lib\yajsw\bat\/../tmp" -Djava.net.preferIPv4Stack=true -jar "C:\Program Files (x86)\***\lib\yajsw\bat\/../wrapper.jar" -y "C:\Program Files (x86)\***\lib\yajsw\bat\/../conf/wrapper.conf"        YAJSW: yajsw-stable-13.10                                                                                               OS   : Windows 10/10.0/amd64                                                                                            JVM  : Amazon.com Inc./17.0.9/C:\Program Files\Amazon Corretto\jdk17.0.9_8/64                                           Looking in classpath from org.rzo.yajsw.boot.WrapperClassLoader@7adf9f5f for /com/sun/jna/win32-x86-64/jnidispatch.dll  Found library resource at jar:file:/C:/Program%20Files%20(x86)/***/lib/yajsw/./lib/core/jna/jna-5.12.1.jar!/com/sun/jna/win32-x86-64/jnidispatch.dll                                                                              Extracting library to C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp\jna16714109266075865851.dll           Trying C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp\jna16714109266075865851.dll                          Found jnidispatch at C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp\jna16714109266075865851.dll            io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:15002                                                                                                                        io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:15002                                                                                                                        io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:15002                                                                                                                        io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: /127.0.0.1:15002
    

    (our app is running correctly, we are able to log in etc.)

    And here the wrapper.log:

    WARNING|wrapper|Service ***|23-11-29 14:38:36|YAJSW: yajsw-stable-13.10
    WARNING|wrapper|Service ***|23-11-29 14:38:36|OS   : Windows 10/10.0/amd64
    WARNING|wrapper|Service ***|23-11-29 14:38:36|JVM  : Amazon.com Inc./17.0.9/C:\Program Files\Amazon Corretto\jdk17.0.9_8/64
    INFO|wrapper|Service ***|23-11-29 14:38:36|start delay: 0
    INFO|wrapper|Service ***|23-11-29 14:38:36|start from Thread pool-1-thread-1
    INFO|wrapper|Service ***|23-11-29 14:38:36|Win service: before service init
    INFO|wrapper|Service ***|23-11-29 14:38:36|set state IDLE->STARTING
    INFO|wrapper|Service ***|23-11-29 14:38:36|starting Process
    INFO|wrapper|Service ***|23-11-29 14:38:36|starting controller
    INFO|wrapper|Service ***|23-11-29 14:38:36|binding to port 15004
    INFO|wrapper|Service ***|23-11-29 14:38:36|+ ServiceMain callback
    INFO|wrapper|Service ***|23-11-29 14:38:36|reporting status 0 2 5000
    INFO|wrapper|Service ***|23-11-29 14:38:36|reporting status 0 4 0
    INFO|wrapper|Service ***|23-11-29 14:38:36|onstart
    INFO|wrapper|Service ***|23-11-29 14:38:37|Controller State: UNKNOWN -> WAITING
    INFO|wrapper|Service ***|23-11-29 14:38:37|binding successfull
    INFO|wrapper|Service ***|23-11-29 14:38:37|controller started
    INFO|wrapper|Service ***|23-11-29 14:38:37|working dir C:\Program Files (x86)\***
    INFO|wrapper|Service ***|23-11-29 14:38:37|spawning wrapped process
    INFO|wrapper|Service ***|23-11-29 14:38:37|is running: false pid=(-1<=0)
    INFO|wrapper|Service ***|23-11-29 14:38:37|exec: "C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin\java.exe" -classpath "C:\Program Files (x86)\***\lib\yajsw\wrapperApp.jar;C:\Program Files (x86)\***\lib\yajsw\lib\core\permit\permit-reflect-0.4.jar;C:\Program Files (x86)\***\lib\***-***.jar" -Dlogging.config=lib\logback.xml -Xmx3g "-Djava.io.tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\/..\..\..\tmp" -Dwrapper.port=15004 -Xrs -Dwrapper.service=true -Dwrapper.console.visible=false "-Djna_tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Dwrapper_home=C:\Program Files (x86)\***\lib\yajsw\bat\/.." -Dwrapper.port=15004 -Dwrapper.key=-*** -Dwrapper.teeName=-***"-Dwrapper.tmp.path=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Djna_tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Dwrapper.config=C:\Program Files (x86)\***\lib\yajsw\conf\wrapper.conf" -Dwrapper.additional.1x=-Xrs "-Dwrapper.working.dir=C:\Program Files (x86)\***" org.rzo.yajsw.app.WrapperJVMMain 
    INFO|wrapper|Service ***|23-11-29 14:38:37|started process with pid 29956
    INFO|wrapper|Service ***|23-11-29 14:38:37|waiting for termination of process
    INFO|wrapper|Service ***|23-11-29 14:38:37|set state STARTING->RUNNING
    INFO|wrapper|Service ***|23-11-29 14:38:37|Win32Service.callback 4
    INFO|wrapper|Service ***|23-11-29 14:38:37|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:38:37|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:38:37|is running: true 29956 -2
    INFO|wrapper|Service ***|23-11-29 14:38:37|waitFor -1
    INFO|wrapper|Service ***|23-11-29 14:38:37|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:38:37|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:38:37|is running: true 29956 -2
    INFO|wrapper|Service ***|23-11-29 14:38:37|1waitFor 
    INFO|wrapper|Service ***|23-11-29 14:38:37|2waitFor 
    INFO|wrapper|Service ***|23-11-29 14:38:37|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:38:37|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:38:37|is running: true 29956 -2
    INFO|wrapper|Service ***|23-11-29 14:38:37|WaitForSingleObject +
    INFO|29956/0|Service ***|23-11-29 14:38:38|APP user name=******2$
    INFO|29956/0|Service ***|23-11-29 14:38:38|APP working dir=C:\Program Files (x86)\***
    INFO|29956/0|Service ***|23-11-29 14:38:38|APP java version=17.0.9
    INFO|29956/0|Service ***|23-11-29 14:38:38|APP class path=C:\Program Files (x86)\***\lib\yajsw\wrapperApp.jar;C:\Program Files (x86)\***\lib\yajsw\lib\core\permit\permit-reflect-0.4.jar;C:\Program Files (x86)\***\lib\***-***.jar
    INFO|29956/0|Service ***|23-11-29 14:38:38|APP library path=C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Users\***\Scripts\;C:\Users\***\;C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Users\***\Desktop\***_***_v2\***\src\main\resources\python\dlls;C:\Program Files\dotnet\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;.
    INFO|29956/0|Service ***|23-11-29 14:38:38|Application args: no args
    INFO|29956/0|Service ***|23-11-29 14:38:38|mainClass/jar/script/module: null/lib\***-***.jar/null/null
    INFO|29956/0|Service ***|23-11-29 14:38:38|external stop false
    INFO|29956/0|Service ***|23-11-29 14:38:38|args: 
    INFO|29956/0|Service ***|23-11-29 14:38:38|terminated WrapperManager.init()
    INFO|29956/0|Service ***|23-11-29 14:38:38|connecting to port 15004
    INFO|29956/0|Service ***|23-11-29 14:38:38|jvm controller: netty logger set
    INFO|29956/0|Service ***|23-11-29 14:38:38|Controller State: WAITING -> ESTABLISHED
    INFO|29956/0|Service ***|23-11-29 14:38:39|Controller State: ESTABLISHED -> LOGGED_ON
    INFO|29956/0|Service ***|23-11-29 14:38:39|Correct key
    INFO|29956/0|Service ***|23-11-29 14:39:02|main method terminated
    INFO|29956/0|Service ***|23-11-29 14:39:02|exit on main terminate -1
    INFO|wrapper|Service ***|23-11-29 14:39:50|Win32Service.callback 1
    INFO|wrapper|Service ***|23-11-29 14:39:50|reporting status 1 3 30000
    INFO|wrapper|Service ***|23-11-29 14:39:50|Win service stop - timeout: 30000
    INFO|wrapper|Service ***|23-11-29 14:39:50|Win service wrapper.control -> stopping application
    INFO|wrapper|Service ***|23-11-29 14:39:50|stop from Thread pool-1-thread-3 reason: SERVICE
    INFO|wrapper|Service ***|23-11-29 14:39:50|set state RUNNING->STATE_USER_STOP
    INFO|wrapper|Service ***|23-11-29 14:39:50|stopping process with pid/timeout 29956 45000
    INFO|29956/0|Service ***|23-11-29 14:39:50|Controller State: LOGGED_ON -> USER_STOP
    INFO|29956/0|Service ***|23-11-29 14:39:50|controller sending a stop command
    INFO|29956/0|Service ***|23-11-29 14:39:51|Controller State: USER_STOP -> WAITING_CLOSED
    INFO|29956/0|Service ***|23-11-29 14:39:51|session closed -> waiting
    INFO|29956/0|Service ***|23-11-29 14:39:51|wrapper manager received Message:STOP::SERVICE
    INFO|wrapper|Service ***|23-11-29 14:39:51|WaitForSingleObject -
    INFO|wrapper|Service ***|23-11-29 14:39:51|WaitForSingleObject terminated PID: 29956
    INFO|29956/0|Service ***|23-11-29 14:39:51|session closed -> waiting
    INFO|wrapper|Service ***|23-11-29 14:39:51|waitFor 45000
    INFO|wrapper|Service ***|23-11-29 14:39:51|GetExitCodeProcess returned 0
    INFO|wrapper|Service ***|23-11-29 14:39:51|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:39:51|is running: false 29956 0
    INFO|29956/0|Service ***|23-11-29 14:39:51|process terminated
    INFO|wrapper|Service ***|23-11-29 14:39:51|getExitCode 0 processINFO==null=false
    INFO|29956/0|Service ***|23-11-29 14:39:51|Controller State: WAITING_CLOSED -> PROCESS_KILLED
    INFO|wrapper|Service ***|23-11-29 14:39:51|giving up after 0 retries
    INFO|wrapper|Service ***|23-11-29 14:39:51|stop from Thread yajsw.controller-1 reason: USER
    INFO|wrapper|Service ***|23-11-29 14:39:51|process not in state RUNNING -> Delaying stop
    INFO|wrapper|Service ***|23-11-29 14:39:51|GetExitCodeProcess returned 0
    INFO|wrapper|Service ***|23-11-29 14:39:51|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:39:51|is running: false 29956 0
    INFO|wrapper|Service ***|23-11-29 14:39:51|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:39:51|is running: false 29956 0
    INFO|wrapper|Service ***|23-11-29 14:39:51|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:39:51|is running: false 29956 0
    INFO|wrapper|Service ***|23-11-29 14:39:51|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:39:51|is running: false 29956 0
    INFO|wrapper|Service ***|23-11-29 14:39:52|process handles destroyed -1
    INFO|29956/0|Service ***|23-11-29 14:39:52|gobler terminated ERROR 29956
    INFO|29956/0|Service ***|23-11-29 14:39:52|gobler terminated OUTPUT 29956
    INFO|wrapper|Service ***|23-11-29 14:39:52|getExitCode 0 processINFO==null=true
    INFO|wrapper|Service ***|23-11-29 14:39:52|process exit code: 0
    INFO|wrapper|Service ***|23-11-29 14:39:52|set state STATE_USER_STOP->IDLE
    INFO|wrapper|Service ***|23-11-29 14:39:52|set state IDLE->STATE_SHUTDOWN
    INFO|wrapper|Service ***|23-11-29 14:39:52|getExitCode 0 processINFO==null=true
    INFO|wrapper|Service ***|23-11-29 14:39:52|Win service stop - after shutdown
    INFO|wrapper|Service ***|23-11-29 14:39:52|shutdown wrapper due to exit code rule
    INFO|wrapper|Service ***|23-11-29 14:39:52|Win service stop - before notify
    INFO|wrapper|Service ***|23-11-29 14:39:52|stop from Thread yajsw.controller-1 reason: WRAPPER SHUTDOWN
    INFO|wrapper|Service ***|23-11-29 14:39:52|Win service terminated
    INFO|wrapper|Service ***|23-11-29 14:39:52|reporting status 1 1 0
    INFO|wrapper|Service ***|23-11-29 14:39:52|process not in state RUNNING -> Delaying stop
    INFO|wrapper|Service ***|23-11-29 14:39:52|Win service: terminated correctly
    WARNING|wrapper|Service ***|23-11-29 14:40:33|YAJSW: yajsw-stable-13.10
    WARNING|wrapper|Service ***|23-11-29 14:40:33|OS   : Windows 10/10.0/amd64
    WARNING|wrapper|Service ***|23-11-29 14:40:33|JVM  : Amazon.com Inc./17.0.9/C:\Program Files\Amazon Corretto\jdk17.0.9_8/64
    INFO|wrapper|Service ***|23-11-29 14:40:33|start delay: 0
    INFO|wrapper|Service ***|23-11-29 14:40:33|Win service: before service init
    INFO|wrapper|Service ***|23-11-29 14:40:33|start from Thread pool-1-thread-1
    INFO|wrapper|Service ***|23-11-29 14:40:33|set state IDLE->STARTING
    INFO|wrapper|Service ***|23-11-29 14:40:33|starting Process
    INFO|wrapper|Service ***|23-11-29 14:40:33|starting controller
    INFO|wrapper|Service ***|23-11-29 14:40:33|binding to port 15004
    INFO|wrapper|Service ***|23-11-29 14:40:33|+ ServiceMain callback
    INFO|wrapper|Service ***|23-11-29 14:40:33|reporting status 0 2 5000
    INFO|wrapper|Service ***|23-11-29 14:40:33|reporting status 0 4 0
    INFO|wrapper|Service ***|23-11-29 14:40:33|onstart
    INFO|wrapper|Service ***|23-11-29 14:40:33|Controller State: UNKNOWN -> WAITING
    INFO|wrapper|Service ***|23-11-29 14:40:33|binding successfull
    INFO|wrapper|Service ***|23-11-29 14:40:33|controller started
    INFO|wrapper|Service ***|23-11-29 14:40:33|spawning wrapped process
    INFO|wrapper|Service ***|23-11-29 14:40:33|is running: false pid=(-1<=0)
    INFO|wrapper|Service ***|23-11-29 14:40:33|exec: "C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin\java.exe" -classpath "C:\Program Files (x86)\***\lib\yajsw\wrapperApp.jar;C:\Program Files (x86)\***\lib\yajsw\lib\core\permit\permit-reflect-0.4.jar;C:\Program Files (x86)\***\lib\***-***.jar" -Dlogging.config=lib\logback.xml -Xmx3g "-Djava.io.tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\/..\..\..\tmp" -Dwrapper.port=15004 -Xrs -Dwrapper.service=true -Dwrapper.console.visible=false "-Djna_tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Dwrapper_home=C:\Program Files (x86)\***\lib\yajsw\bat\/.." -Dwrapper.port=15004 -Dwrapper.key=-**** -Dwrapper.teeName=-**** "-Dwrapper.tmp.path=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Djna_tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Dwrapper.config=C:\Program Files (x86)\***\lib\yajsw\conf\wrapper.conf" -Dwrapper.additional.1x=-Xrs "-Dwrapper.working.dir=C:\Program Files (x86)\***" org.rzo.yajsw.app.WrapperJVMMain 
    INFO|wrapper|Service ***|23-11-29 14:40:33|started process with pid 9180
    INFO|wrapper|Service ***|23-11-29 14:40:33|waiting for termination of process
    INFO|wrapper|Service ***|23-11-29 14:40:33|set state STARTING->RUNNING
    INFO|wrapper|Service ***|23-11-29 14:40:34|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:40:34|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:40:34|is running: true 9180 -2
    INFO|wrapper|Service ***|23-11-29 14:40:34|waitFor -1
    INFO|wrapper|Service ***|23-11-29 14:40:34|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:40:34|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:40:34|is running: true 9180 -2
    INFO|wrapper|Service ***|23-11-29 14:40:34|1waitFor 
    INFO|wrapper|Service ***|23-11-29 14:40:34|2waitFor 
    INFO|wrapper|Service ***|23-11-29 14:40:34|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:40:34|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:40:34|is running: true 9180 -2
    INFO|wrapper|Service ***|23-11-29 14:40:34|WaitForSingleObject +
    INFO|9180/0|Service ***|23-11-29 14:40:34|APP user name=******2$
    INFO|9180/0|Service ***|23-11-29 14:40:34|APP working dir=C:\Program Files (x86)\***
    INFO|9180/0|Service ***|23-11-29 14:40:34|APP java version=17.0.9
    INFO|9180/0|Service ***|23-11-29 14:40:34|APP class path=C:\Program Files (x86)\***\lib\yajsw\wrapperApp.jar;C:\Program Files (x86)\***\lib\yajsw\lib\core\permit\permit-reflect-0.4.jar;C:\Program Files (x86)\***\lib\***-***.jar
    INFO|9180/0|Service ***|23-11-29 14:40:34|APP library path=C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Users\***\Scripts\;C:\Users\***\;C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Users\***\Desktop\***_***_v2\***\src\main\resources\python\dlls;C:\Program Files\dotnet\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;.
    INFO|9180/0|Service ***|23-11-29 14:40:34|Application args: no args
    INFO|9180/0|Service ***|23-11-29 14:40:34|mainClass/jar/script/module: null/lib\***-***.jar/null/null
    INFO|9180/0|Service ***|23-11-29 14:40:34|external stop false
    INFO|9180/0|Service ***|23-11-29 14:40:34|args: 
    INFO|9180/0|Service ***|23-11-29 14:40:34|terminated WrapperManager.init()
    INFO|9180/0|Service ***|23-11-29 14:40:34|connecting to port 15004
    ..........
    INFO|9180/0|Service ***|23-11-29 14:40:34|jvm controller: netty logger set
    INFO|9180/0|Service ***|23-11-29 14:40:34|Controller State: WAITING -> ESTABLISHED
    INFO|9180/0|Service ***|23-11-29 14:40:34|WrapperManager: channel connected, sending key
    INFO|9180/0|Service ***|23-11-29 14:40:35|Controller State: ESTABLISHED -> LOGGED_ON
    INFO|9180/0|Service ***|23-11-29 14:40:35|
    INFO|9180/0|Service ***|23-11-29 14:40:51|main method terminated
    INFO|9180/0|Service ***|23-11-29 14:40:51|exit on main terminate -1
    INFO|wrapper|Service ***|23-11-29 14:41:33|Win32Service.callback 1
    INFO|wrapper|Service ***|23-11-29 14:41:33|reporting status 1 3 30000
    INFO|wrapper|Service ***|23-11-29 14:41:33|Win service stop - timeout: 30000
    INFO|wrapper|Service ***|23-11-29 14:41:33|Win service wrapper.control -> stopping application
    INFO|wrapper|Service ***|23-11-29 14:41:33|stop from Thread pool-1-thread-3 reason: SERVICE
    INFO|wrapper|Service ***|23-11-29 14:41:33|set state RUNNING->STATE_USER_STOP
    INFO|wrapper|Service ***|23-11-29 14:41:33|stopping process with pid/timeout 9180 45000
    INFO|9180/0|Service ***|23-11-29 14:41:33|Controller State: LOGGED_ON -> USER_STOP
    INFO|9180/0|Service ***|23-11-29 14:41:33|controller sending a stop command
    INFO|9180/0|Service ***|23-11-29 14:41:34|Controller State: USER_STOP -> WAITING_CLOSED
    INFO|9180/0|Service ***|23-11-29 14:41:34|session closed -> waiting
    INFO|9180/0|Service ***|23-11-29 14:41:34|wrapper manager received Message:STOP::SERVICE
    INFO|wrapper|Service ***|23-11-29 14:41:34|WaitForSingleObject -
    INFO|wrapper|Service ***|23-11-29 14:41:34|WaitForSingleObject terminated PID: 9180
    INFO|9180/0|Service ***|23-11-29 14:41:34|session closed -> waiting
    INFO|wrapper|Service ***|23-11-29 14:41:34|waitFor 45000
    INFO|wrapper|Service ***|23-11-29 14:41:34|GetExitCodeProcess returned 0
    INFO|wrapper|Service ***|23-11-29 14:41:34|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:34|is running: false 9180 0
    INFO|9180/0|Service ***|23-11-29 14:41:34|process terminated
    INFO|wrapper|Service ***|23-11-29 14:41:34|getExitCode 0 processINFO==null=false
    INFO|9180/0|Service ***|23-11-29 14:41:34|Controller State: WAITING_CLOSED -> PROCESS_KILLED
    INFO|wrapper|Service ***|23-11-29 14:41:34|giving up after 0 retries
    INFO|wrapper|Service ***|23-11-29 14:41:34|stop from Thread yajsw.controller-1 reason: USER
    INFO|wrapper|Service ***|23-11-29 14:41:34|process not in state RUNNING -> Delaying stop
    INFO|wrapper|Service ***|23-11-29 14:41:34|GetExitCodeProcess returned 0
    INFO|wrapper|Service ***|23-11-29 14:41:34|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:34|is running: false 9180 0
    INFO|wrapper|Service ***|23-11-29 14:41:34|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:34|is running: false 9180 0
    INFO|wrapper|Service ***|23-11-29 14:41:34|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:34|is running: false 9180 0
    INFO|wrapper|Service ***|23-11-29 14:41:34|getExitCode 0 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:34|is running: false 9180 0
    INFO|wrapper|Service ***|23-11-29 14:41:35|process handles destroyed -1
    INFO|9180/0|Service ***|23-11-29 14:41:35|gobler terminated ERROR 9180
    INFO|9180/0|Service ***|23-11-29 14:41:35|gobler terminated OUTPUT 9180
    INFO|wrapper|Service ***|23-11-29 14:41:35|getExitCode 0 processINFO==null=true
    INFO|wrapper|Service ***|23-11-29 14:41:35|process exit code: 0
    INFO|wrapper|Service ***|23-11-29 14:41:35|set state STATE_USER_STOP->IDLE
    INFO|wrapper|Service ***|23-11-29 14:41:35|set state IDLE->STATE_SHUTDOWN
    INFO|wrapper|Service ***|23-11-29 14:41:35|getExitCode 0 processINFO==null=true
    INFO|wrapper|Service ***|23-11-29 14:41:35|Win service stop - after shutdown
    INFO|wrapper|Service ***|23-11-29 14:41:35|shutdown wrapper due to exit code rule
    INFO|wrapper|Service ***|23-11-29 14:41:35|Win service stop - before notify
    INFO|wrapper|Service ***|23-11-29 14:41:35|stop from Thread yajsw.controller-1 reason: WRAPPER SHUTDOWN
    INFO|wrapper|Service ***|23-11-29 14:41:35|Win service terminated
    INFO|wrapper|Service ***|23-11-29 14:41:35|process not in state RUNNING -> Delaying stop
    INFO|wrapper|Service ***|23-11-29 14:41:35|reporting status 1 1 0
    INFO|wrapper|Service ***|23-11-29 14:41:35|Win service: terminated correctly
    WARNING|wrapper|Service ***|23-11-29 14:41:36|YAJSW: yajsw-stable-13.10
    WARNING|wrapper|Service ***|23-11-29 14:41:36|OS   : Windows 10/10.0/amd64
    WARNING|wrapper|Service ***|23-11-29 14:41:36|JVM  : Amazon.com Inc./17.0.9/C:\Program Files\Amazon Corretto\jdk17.0.9_8/64
    INFO|wrapper|Service ***|23-11-29 14:41:36|start delay: 0
    INFO|wrapper|Service ***|23-11-29 14:41:36|start from Thread pool-1-thread-1
    INFO|wrapper|Service ***|23-11-29 14:41:36|Win service: before service init
    INFO|wrapper|Service ***|23-11-29 14:41:36|set state IDLE->STARTING
    INFO|wrapper|Service ***|23-11-29 14:41:36|starting Process
    INFO|wrapper|Service ***|23-11-29 14:41:36|starting controller
    INFO|wrapper|Service ***|23-11-29 14:41:36|binding to port 15004
    INFO|wrapper|Service ***|23-11-29 14:41:36|+ ServiceMain callback
    INFO|wrapper|Service ***|23-11-29 14:41:36|reporting status 0 2 5000
    INFO|wrapper|Service ***|23-11-29 14:41:36|reporting status 0 4 0
    INFO|wrapper|Service ***|23-11-29 14:41:36|onstart
    INFO|wrapper|Service ***|23-11-29 14:41:36|Controller State: UNKNOWN -> WAITING
    INFO|wrapper|Service ***|23-11-29 14:41:36|binding successfull
    INFO|wrapper|Service ***|23-11-29 14:41:36|controller started
    INFO|wrapper|Service ***|23-11-29 14:41:36|working dir C:\Program Files (x86)\***
    INFO|wrapper|Service ***|23-11-29 14:41:36|spawning wrapped process
    INFO|wrapper|Service ***|23-11-29 14:41:36|is running: false pid=(-1<=0)
    INFO|wrapper|Service ***|23-11-29 14:41:36|exec: "C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin\java.exe" -classpath "C:\Program Files (x86)\***\lib\yajsw\wrapperApp.jar;C:\Program Files (x86)\***\lib\yajsw\lib\core\permit\permit-reflect-0.4.jar;C:\Program Files (x86)\***\lib\***-***.jar" -Dlogging.config=lib\logback.xml -Xmx3g "-Djava.io.tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\/..\..\..\tmp" -Dwrapper.port=15004 -Xrs -Dwrapper.service=true -Dwrapper.console.visible=false "-Djna_tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Dwrapper_home=C:\Program Files (x86)\***\lib\yajsw\bat\/.." -Dwrapper.port=15004 -Dwrapper.key=-*****-Dwrapper.teeName=-***"-Dwrapper.tmp.path=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Djna_tmpdir=C:\Program Files (x86)\***\lib\yajsw\bat\..\tmp" "-Dwrapper.config=C:\Program Files (x86)\***\lib\yajsw\conf\wrapper.conf" -Dwrapper.additional.1x=-Xrs "-Dwrapper.working.dir=C:\Program Files (x86)\***" org.rzo.yajsw.app.WrapperJVMMain 
    INFO|wrapper|Service ***|23-11-29 14:41:36|started process with pid 18400
    INFO|wrapper|Service ***|23-11-29 14:41:36|waiting for termination of process
    INFO|wrapper|Service ***|23-11-29 14:41:36|set state STARTING->RUNNING
    INFO|wrapper|Service ***|23-11-29 14:41:37|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:41:37|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:37|is running: true 18400 -2
    INFO|wrapper|Service ***|23-11-29 14:41:37|waitFor -1
    INFO|wrapper|Service ***|23-11-29 14:41:37|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:41:37|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:37|is running: true 18400 -2
    INFO|wrapper|Service ***|23-11-29 14:41:37|1waitFor 
    INFO|wrapper|Service ***|23-11-29 14:41:37|2waitFor 
    INFO|wrapper|Service ***|23-11-29 14:41:37|GetExitCodeProcess returned 259
    INFO|wrapper|Service ***|23-11-29 14:41:37|getExitCode -2 processINFO==null=false
    INFO|wrapper|Service ***|23-11-29 14:41:37|is running: true 18400 -2
    INFO|wrapper|Service ***|23-11-29 14:41:37|WaitForSingleObject +
    INFO|18400/0|Service ***|23-11-29 14:41:37|APP user name=******2$
    INFO|18400/0|Service ***|23-11-29 14:41:37|APP working dir=C:\Program Files (x86)\***
    INFO|18400/0|Service ***|23-11-29 14:41:37|APP java version=17.0.9
    INFO|18400/0|Service ***|23-11-29 14:41:37|APP class path=C:\Program Files (x86)\***\lib\yajsw\wrapperApp.jar;C:\Program Files (x86)\***\lib\yajsw\lib\core\permit\permit-reflect-0.4.jar;C:\Program Files (x86)\***\lib\***-***.jar
    INFO|18400/0|Service ***|23-11-29 14:41:37|APP library path=C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Users\***\Scripts\;C:\Users\***\;C:\Program Files\Amazon Corretto\jdk17.0.9_8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Users\***\Desktop\***_***_v2\***\src\main\resources\python\dlls;C:\Program Files\dotnet\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;.
    INFO|18400/0|Service ***|23-11-29 14:41:37|Application args: no args
    INFO|18400/0|Service ***|23-11-29 14:41:37|mainClass/jar/script/module: null/lib\***-***.jar/null/null
    INFO|18400/0|Service ***|23-11-29 14:41:37|external stop false
    INFO|18400/0|Service ***|23-11-29 14:41:37|args: 
    INFO|18400/0|Service ***|23-11-29 14:41:37|terminated WrapperManager.init()
    INFO|18400/0|Service ***|23-11-29 14:41:37|connecting to port 15004
    INFO|18400/0|Service ***|23-11-29 14:41:37|Added localhost IP addr: ******2/******
    INFO|18400/0|Service ***|23-11-29 14:41:37|Found multiple network internet addresses for canonical host name:
    INFO|18400/0|Service ***|23-11-29 14:41:37|   Added InetAddress ******2.***PL.local/1***
    

    BTW, further investigations showed that probably in the scenario when we:
    1. run stopService.bat
    2. close the Tray manually via the Icon
    3. run runConsole.bat
    4. run systemTrayIcon.bat

    ... the tray is connected to the Console rather than to the Service. So the Tray Icon is green but the reason is that the Console is working.

     

    Last edit: Kamil 2023-12-04
  • Kamil

    Kamil - 2023-11-29

    Please forgive me, above I pasted logs when I was playing around with JDK8. There should be everywhere Java 17, the behaviour is the same

     
  • Kamil

    Kamil - 2023-11-29

    I just corrected my previous error. Correct logs have been pasted in the post above

     

Log in to post a comment.