Menu

#47 General Ticket - Service does restart automatically on server reboot

Any
closed
nobody
None
5
2022-07-23
2022-02-25
Arushi Rai
No

Hi team,

I am using YAJSW version 12.05 for my service running on Photon OS - https://vmware.github.io/photon/assets/files/html/3.0/Introduction.html

Here is the snippet of wrapper conf:

#********************************************************************
# Wrapper Posix Daemon Properties
#********************************************************************
# Directory in which to create and execute daemon init scripts. Default: /etc/init.d
wrapper.daemon.dir =/etc/init.d

# Directory where to store the wrapper pid file. Default: /var/run
wrapper.daemon.pid.dir =${service_base}

# Directory in which to create K... and S... links. 
# Default: <wrapper.daemon.dir>/rcX.d
# For Ubuntu set to /etc/rcX.d
# The following grooy script should set it correctly for most distros
wrapper.daemon.run_level_dir=${if (new File('\/etc\/rc0.d').exists()) return '\/etc\/rcX.d' else return '\/etc\/init.d\/rcX.d'}

# Setting the runlevels and priorities for automatic startup and stop of the daemon.
# Similar syntax as the update_rc.d command
# Default: equivalent to default of update_rc.d
wrapper.daemon.update_rc = start 002 3 4 5 . stop 002 0 1 2 6

I have tried using the default config as well but it did not help.

When I check systemctl cat myservice I do not see [install] section which I cannot even add with systemctl enable myservice

Any guidance for this?
I can share the install logs if it is needed.

