0

I want jboss to start on boot. I created a simple script on rc.local

nohup /data/jboss-eap-7.2/bin/startup-server.sh 0.0.0.0 &

It started after booting, but when I check the log, there's some point where jboss stopped and the program restarted and ran again. How do I make it so Jboss just runs normally without stopping and restarting?

alya
  • 1
  • `there's some point` just the one? what `point` is it? or, perhaps it has to do with [this](https://www.ibm.com/support/pages/jboss-server-regularly-restarting-when-running-collaboration-and-deployment-services-cds-jobs-jobs-failing-error) – Jaromanda X Jul 04 '23 at 04:01
  • 1
    If your Linux distribution (some version of CentOS according to the tags?) uses `systemd`, the `rc.local` might run too early in the boot process. On a classic SysVinit `rc.local` typically runs at the very end of the boot process, but `systemd` does things differently: unless you define explicit dependencies for `rc.local` (typically using an override file), there is a high probability the script is executed while the network is not yet fully configured, causing JBoss to initially fail. Consider writing your own `.service` file instead of relying on legacy compatibility. – telcoM Jul 04 '23 at 04:14
  • Hello, @JaromandaX I don't think it has to do with it, because if I run the startup-server script manually it works just fine and not stopping and restarting. However, if I run it from rc.local it keeps stopping and restarting, I said at some point means, I don't precisely can say how long or where it takes to stop and restart again, but I think it was when the startup-server script called deploy_all_apps script – alya Jul 04 '23 at 09:26
  • `I don't precisely can say how long or where it takes to stop and restart again`- well, you can see the logs, we can't ... so, what I'm saying is, only you may be able to discern a pattern, we definitely can't – Jaromanda X Jul 04 '23 at 09:28
  • Hello, @telcoM I tried using systemd, however the service says it's inactive even though I already daemon-reload, enable, and start the service, but it's not working. If you have any suggestions as to how I can make it active, please let me know, in the meantime, I tried to create a new unit again – alya Jul 04 '23 at 09:30
  • 1
    Welcome to the site. When asked for clarifications, please don't respond in comments, but edit your post to include the requested information. Reading through the comments is rather painful, and comments are subject to removal without notice by moderators. – AdminBee Jul 04 '23 at 10:53

0 Answers0