Menu

#60 WARNING: no name for daemon -> abort

Any
open
nobody
None
5
2024-05-27
2024-05-17
No

I'm trying to install my service as daemon and I'm getting the following error:

I have the following properties set:

Name of the service

wrapper.ntservice.name=mq

Display name of the service

wrapper.ntservice.displayname=MQ

Description of the service

wrapper.ntservice.description=MQ Service

wrapper.name=mq

++++++++++ YAJSW SET ENV ++++++++++
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9-LTS, mixed mode, sharing)
wrapper home : /opt/app/yajsw
configuration: /opt/app/yajsw/conf/wrapper.conf
openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9-LTS, mixed mode, sharing)
---------- YAJSW SET ENV ----------
YAJSW: yajsw-stable-13.12
OS   : Linux/4.18.0-425.3.1.el8.x86_64/amd64
JVM  : Red Hat, Inc./21.0.3//usr/lib/jvm/java-21-openjdk-21.0.3.0.9-1.el8.x86_64/64
Looking in classpath from org.rzo.yajsw.boot.WrapperClassLoader@279f2327 for /com/sun/jna/linux-x86-64/libjnidispatch.so
Found library resource at jar:file:/opt/app/yajsw/./lib/core/jna/jna-5.12.1.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
Extracting library to /opt/app/yajsw/tmp/jna656005716524589276.tmp
Trying /opt/app/yajsw/tmp/jna656005716524589276.tmp
Found jnidispatch at /opt/app/yajsw/tmp/jna656005716524589276.tmp
setCliProperties []
May 17, 2024 1:53:50 PM org.rzo.yajsw.os.posix.PosixService init
WARNING: no name for daemon -> abort
************* INSTALLING null ***********************

java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:115)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.rzo.yajsw.boot.WrapperExeBooter.main(WrapperExeBooter.java:49)
Caused by: java.lang.NullPointerException
        at java.base/java.io.File.<init>(File.java:278)
        at org.rzo.yajsw.os.posix.PosixService.state(PosixService.java:731)
        at org.rzo.yajsw.wrapper.WrappedService.state(WrappedService.java:621)
        at org.rzo.yajsw.wrapper.WrappedService.isInstalled(WrappedService.java:378)
        at org.rzo.yajsw.WrapperExe.doInstall(WrapperExe.java:374)
        at org.rzo.yajsw.WrapperExe.executeCommand(WrapperExe.java:169)
        at org.rzo.yajsw.WrapperExe.main(WrapperExe.java:127)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        ... 2 more

Discussion

  • rzo

    rzo - 2024-05-17

    hello,

    it seems as if yajsw is not using the config file shown here.
    pls provide more details:
    - are you upgrading from an older yajsw installation ?
    - how did you install ?
    - how did you create the conf file ?
    - maybe there are some non printable characters in the conf file. maybe not UTF-8 ?

    the message "no name for daemon" indicates that wrapper.ntservice.name is not set.

    -- Ron

     
  • Juan Marques

    Juan Marques - 2024-05-21

    Hello Ron!

    I'm upgrading from 13.3 to the latest version which support java 21.

    I have been using the same conf file for years now..

    Please take a look on the full conf file.

    Kind regards,

    Juan Marques

     
  • rzo

    rzo - 2024-05-26

    hello,

    your wrapper.conf is for an older version of yajsw. pls compare it with the wrapper.conf.default file in the current release. (see the section wrapper posix systemd props).

    however the file should also work with the current release.

    as stated i have the feeling that your installation is not ok.
    you are using the wrong conf file or an empty one.
    i propose that you redo everything from scratch as described in the documentation (quick start).

    -- Ron

     
  • Juan Marques

    Juan Marques - 2024-05-27

    Hi Ron,

    I've updated the installDaemonNoPriv.sh script for installing the YAJSW daemon with the following changes:

    Source Command Quotation Fix:

    Changed source "$PRGDIR"/setenv.sh to source "$PRGDIR/setenv.sh".
    This fixes potential issues with the quotation marks, ensuring the correct path is sourced.
    Configuration File Argument Check:

    Added a check to ensure a configuration file is provided as an argument when running the script.
    If no argument is given, the script will now output a message and exit.
    This ensures the script always has the necessary configuration file to function.
    Best regards,

    Juan

     
  • rzo

    rzo - 2024-05-27

    thanks for the feedback

     

Log in to post a comment.