Discussion

  • Arushi Rai

    Arushi Rai - 2022-02-25

    Hi @rzo
    Do you have any recommendation for this?
    Is this supported by YAJSW?

     
  • Arushi Rai

    Arushi Rai - 2022-03-01

    Hi @rzo,
    Just checking to see if there is any recommendation for this?

     

    Last edit: Arushi Rai 2022-03-02
  • rzo

    rzo - 2022-03-02

    hello,
    1. i do not have photon os. i also could not find a vm for virtualbox. thus, i have no way to test.
    2. i suppose you are refering to your message here: https://sourceforge.net/p/yajsw/bugs/179/
    3. if so, pls check my answer there. set: https://sourceforge.net/p/yajsw/bugs/179/
    4. if there are still issues: pls post.

    -- Ron

     
  • Arushi Rai

    Arushi Rai - 2022-03-04

    Hi @rzo,
    I am currently facing two issues:

    ISSUE1:
    Upgrading YAJSW to 13.02 -
    https://sourceforge.net/p/yajsw/bugs/179/ issue I am actually facing when upgrading YAJSW to 13.02 which after making the change you suggested I do not see the "new File" error.
    However I am still seeing one issue with slf4j reference in velocity.
    Here is the log snippet if you have any idea:

    java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.rzo.yajsw.boot.WrapperExeBooter.main(WrapperExeBooter.java:49)
    Caused by: java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder
        at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:60)
        at org.apache.velocity.runtime.RuntimeInstance.<init>(RuntimeInstance.java:121)
        at org.apache.velocity.app.VelocityEngine.<init>(VelocityEngine.java:54)
        at org.rzo.yajsw.os.posix.PosixService.install(PosixService.java:409)
        at org.rzo.yajsw.wrapper.WrappedService.install(WrappedService.java:185)
        at org.rzo.yajsw.WrapperExe.doInstall(WrapperExe.java:395)
        at org.rzo.yajsw.WrapperExe.executeCommand(WrapperExe.java:168)
        at org.rzo.yajsw.WrapperExe.main(WrapperExe.java:126)
        ... 5 more
    Caused by: java.lang.ClassNotFoundException: org.slf4j.impl.StaticLoggerBinder
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        at org.rzo.yajsw.boot.WrapperClassLoader.findClass(WrapperClassLoader.java:82)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    

    I have slf4j under velocity:

    ls -lt extended/velocity/
    total 544
    -rwxr-xr-x 1 myuser users  16591 Mar  4 16:03 slf4j-api-1.5.0.jar
    -rwxr-xr-x 1 myuser users 531308 Feb  9 03:44 velocity-engine-core-2.3.jar
    

    ISSUE2:
    The second issue is about service not restarting automatically after server reboot.
    I am not sure if I am missing any config to make that work. Here is what I have:

    wrapper.daemon.dir =/etc/init.d
    
    wrapper.daemon.pid.dir =${service_base}
    
    wrapper.daemon.run_level_dir=${if (new File('/etc/rc0.d').exists()) return '/etc/rcX.d' else return '/etc/init.d/rcX.d'}
    
    wrapper.daemon.update_rc = start 002 3 4 5 . stop 002 0 1 2 6
    
     

    Last edit: Arushi Rai 2022-03-04
  • rzo

    rzo - 2022-03-04

    hello,

    concerning the first issue:
    pls try using yajsw 13.03 and let me know if this solves your issue.

    concerning second issue:
    this is probably a consequence of the first issue.

    -- Ron

     
  • Arushi Rai

    Arushi Rai - 2022-03-04

    @rzorzorzo Can you give this a try on CentOS?

     

    Last edit: Arushi Rai 2022-03-04
  • Arushi Rai

    Arushi Rai - 2022-03-04

    Hi @rzo
    Sure let me give 13.03 try for first issue.

    Regarding second issue, I see that on 12.05 as well.

     
  • Arushi Rai

    Arushi Rai - 2022-03-07

    Hi @rzo
    Upgrade to 13.03 is working fine so first issue is resolved.

    Now w.r.t service start at server reboot, that is still not working and should be reproducible on centos OS.

    I checked unit file for my service and I do not see [install] section added (which I think wrapper would add if it is supported).
    Refer Install directive for enable/disable service - https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files#install-section-directives

     
  • Arushi Rai

    Arushi Rai - 2022-03-07

    I cannot enable my service outside either:

    systemctl enable  myservice
    
    The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
    settings in the [Install] section, and DefaultInstance for template units).
    This means they are not meant to be enabled using systemctl.
    Possible reasons for having this kind of units are:
    1) A unit may be statically enabled by being symlinked from another unit's
       .wants/ or .requires/ directory.
    2) A unit's purpose may be to act as a helper for some other unit which has
       a requirement dependency on it.
    3) A unit may be started when needed via activation (socket, path, timer,
       D-Bus, udev, scripted systemctl call, ...).
    4) In case of template units, the unit is meant to be enabled with some
       instance name specified.
    
     

    Last edit: Arushi Rai 2022-03-07
  • rzo

    rzo - 2022-03-07

    hello,
    if i understand correctly: you have been able to install and start the service with release 13.03, but the service will not start automatically on server reboot.

    pls provide following information:
    - OS
    - JDK
    - copy of config file
    - copy of console output when installing the server.
    - copy of yajsw log file, in case one is created on server reboot
    - copy of /var/log/boot

    remember to remove personal information

    It works fine for me on Centos.

    -- Ron

     
  • Arushi Rai

    Arushi Rai - 2022-03-07

    Hi @rzo,
    Thats right. Install and start of service with release 13.03 is working fine but service will not start automatically on server reboot.
    Let me collect all the details you requested and I will get back to you.

    Meanwhile, in your setup what is the value for wrapper.daemon.update_rc that you are setting?

     

    Last edit: Arushi Rai 2022-03-07
  • Arushi Rai

    Arushi Rai - 2022-03-07

    @rzo,
    Requested details -

    OS: PhotonOS (RHEL based similar to CentOS)

    JDK - Zulu OpenJDK JRE 11.0.13

    Copy of config file:

    #********************************************************************
    # Java Executable Properties
    #********************************************************************
    # Java Application
    wrapper.java.command=/usr/java/jre/bin/java
    wrapper.ntservice.java.command=/usr/java/jre/bin/java
    
    #********************************************************************
    # working directory
    #********************************************************************
    wrapper.working.dir= ${myservice_base}
    
    #********************************************************************
    # tmp folder
    # yajsw creates temporary files named in_.. out_.. err_.. jna..
    # per default these are placed in jna.tmpdir.
    # jna.tmpdir is set in setenv batch file to <yajsw>/tmp
    #********************************************************************
    wrapper.tmp.path = ${jna_tmpdir}
    
    #********************************************************************
    # Application main class or native executable
    # One of the following properties MUST be defined
    #********************************************************************
    # or jar file
    wrapper.java.app.mainclass=com.server.MyServiceLauncher
    
    wrapper.java.classpath.1 =${myservice_base}/lib/*
    wrapper.java.classpath.2 =${myservice_base}/conf
    
    #Appliacation input arguments
    #wrapper.app.parameter.1 =
    
    #********************************************************************
    # Wrapper Logging Properties
    #********************************************************************
    
    # Pipe the STD out to wrapper.log
    wrapper.console.pipestreams=true
    
    # Format of output for the log file.  (See docs for formats)
    wrapper.logfile.format=LPTM
    
    # Log Level for log file output.  (See docs for log levels)
    wrapper.logfile.loglevel=DEBUG
    
    wrapper.logfile.umask=022
    
    # Log Level for console output.  (See docs for log levels)
    wrapper.console.loglevel=DEBUG
    
    # Log file to use for wrapper output logging.
    wrapper.logfile=${wrapper_home}/log/wrapper.log
    
    
    # Maximum size that the log file will be allowed to grow to before
    #  the log is rolled. Size is specified in bytes.  The default value
    #  of 0, disables log rolling by size.  May abbreviate with the 'k' (kB) or
    #  'm' (mB) suffix.  For example: 10m = 10 megabytes.
    # If wrapper.logfile does not contain the string ROLLNUM it will be automatically added as suffix of the file name
    wrapper.logfile.maxsize=10m
    
    # Maximum number of rolled log files which will be allowed before old
    #  files are deleted.  The default value of 0 implies no limit.
    wrapper.logfile.maxfiles=10
    
    
    #********************************************************************
    # Application Console Properties
    #********************************************************************
    # Title to use when running as a console
    wrapper.console.title=MyService
    
    #********************************************************************
    # Wrapper Windows Service and Posix Daemon Properties
    #********************************************************************
    # Name of the service
    wrapper.ntservice.name=myservice
    
    # Display name of the service
    wrapper.ntservice.displayname=MyService
    
    # Description of the service
    wrapper.ntservice.description=MyService
    
    #********************************************************************
    # Wrapper Posix Daemon Properties
    #********************************************************************
    # Directory in which to create and execute daemon init scripts. Default: /etc/init.d
    wrapper.daemon.dir =/etc/init.d
    
    # Directory where to store the wrapper pid file. Default: /var/run
    wrapper.daemon.pid.dir =${myservice_base}
    
    # Directory in which to create K... and S... links. 
    # Default: <wrapper.daemon.dir>/rcX.d
    # For Ubuntu set to /etc/rcX.d
    # The following grooy script should set it correctly for most distros
    wrapper.daemon.run_level_dir=${if (new File('/etc/rc0.d').exists()) return '/etc/rcX.d' else return '/etc/init.d/rcX.d'}
    
    # Setting the runlevels and priorities for automatic startup and stop of the daemon.
    # Similar syntax as the update_rc.d command
    # Default: equivalent to default of update_rc.d
    wrapper.daemon.update_rc = start 002 3 4 5 . stop 002 0 1 2 6
    
    #********************************************************************
    # Exit Code Properties
    # Restart on non zero exit code
    #********************************************************************
    wrapper.on_exit.0=SHUTDOWN
    wrapper.on_exit.default=RESTART
    
    
    
    wrapper.app.account=users\gateway
    
    #********************************************************************
    # Wrapper timeouts
    #********************************************************************
    # Number of seconds to allow between the time that the Wrapper starts the application
    # and the  application logon to the wrapper.
    # Default: 30 seconds
    wrapper.startup.timeout = 120
    
    # Number of seconds to allow between the time that the Wrapper asks the application to shutdown and the time that the JVM shuts down.
    # Default: 30 seconds
    wrapper.shutdown.timeout = 120
    
    # Number of seconds the wrapper waits for a ping message from the java application.
    # If no heart beat is received within a timeout the wrapper assumes that the application
    # is non responsive and will restart it.
    # Default: 30 seconds
    wrapper.ping.timeout = 60
    

    Install console output:

    openjdk version "11.0.13" 2021-10-19 LTS
    OpenJDK Runtime Environment Zulu11.52+14-SA (build 11.0.13+8-LTS)
    OpenJDK 64-Bit Server VM Zulu11.52+14-SA (build 11.0.13+8-LTS, mixed mode)
    Changing the owner and permission for /opt/arushi/myservice/service/myservice-unix/../..}
    Checking for configuration file: /opt/arushi/myservice/service/myservice-unix/../myservice-conf/myserviceServiceWrapper.conf
    Checking for user key at /opt/arushi/myservice/service/myservice-unix/../myservice-conf/myserviceServiceWrapper.conf
    User key value users\gateway
    Creating data certs directory: /opt/arushi/myservice/service/myservice-unix/../../data/certs
    Changing the owner to gateway for /opt/arushi/myservice/service/myservice-unix/../..
    log path key value /var/log/arushi/myservice
    Changing the permissions for myservice log dir: /var/log/arushi/myservice
    Permission for myservice directory are set.
    YAJSW: yajsw-stable-13.03
    OS   : Linux/4.19.225-3.ph3/amd64
    JVM  : Azul Systems, Inc./11.0.13//usr/java/jre/64
    Looking in classpath from {0} for {1}
    org.rzo.yajsw.boot.WrapperClassLoader@34033bd0
    /com/sun/jna/linux-x86-64/libjnidispatch.so
    Found library resource at {0}
    jar:file:/opt/arushi/myservice/service/./lib/core/jna/jna-5.10.0.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
    Extracting library to {0}
    /opt/arushi/myservice/service/myservice-unix/../tmp/jna5316282987716385333.tmp
    Trying {0}
    /opt/arushi/myservice/service/myservice-unix/../tmp/jna5316282987716385333.tmp
    Found jnidispatch at {0}
    /opt/arushi/myservice/service/myservice-unix/../tmp/jna5316282987716385333.tmp
    ************* INSTALLING myservice ***********************
    
    Mar 07, 2022 8:55:15 PM org.rzo.yajsw.os.posix.PosixService getPid
    INFO: wrapper pid file: /opt/arushi/myservice/wrapper.myservice.pid
    [main] WARN org.apache.velocity.deprecation - configuration key 'resource.loader' has been deprecated in favor of 'resource.loaders'
    [main] WARN org.apache.velocity.deprecation - configuration key 'file.resource.loader.path' has been deprecated in favor of 'resource.loader.file.path'
    Mar 07, 2022 8:55:15 PM org.rzo.yajsw.os.posix.PosixService install
    WARNING: created daemon script: /etc/rc.d/init.d/myservice.service
    Service myservice installed
    

    During start wrapper.log:

    WARNING|wrapper|22-03-07 20:50:54|YAJSW: yajsw-stable-13.03
    WARNING|wrapper|22-03-07 20:50:54|OS   : Linux/4.19.225-3.ph3/amd64
    WARNING|wrapper|22-03-07 20:50:54|JVM  : Azul Systems, Inc./11.0.13//usr/java/jre/64
    INFO|wrapper|22-03-07 20:50:54|exec:/usr/java/jre/bin/java -classpath /opt/arushi/myservice/service/wrapperApp.jar:/opt/arushi/myservice/service/lib/core/permit/permit-reflect-0.4.jar:/opt/arushi/myservice/lib/jaxb-core-2.3.0.jar:/opt/arushi/myservice/lib/littlemyservice-1.1.2-ntlm-20200218.jar:/opt/arushi/myservice/lib/saaj-impl-1.5.2.jar:/opt/arushi/myservice/lib/stax2-api-4.1.jar:/opt/arushi/myservice/lib/netty-codec-hamyservice-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-tcnative-classes-2.0.46.Final.jar:/opt/arushi/myservice/lib/failureaccess-1.0.1.jar:/opt/arushi/myservice/lib/jaxb-api-2.3.0.jar:/opt/arushi/myservice/lib/netty-transport-rxtx-4.1.73.Final.jar:/opt/arushi/myservice/lib/jakarta.jws-api-2.1.0.jar:/opt/arushi/myservice/lib/commons-lang3-3.5.jar:/opt/arushi/myservice/lib/pfl-tf-4.1.0.jar:/opt/arushi/myservice/lib/netty-handler-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-4.1.73.Final.jar:/opt/arushi/myservice/lib/FastInfoset-1.2.18.jar:/opt/arushi/myservice/lib/jna-platform-4.5.0.jar:/opt/arushi/myservice/lib/netty-codec-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-classes-epoll-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-sctp-4.1.73.Final.jar:/opt/arushi/myservice/lib/bcprov-jdk15on-1.69.jar:/opt/arushi/myservice/lib/jakarta.activation-1.2.2.jar:/opt/arushi/myservice/lib/threetenbp-1.3.6.jar:/opt/arushi/myservice/lib/netty-transport-native-kqueue-4.1.73.Final-osx-x86_64.jar:/opt/arushi/myservice/lib/commons-lang-2.6.jar:/opt/arushi/myservice/lib/commons-io-2.11.0.jar:/opt/arushi/myservice/lib/policy-2.7.10.jar:/opt/arushi/myservice/lib/netty-codec-mqtt-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-socks-4.1.73.Final.jar:/opt/arushi/myservice/lib/soapclient-1.0-SNAPSHOT.jar:/opt/arushi/myservice/lib/jakarta.xml.ws-api-2.3.3.jar:/opt/arushi/myservice/lib/netty-transport-native-kqueue-4.1.73.Final-osx-aarch_64.jar:/opt/arushi/myservice/lib/netty-resolver-dns-native-macos-4.1.73.Final-osx-x86_64.jar:/opt/arushi/myservice/lib/jakarta.xml.soap-api-1.4.2.jar:/opt/arushi/myservice/lib/management-api-3.2.2.jar:/opt/arushi/myservice/lib/netty-buffer-4.1.73.Final.jar:/opt/arushi/myservice/lib/slf4j-api-1.7.35.jar:/opt/arushi/myservice/lib/myservice_vole-1.0.1-20150218.jar:/opt/arushi/myservice/lib/dnsjava-3.4.3.jar:/opt/arushi/myservice/lib/commons-configuration-1.10.jar:/opt/arushi/myservice/lib/logback-core-1.2.9.jar:/opt/arushi/myservice/lib/jakarta.xml.bind-api-2.3.3.jar:/opt/arushi/myservice/lib/netty-transport-udt-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-http-4.1.73.Final.jar:/opt/arushi/myservice/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/opt/arushi/myservice/lib/netty-codec-dns-4.1.73.Final.jar:/opt/arushi/myservice/lib/diagnostic-library-1.0.0.jar:/opt/arushi/myservice/lib/commons-collections-3.2.2.jar:/opt/arushi/myservice/lib/stax-ex-1.8.3.jar:/opt/arushi/myservice/lib/commons-collections4-4.1.jar:/opt/arushi/myservice/lib/jsr305-3.0.2.jar:/opt/arushi/myservice/lib/commons-codec-1.11.jar:/opt/arushi/myservice/lib/lanterna-3.0.1.jar:/opt/arushi/myservice/lib/woodstox-core-5.1.0.jar:/opt/arushi/myservice/lib/bcutil-jdk15on-1.69.jar:/opt/arushi/myservice/lib/netty-transport-native-unix-common-4.1.73.Final.jar:/opt/arushi/myservice/lib/jakarta.activation-api-1.2.1.jar:/opt/arushi/myservice/lib/jaxws-rt-2.3.3.jar:/opt/arushi/myservice/lib/netty-all-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-resolver-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-resolver-dns-native-macos-4.1.73.Final-osx-aarch_64.jar:/opt/arushi/myservice/lib/jcifs-1.3.17.jar:/opt/arushi/myservice/lib/netty-transport-native-epoll-4.1.73.Final-linux-aarch_64.jar:/opt/arushi/myservice/lib/streambuffer-1.5.9.jar:/opt/arushi/myservice/lib/netty-handler-myservice-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-classes-kqueue-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-redis-4.1.73.Final.jar:/opt/arushi/myservice/lib/jaxb-impl-2.3.0.jar:/opt/arushi/myservice/lib/j2objc-annotations-1.3.jar:/opt/arushi/myservice/lib/jackson-annotations-2.13.1.jar:/opt/arushi/myservice/lib/netty-codec-memcache-4.1.73.Final.jar:/opt/arushi/myservice/lib/guava-31.0.1-jre.jar:/opt/arushi/myservice/lib/pfl-basic-4.1.0.jar:/opt/arushi/myservice/lib/ha-api-3.1.12.jar:/opt/arushi/myservice/lib/mimepull-1.9.13.jar:/opt/arushi/myservice/lib/netty-codec-stomp-4.1.73.Final.jar:/opt/arushi/myservice/lib/myservice-22.03.jar:/opt/arushi/myservice/lib/javax.activation-1.2.0.jar:/opt/arushi/myservice/lib/netty-common-4.1.73.Final.jar:/opt/arushi/myservice/lib/jcl-over-slf4j-1.7.35.jar:/opt/arushi/myservice/lib/netty-codec-http2-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-smtp-4.1.73.Final.jar:/opt/arushi/myservice/lib/oshi-core-3.4.4.jar:/opt/arushi/myservice/lib/netty-resolver-dns-classes-macos-4.1.73.Final.jar:/opt/arushi/myservice/lib/httpcore-4.4.13.jar:/opt/arushi/myservice/lib/error_prone_annotations-2.7.1.jar:/opt/arushi/myservice/lib/netty-codec-xml-4.1.73.Final.jar:/opt/arushi/myservice/lib/jackson-module-jaxb-annotations-2.13.1.jar:/opt/arushi/myservice/lib/logback-classic-1.2.9.jar:/opt/arushi/myservice/lib/ehcache-core-2.6.11.jar:/opt/arushi/myservice/lib/gmbal-4.0.1.jar:/opt/arushi/myservice/lib/jakarta.annotation-api-1.3.5.jar:/opt/arushi/myservice/lib/jna-4.5.0.jar:/opt/arushi/myservice/lib/jackson-core-2.13.1.jar:/opt/arushi/myservice/lib/httpclient-4.5.13.jar:/opt/arushi/myservice/lib/netty-resolver-dns-4.1.73.Final.jar:/opt/arushi/myservice/lib/checker-qual-3.12.0.jar:/opt/arushi/myservice/lib/bcpkix-jdk15on-1.69.jar:/opt/arushi/myservice/lib/netty-transport-native-epoll-4.1.73.Final-linux-x86_64.jar:/opt/arushi/myservice/lib/jackson-databind-2.13.1.jar:/opt/arushi/myservice/lib/commons-chain-1.2.jar:/opt/arushi/myservice/conf -Dmyservice_HOME=/opt/arushi/myservice/service/myservice-unix/../.. -Dmyservice_LOGS=/var/log/arushi/myservice -XX:+UseConcMarkSweepGC -XX:+AggressiveOpts -Xms512m -Xmx1g -Djavax.net.debug=ssl -Djdk.tls.disabledAlgorithms=MD5,RC4,TLSv1,SSLv2Hello,SSLv3 -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -Dhttps.protocols=TLSv1.1,TLSv1.2 -Dnet.sf.ehcache.skipUpdateCheck=true -Djava.io.tmpdir=/opt/arushi/tmp -Xrs -Dwrapper.service=true -Dwrapper.console.visible=false -Djna_tmpdir=/opt/arushi/myservice/service/myservice-unix/../tmp -Dwrapper_home=/opt/arushi/myservice/service/myservice-unix/.. -Dprxy_base=/opt/arushi/myservice/service/myservice-unix/../.. -Dwrapper.port=15003 -Dwrapper.key=5186380058006995137 -Dwrapper.tmp.path=/opt/arushi/myservice/service/myservice-unix/../tmp -Djna_tmpdir=/opt/arushi/myservice/service/myservice-unix/../tmp -Dwrapper.config=/opt/arushi/myservice/service/myservice-conf/myserviceServiceWrapper.conf -Dwrapper.pidfile=/opt/arushi/myservice/wrapper.myservice.pid -Dwrapper.visible=false org.rzo.yajsw.app.WrapperJVMMain 
    INFO|wrapper|22-03-07 20:50:54|posix_spawn pid 15705
    INFO|wrapper|22-03-07 20:50:54|started process 15705
    INFO|wrapper|22-03-07 20:50:54|started process with pid 15705
    INFO|15705/0|22-03-07 20:50:54|Looking in classpath from {0} for {1}
    INFO|15705/0|22-03-07 20:50:54|jdk.internal.loader.ClassLoaders$AppClassLoader@5cb0d902
    INFO|15705/0|22-03-07 20:50:54|/com/sun/jna/linux-x86-64/libjnidispatch.so
    INFO|15705/0|22-03-07 20:50:54|Found library resource at {0}
    INFO|15705/0|22-03-07 20:50:54|jar:file:/opt/arushi/myservice/service/lib/core/jna/jna-5.10.0.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
    INFO|15705/0|22-03-07 20:50:54|Extracting library to {0}
    INFO|15705/0|22-03-07 20:50:54|/opt/arushi/myservice/service/myservice-unix/../tmp/jna861071931866445376.tmp
    INFO|15705/0|22-03-07 20:50:54|Trying {0}
    INFO|15705/0|22-03-07 20:50:54|/opt/arushi/myservice/service/myservice-unix/../tmp/jna861071931866445376.tmp
    INFO|15705/0|22-03-07 20:50:54|Found jnidispatch at {0}
    INFO|15705/0|22-03-07 20:50:54|/opt/arushi/myservice/service/myservice-unix/../tmp/jna861071931866445376.tmp
    INFO|15705/0|22-03-07 20:50:54|switch group root -> users
    INFO|15705/0|22-03-07 20:50:54|switch user root -> gateway
    INFO|15705/0|22-03-07 20:50:54|/usr/java/jre/bin/java
    INFO|15705/0|22-03-07 20:50:54|-classpath
    INFO|15705/0|22-03-07 20:50:54|/opt/arushi/myservice/service/wrapperApp.jar:/opt/arushi/myservice/service/lib/core/permit/permit-reflect-0.4.jar:/opt/arushi/myservice/lib/jaxb-core-2.3.0.jar:/opt/arushi/myservice/lib/littlemyservice-1.1.2-ntlm-20200218.jar:/opt/arushi/myservice/lib/saaj-impl-1.5.2.jar:/opt/arushi/myservice/lib/stax2-api-4.1.jar:/opt/arushi/myservice/lib/netty-codec-hamyservice-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-tcnative-classes-2.0.46.Final.jar:/opt/arushi/myservice/lib/failureaccess-1.0.1.jar:/opt/arushi/myservice/lib/jaxb-api-2.3.0.jar:/opt/arushi/myservice/lib/netty-transport-rxtx-4.1.73.Final.jar:/opt/arushi/myservice/lib/jakarta.jws-api-2.1.0.jar:/opt/arushi/myservice/lib/commons-lang3-3.5.jar:/opt/arushi/myservice/lib/pfl-tf-4.1.0.jar:/opt/arushi/myservice/lib/netty-handler-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-4.1.73.Final.jar:/opt/arushi/myservice/lib/FastInfoset-1.2.18.jar:/opt/arushi/myservice/lib/jna-platform-4.5.0.jar:/opt/arushi/myservice/lib/netty-codec-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-classes-epoll-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-sctp-4.1.73.Final.jar:/opt/arushi/myservice/lib/bcprov-jdk15on-1.69.jar:/opt/arushi/myservice/lib/jakarta.activation-1.2.2.jar:/opt/arushi/myservice/lib/threetenbp-1.3.6.jar:/opt/arushi/myservice/lib/netty-transport-native-kqueue-4.1.73.Final-osx-x86_64.jar:/opt/arushi/myservice/lib/commons-lang-2.6.jar:/opt/arushi/myservice/lib/commons-io-2.11.0.jar:/opt/arushi/myservice/lib/policy-2.7.10.jar:/opt/arushi/myservice/lib/netty-codec-mqtt-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-socks-4.1.73.Final.jar:/opt/arushi/myservice/lib/soapclient-1.0-SNAPSHOT.jar:/opt/arushi/myservice/lib/jakarta.xml.ws-api-2.3.3.jar:/opt/arushi/myservice/lib/netty-transport-native-kqueue-4.1.73.Final-osx-aarch_64.jar:/opt/arushi/myservice/lib/netty-resolver-dns-native-macos-4.1.73.Final-osx-x86_64.jar:/opt/arushi/myservice/lib/jakarta.xml.soap-api-1.4.2.jar:/opt/arushi/myservice/lib/management-api-3.2.2.jar:/opt/arushi/myservice/lib/netty-buffer-4.1.73.Final.jar:/opt/arushi/myservice/lib/slf4j-api-1.7.35.jar:/opt/arushi/myservice/lib/myservice_vole-1.0.1-20150218.jar:/opt/arushi/myservice/lib/dnsjava-3.4.3.jar:/opt/arushi/myservice/lib/commons-configuration-1.10.jar:/opt/arushi/myservice/lib/logback-core-1.2.9.jar:/opt/arushi/myservice/lib/jakarta.xml.bind-api-2.3.3.jar:/opt/arushi/myservice/lib/netty-transport-udt-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-http-4.1.73.Final.jar:/opt/arushi/myservice/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/opt/arushi/myservice/lib/netty-codec-dns-4.1.73.Final.jar:/opt/arushi/myservice/lib/diagnostic-library-1.0.0.jar:/opt/arushi/myservice/lib/commons-collections-3.2.2.jar:/opt/arushi/myservice/lib/stax-ex-1.8.3.jar:/opt/arushi/myservice/lib/commons-collections4-4.1.jar:/opt/arushi/myservice/lib/jsr305-3.0.2.jar:/opt/arushi/myservice/lib/commons-codec-1.11.jar:/opt/arushi/myservice/lib/lanterna-3.0.1.jar:/opt/arushi/myservice/lib/woodstox-core-5.1.0.jar:/opt/arushi/myservice/lib/bcutil-jdk15on-1.69.jar:/opt/arushi/myservice/lib/netty-transport-native-unix-common-4.1.73.Final.jar:/opt/arushi/myservice/lib/jakarta.activation-api-1.2.1.jar:/opt/arushi/myservice/lib/jaxws-rt-2.3.3.jar:/opt/arushi/myservice/lib/netty-all-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-resolver-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-resolver-dns-native-macos-4.1.73.Final-osx-aarch_64.jar:/opt/arushi/myservice/lib/jcifs-1.3.17.jar:/opt/arushi/myservice/lib/netty-transport-native-epoll-4.1.73.Final-linux-aarch_64.jar:/opt/arushi/myservice/lib/streambuffer-1.5.9.jar:/opt/arushi/myservice/lib/netty-handler-myservice-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-transport-classes-kqueue-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-redis-4.1.73.Final.jar:/opt/arushi/myservice/lib/jaxb-impl-2.3.0.jar:/opt/arushi/myservice/lib/j2objc-annotations-1.3.jar:/opt/arushi/myservice/lib/jackson-annotations-2.13.1.jar:/opt/arushi/myservice/lib/netty-codec-memcache-4.1.73.Final.jar:/opt/arushi/myservice/lib/guava-31.0.1-jre.jar:/opt/arushi/myservice/lib/pfl-basic-4.1.0.jar:/opt/arushi/myservice/lib/ha-api-3.1.12.jar:/opt/arushi/myservice/lib/mimepull-1.9.13.jar:/opt/arushi/myservice/lib/netty-codec-stomp-4.1.73.Final.jar:/opt/arushi/myservice/lib/myservice-22.03.jar:/opt/arushi/myservice/lib/javax.activation-1.2.0.jar:/opt/arushi/myservice/lib/netty-common-4.1.73.Final.jar:/opt/arushi/myservice/lib/jcl-over-slf4j-1.7.35.jar:/opt/arushi/myservice/lib/netty-codec-http2-4.1.73.Final.jar:/opt/arushi/myservice/lib/netty-codec-smtp-4.1.73.Final.jar:/opt/arushi/myservice/lib/oshi-core-3.4.4.jar:/opt/arushi/myservice/lib/netty-resolver-dns-classes-macos-4.1.73.Final.jar:/opt/arushi/myservice/lib/httpcore-4.4.13.jar:/opt/arushi/myservice/lib/error_prone_annotations-2.7.1.jar:/opt/arushi/myservice/lib/netty-codec-xml-4.1.73.Final.jar:/opt/arushi/myservice/lib/jackson-module-jaxb-annotations-2.13.1.jar:/opt/arushi/myservice/lib/logback-classic-1.2.9.jar:/opt/arushi/myservice/lib/ehcache-core-2.6.11.jar:/opt/arushi/myservice/lib/gmbal-4.0.1.jar:/opt/arushi/myservice/lib/jakarta.annotation-api-1.3.5.jar:/opt/arushi/myservice/lib/jna-4.5.0.jar:/opt/arushi/myservice/lib/jackson-core-2.13.1.jar:/opt/arushi/myservice/lib/httpclient-4.5.13.jar:/opt/arushi/myservice/lib/netty-resolver-dns-4.1.73.Final.jar:/opt/arushi/myservice/lib/checker-qual-3.12.0.jar:/opt/arushi/myservice/lib/bcpkix-jdk15on-1.69.jar:/opt/arushi/myservice/lib/netty-transport-native-epoll-4.1.73.Final-linux-x86_64.jar:/opt/arushi/myservice/lib/jackson-databind-2.13.1.jar:/opt/arushi/myservice/lib/commons-chain-1.2.jar:/opt/arushi/myservice/conf
    INFO|15705/0|22-03-07 20:50:54|-XX:+UseConcMarkSweepGC
    INFO|15705/0|22-03-07 20:50:54|-XX:+AggressiveOpts
    INFO|15705/0|22-03-07 20:50:54|-Xms512m
    INFO|15705/0|22-03-07 20:50:54|-Xmx1g
    INFO|15705/0|22-03-07 20:50:54|-Djavax.net.debug=ssl
    INFO|15705/0|22-03-07 20:50:54|-Djdk.tls.disabledAlgorithms=MD5,RC4,TLSv1,SSLv2Hello,SSLv3
    INFO|15705/0|22-03-07 20:50:54|-Djdk.tls.ephemeralDHKeySize=2048
    INFO|15705/0|22-03-07 20:50:54|-Djdk.tls.rejectClientInitiatedRenegotiation=true
    INFO|15705/0|22-03-07 20:50:54|-Dhttps.protocols=TLSv1.1,TLSv1.2
    INFO|15705/0|22-03-07 20:50:54|-Dnet.sf.ehcache.skipUpdateCheck=true
    INFO|15705/0|22-03-07 20:50:54|-Djava.io.tmpdir=/opt/arushi/tmp
    INFO|15705/0|22-03-07 20:50:54|-Xrs
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.service=true
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.console.visible=false
    INFO|15705/0|22-03-07 20:50:54|-Djna_tmpdir=/opt/arushi/myservice/service/myservice-unix/../tmp
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper_home=/opt/arushi/myservice/service/myservice-unix/..
    INFO|15705/0|22-03-07 20:50:54|-Dprxy_base=/opt/arushi/myservice/service/myservice-unix/../..
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.port=15003
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.key=5186380058006995137
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.tmp.path=/opt/arushi/myservice/service/myservice-unix/../tmp
    INFO|15705/0|22-03-07 20:50:54|-Djna_tmpdir=/opt/arushi/myservice/service/myservice-unix/../tmp
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.config=/opt/arushi/myservice/service/myservice-conf/myserviceServiceWrapper.conf
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.pidfile=/opt/arushi/myservice/wrapper.myservice.pid
    INFO|15705/0|22-03-07 20:50:54|-Dwrapper.visible=false
    INFO|15705/0|22-03-07 20:50:54|org.rzo.yajsw.app.WrapperJVMMain
    INFO|15705/0|22-03-07 20:50:54|OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    INFO|15705/0|22-03-07 20:50:54|OpenJDK 64-Bit Server VM warning: Option AggressiveOpts was deprecated in version 11.0 and will likely be removed in a future release.
    INFO|15705/0|22-03-07 20:50:55|YAJSW: yajsw-stable-13.03
    INFO|15705/0|22-03-07 20:50:55|OS   : Linux/4.19.225-3.ph3/amd64
    INFO|15705/0|22-03-07 20:50:55|JVM  : Azul Systems, Inc./11.0.13//usr/java/jre/64
    

    After Server Reboot wrapper.log:

    INFO|wrapper|22-03-07 21:19:09|Shutting down Wrapper
    INFO|wrapper|22-03-07 21:19:09|stopping process with pid/timeout 18573 135000
    INFO|wrapper|22-03-07 21:19:10|waitpid 18573 0
    INFO|wrapper|22-03-07 21:19:10|exit code posix process: 0 application(status/signal): 0/0
    INFO|wrapper|22-03-07 21:19:10|shutdown wrapper due to exit code rule
    INFO|wrapper|22-03-07 21:19:10|killing 18573
    INFO|wrapper|22-03-07 21:19:10|process exit code: 0
    

    No start logs as the service does not start.

    /var/log/boot.log:

    2022-02-24T02:53:01.566290+00:00 photon-machine root: vami_set_hostname, line 259: Host name has been set to arushi-host
    2022-02-24T02:53:01.570825+00:00 photon-machine root: vami_set_hostname, line 98: Inaccessible file: vami_access -rw /etc/mailname failed.
    2022-02-24T02:53:01.566084+00:00 photon-machine root[2225]: vami_set_hostname, line 259: Host name has been set to arushi-host
    2022-02-24T02:53:01.570700+00:00 photon-machine root[2230]: vami_set_hostname, line 98: Inaccessible file: vami_access -rw /etc/mailname failed.
    2022-02-24T02:53:01.566084+00:00 arushi-host root[2225]: vami_set_hostname, line 259: Host name has been set to arushi-host
    2022-02-24T02:53:01.570700+00:00 arushi-host root[2230]: vami_set_hostname, line 98: Inaccessible file: vami_access -rw /etc/mailname failed.
    2022-02-24T02:53:01.566084+00:00 arushi-host root[2225]: vami_set_hostname, line 259: Host name has been set to arushi-host
    2022-02-24T02:53:01.570700+00:00 arushi-host root[2230]: vami_set_hostname, line 98: Inaccessible file: vami_access -rw /etc/mailname failed.
    

    Let me know if you would like any other information.

     
  • rzo

    rzo - 2022-03-08

    hello,

    thanks for the information. pls proceed as follows:

    1. uninstall the daemon with bin/uninstallDaemon.sh

    2. in your wrapper configuration comment out:

      #wrapper.daemon.dir =

    3. in your wrapper configuration comment out:

      #wrapper.daemon.update_rc =

    4. edit the file templates/systemd.vm and add at the end the following:

      [Install]
      WantedBy=multi-user.target

    5. install the service with bin/installDaemon.sh

    let me know if this solves the issue.
    thanks for pointing this out. i will update the systemd.vm file for the next release.

     

    Last edit: rzo 2022-03-08
  • Arushi Rai

    Arushi Rai - 2022-03-08

    With these changes, service starts automatically on server reboot.

    I totally missed looking at systemd.vm template.
    Thank you so much @rzo for guiding me.

     
  • rzo

    rzo - 2022-07-23
    • status: open --> closed
     
  • rzo

    rzo - 2022-07-23

    release 13.04

     

Log in to post a comment.