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.
Hi @rzo
Do you have any recommendation for this?
Is this supported by YAJSW?
Hi @rzo,
Just checking to see if there is any recommendation for this?
Last edit: Arushi Rai 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
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:
I have slf4j under velocity:
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:
Last edit: Arushi Rai 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
@rzorzorzo Can you give this a try on CentOS?
Last edit: 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.
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
I cannot enable my service outside either:
Last edit: Arushi Rai 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
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
@rzo,
Requested details -
OS: PhotonOS (RHEL based similar to CentOS)
JDK - Zulu OpenJDK JRE 11.0.13
Copy of config file:
Install console output:
During start wrapper.log:
After Server Reboot wrapper.log:
No start logs as the service does not start.
/var/log/boot.log:
Let me know if you would like any other information.
hello,
thanks for the information. pls proceed as follows:
uninstall the daemon with bin/uninstallDaemon.sh
in your wrapper configuration comment out:
in your wrapper configuration comment out:
edit the file templates/systemd.vm and add at the end the following:
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
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.
release 13.04