Red Hat / Fedora :: Running Java As Daemon / Service
Jul 7, 2010
I have a java program which I need to run as a service or daemon. What is the most stable method to do it? It will be heavy processing socket programming which will be continously receiving data?
I'm new to Fedora and have just purchased a subscription to a GoDaddy Virtual Dedicated Server, which I'm able to control using SSH.I have a Java application that I want to run as a daemon on this VDS. Some google searching yielded a bunch of different methods of doing this, none of which I'm sure would be guaranteed to work with Fedora, so I was hoping someone here could give it to me straight and fill me in on the simplest way of doing this.What is the best/simplest way to run a Java application as a daemon on Fedora?
I have a java program where I want to run it every 30 seconds. So what is the best way to run in that form? Is it running as a service or a cron is best? How to do with it
i've some trouble to write a script on java on linux to check if service(ie:smbd) is runing or not,, could you give me some example? Or if is there any source about it for me to learn? i've two days search with zero result...
I'm having some problems getting my screensaver to work automatically.If I start the screensaver config program then it gives me this message: "The XScreenSaver daemon doesn't seem to be running on display ":0.0". Launch it now?" If I click yes then my screensaver works exactly as expected.How can I get the XScreenSaver daemon to start automatically?
i have added a tomcat startup service using chkconfig. I have set up JAVA_HOME and JRE_HOME as well ass alternatives to point to the correct location.I have an init script in /etc/init.d. When i start the tomcat service using [ /etc/init.d/<x> start ] everything works fine and the environment variables for JAVA_HOME and JRE_HOME are used correctly.Now i added the service <x> using chkconfig --add so that it can start on boot up. But now the service does not use the system environment variable for JAVA and JRE setup by me.Also after complete bootup if i try to start the service using [ service <x> start] the environment variable in the shell are not used. don't want to exclusively declare variables for JAVA_HOME and JRE_HOME in the init script.
I have installed version of ntop 4.0.3 by guide.But I can't start ntop daemon/service. I didn't find a service file for starting.During the installation there was no problem only want to RRDTool so I installed that. Now there is no necessary package required.
Whenever I log into Fedora, an icon (a triangle with an exclamation mark) pops up in the main panel . When I move the mouse over it, the following is displayed. ABRT service not running. I restarted the service from the service configuration window but there was no difference. How do I configure it to run alway
I have been away from Linux for years (about 10), I used to use it for everything and anything...now I am about to do it again but I need help getting back into it haha. Screen is broken on newish laptop, going to use it for firewall, router, file server, etc. Trying to setup remote desktop. I got Fedora 14 setup and installed on it, got SSH up and running where I can remote into it easily. Setting up VNC is starting to be a pain though.
I have Windows 7 on my other machine, with TightVNC and tried Tiger VNC also, disabled all firewall, on the same LAN. The service is running on the RH box, I just cant connect to it...am I missing something simple? It just times out. I followed [URL] thread for the most part.
I'd like to create a couple of upstart scripts for some network service daemons (eg. usenet downloading service, torrent service, media management services, etc).Basically they should start after the network service is started and the system is running (runlevel 2?) but I'm just wondering if anybody has an example script or more specific start/stop conditions that I can use.
Am not sure of the best way to go about writing a script. All I need at the moment is to start a java http server program at startup.How should I write languagetool.sh so as to be able to stop the script execution?
What is the proper way to make the smb and nmb services start (and keep running) automatically? I have successfully configured samba on my F15 box, but sometimes the other boxes cant see it. I check the status of smb and nmb and smb is running and active, but nmb status is "Running (exited)". If I manually restart nmb then nmb status changes to "Running (active)" and the problem goes away. However I want it to start (and keep running) automatically as it should. I am thinking maybe the problem is the way I set smb and nmb to start automatically.
I used $chkconfig smb on and $chkconfig nmb on
Is this the correct way? if not, what is it? Maybe I need to be more specific about at which runlevels I want the services to start? I have googled, but found about 5 diferent methods to make this services start automatically, some with systemctrl, some editing files, chkconfig, and even the system-config-services app (which seems broken in f15 btw) and don't know which one to use.
I want to run 1 instance of x11vnc at boot after gdm starts, itsa remote vnc server that will work without me first loggin in
Im just not sure where or how to start it when computer boots? i can run it on another tty and connect so its all setup but not sure what the "right" was is.
In a previous thread I had detailed an issue I was having with avahi not firing up properly at startup.As a bit of background: the services available on the server aren't advertising until I restart the avahi-daemon manually after startup - The syslog shows the daemon starting on boot, but it never seems to access the service file.I was wondering if it is possible that this may be a file permission problem?
I have created a script named ssh_inotify.sh to check /var/log/auth.log log file for newly started ssh session and display a question message box. This script uses inotifywait to monitor this above log file for modify file event and zenity to create question message boxes.Now i have created a startup service config file named ssh_inotify under /etc/init.d folder and placed the script ssh_inotify.sh under /usr/sbin and chmod this script to be executable.
The service config file ssh_inotify uses start-stop-daemon to run this script as background process.Now theproblem is that when i start this service using sudo service ssh_inotify start, the service is started, I can confirm this using ps -A | grep ssh_inotify also i can check for the PID associated with it under /var/run/ssh_inotify.pid. Now when i ssh to my machine, i do not get the question message box, I am writing in log file and in that i can see that the message under cancel button option for question message box is getting printed.This script runs perfectly when run directly or using start-stop-daemon command directly (exact command as typed in service config file above) on terminal, but not when this same command is executed using service file.Can someone please suggest me the solution and reason for such behavior when same command executed under different mode (using service or directly from terminal).If you guys require code, i can attach the files (currently i am in office so don't have access to these files.)
I have a java processing running as a system service using a shell script to launch it. It runs under a user other than root via sudo The process runs just fine but seems to die sometimes for no apparent reason. When the process is killed normally (via service stop), it fires a shutdown hook in java and you can see the process going away. What I see in the log now is nothing the process just dies. When I checked the system.log I found at the same time this:
Code: messages:Mar 2 19:43:22 beta_web gconfd (sifagent-16786): starting (version 2.14.0), pid 16786 user 'sifagent' messages:Mar 2 19:43:22 beta_web gconfd (sifagent-16786): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0 messages:Mar 2 19:43:22 beta_web gconfd (sifagent-16786): Resolved address "xml:readwrite:/home/sifagent//.gconf" to a writable configuration source at position 1
I have noticed on my netbook that F14 is running some sort of indexing service in the notification area. What is this, and how do I turn it off? I know what it is doing, but why is this just now important in F14. It is killing the battery life on my netbook.
The desktop search has stopped working in Gnome.I get a message that says 'Search Service not running' with a button that says 'Start Search Service'.When I click the button nothing happens
i am trying to daemonize my (java) program on ubuntu. For that end i created a script based on /etc/init.d/skeleton script which obviously uses start-stop-daemon.
But I cannot make the process (java program) run on the background. it keeps running in the same terminal i start my daemon script. Trying --background option for start-stop-daemon does not help.
I Bought A New Centos VPS,Not Much Details Are Provided About Setup Etc..I Wanted To Check If FTP Service Is Running Or Not And Which FTP Daemon Is Running.(Is There Any FTP Daemon Pre-Installed With Centos)
I've a java program which needs to be executed regardless of whether a user is logged in or not. Currently I've a shell script which executes the java program. I login to the server and run this shell script when the server is rebooted. I would like to start this script automatically preferably as a service so that I can stop and restart this service whenever I update the java program.
There is a particular java app called LanguageTool which we need to host on our centos server. Other applications are supposed to send an http request to this machine; this machine should pass this data (received over the http request) to the java application concerned, obtain the output from the app; and then send this response back to the requesting client...
We need to set this app as a service on startup. The centos machine might restarted from time to time; so we expect this service should startup automatically. What can I do to get this done?
Still trying to get my openVPN running.I can get the daemon running from terminal but nothing is configured. I copied my config file over from Windoze partition. My openVPN works flawlessly on both my windoze boxes.
Following this but came to another dead end when Im instructed to: Next, edit /etc/openvpn/easy-rsa/vars adjusting the following to your environment:
I am trying to use my Apple Remote Controller that came with my iMac 4.1. I did some research and on the Ubuntu site it said that its possible with a application called Infrared Remote Controller. It detected from the hardrive which version I had etc but than a error message appeared on the bottom saying:
I am working on a daemon that I want to change some variables while its running. Is this possible?I want to implement a command line type interface for my daemon so I can send it commands that will change the current values of specific variables, and also be able tell the daemon to load/save a config file.The only thing I have found so far is passing arguments to a daemon, but that seems to be a one-time shot when your first starting it.
I have installed talk on centos, turned it on by editing xinetd.d/talk and setting disable=no.I have restarted xinetd (service xinetd restart) and verified that talk is configured to start (chkconfig --status-all).what am i missing? shouldn't either port 517 or 518 respond to telnet? what else can i do to get talk running?
I'm trying to run a java app from a stock chart service called ThinkorSwim. I've tried it in NetrunnerOS2, Ubuntu 10.4 and Ubuntu 10.10. All of them result in the same java error.:I'm running Sun Java 6 update 22 on all these OSs.The install seemed to go OK, and I get the splash screen when it starts up and I get a "loading desktop" type of message then it throws that error. I've googled for 2 days and nothing I find is dealing with this error.
I'm trying to modify an existing user so that any files they create can be at least read (although writing and execution would be nice) by any other user. The reason is because I need the daemon running my Apache server to be able to access files created by a daemon running under this user, files which will be created and accessed in real-time.
I am tring to stop avahi from starting and running at all.I use kill PID and killall avahi-daemon and it will not go away, it comes back with a new PID. Does anyone know a way of stopping it?