Service launcher status always shows stopped on macOS - install4j

I have generated a service launcher in install4j and installed it on macOS using the install service action. When I execute <launcher> status in the terminal, it always says stopped even though the service has started. The behavior is the same if I launch the service using <launcher> start and then query for status.
<launcher> stop also does have any effect on the service that is running.
How do I get this to work on Mac?

On macOS, you have to use launchctl to control services:
How to check if launchd has started the script?

Related

MongoDB error when tryin to start up services

I recently have been having issues with mongoDB services.
I am running on MacOs Ventura v13.0.1.
I even removed MongoDB from machine and try to re-isntall it.
Install process.
brew tap mongodb/brew
brew install mongodb-community#6.0
Running services
brew services start mongodb-communit#6.0
Checking services
brew services
error
mongodb-community error 3584 root ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
Any help would be great. I have been stuck on this and cannot run a a MongoDB server on my machine.
It sounds like there is an issue with the launch agent plist file for MongoDB. This file is used by macOS to start MongoDB as a service when your machine boots up.
You can tryp following steps to resolve the issue:
Stop MongoDB service by running the command brew services stop mongodb-community#6.0.
Remove the launch agent plist file by running the command rm ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist.
Restart MongoDB service by running the command brew services restart mongodb-community#6.0.
Verify that MongoDB service is running by running the command brew services again.
If the issue still persists after following the steps above, you can try uninstalling and reinstalling MongoDB using Homebrew's cleanup command brew cleanup mongodb-community#6.0 before reinstalling.
Also you can check MongoDB's log files located in /usr/local/var/log/mongodb/ to see if there is any error message that can help you troubleshoot the issue.

RedHat Developer Studio losing status of JBoss on server restarts

I have Developer Studio set up with an instance of JBoss EAP 6.4.0.GA. I added it using the 6.1+ server type:
When I start and stop the server - either in debug mode or not - things seem to work fine. When the server is running and I try to restart it by clicking on the debug button or the play button for non-debug mode, Developer Studio restarts the server (I can see this happening in the logs) but loses track of the server and gives me an error saying:
After this, the server is running but Dev Studio doesn't know so if I try to start the server, I get this dialog:
If I then connect, the UI doesn't seem to update so I can't shut down the server:
This never happens when starting the server from scratch. It's only restarts. I was having this issue with JBoss Developer Studio (Eclipse) with 10.1.0 GA and am now also having the issue with 10.2.0 GA. Is there anything I can tweak to fix this?? Is there a startup or restart timeout that needs to be changed?
This was fixed recently :D It was a long-standing bug and had a race-condition in it.
https://issues.jboss.org/browse/JBIDE-20426

Torquebox Jruby Rails Deploy

I have created a Jruby rails application. I am able to deploy the application in windows server by using torquebox deploy and able to run the application using torquebox run. But when I close my command prompt(terminal) my Torquebox server is stopping. How I can able to run the server even after closing the terminal?
Run it as a windows service. In windows a service can be created to run a program in the background, in a similar way to running a daemon in unix.

How can i run java command as a service Centos 5?

i want to execute java -cp server.jar:mysql.jar server.NithServer this command as linux service how can i do that. & not working. centos 5
What's about using Java Service Wrapper?
It provides cross platform way of running java applications as services and also have a community version that should be enough for your purposes.
A seriously written service must have the bash script that accepts start, stop and restart parameters. Such script can be copied or better linked (original at /etc/init.d) to /etc/rc3.d or /etc/rc5.d and will be maintained by the system, executing shutdown and startup when required. Here there is a tutorial how to wrap Apache Tomcat as a service.

Tomcat port in use in NetBeans

I tried searching for this problem here and in other forums but could not resolve this issue.
I have downloaded NetBeansBeans 7.0 Java EE pack which also installs Tomcat 7 which it did.
I created sample web application and when trying to deploy I get an error:
Starting of Tomcat failed, the server port 8080 is already in use.
I tried changing the ports but no success. However, when i try to run same Tomcat from Command prompt using "startup.bat" command, it runs successfully.
Operating system is Vista. I tried checking for open ports using "netstat -a" but no open port for 8080. also tried to see if any "java.exe" process is running but it was not.
Thanks in advance for the help.
Sometimes Vista, especially after hibernation, doesn't free a previously used port. Have you tried restarting the pc?