Ways to start a CmapServer

Having problems with IHMC CmapServer? Think you have found a bug? Let us know!
Forum rules
Before you post a problem or bug, please be sure you have included the version number of IHMC CmapServer, the operating system and version, the amount of RAM, and any other information that allows us to be able to replicate the problem you are having. (i.e. what were you doing when the problem occur? were you running another program (application) by the time you have the problem?)
Post Reply
dgroos
Posts: 128
Joined: Sun May 31, 2009 9:12 pm
Location: Minnesota USA

Ways to start a CmapServer

Post by dgroos » Fri Oct 14, 2011 1:44 pm

I just set up a server (through console mode, nice addition!!!) on RHEL VM and am trying to start it now. I've always started the cmapserver on a linux box with: nohup ./bin/CmapServer & but it's not working in this environment. I've got very limited sudo powers on this server and that's probably the source of the issues. I think they want me to find another way to start it instead of increasing my sudo rights. I e-mailed them telling them how I tried to start it and here is tech support reply:
Skip the nohup. If your app is a proper daemon service, it will detach
itself from stdin/stdout as it daemonizes. If it does produce output,
redirect that to /dev/null if you need to. Also if it is a proper
daemon, you won't need to use & -- it should put itself in the
background automatically.
I'm not sure where to go from here, any advise is appreciated!

Thanks,
David G

rcarvajal
Posts: 80
Joined: Tue Mar 31, 2009 5:52 pm
Location: Pensacola, FL
Contact:

Re: Ways to start a CmapServer

Post by rcarvajal » Fri Oct 14, 2011 6:20 pm

@dgroos:

CmapServer installer does not create the daemon, so you will need to create it by yourself. I am assuming you can use "sudo", otherwise you will need to ask your service provider to install the daemon for you.

How?

Create a file called CmapServerd under /etc/init.d and implement the start() and stop() operations. The restart() is simply a call to stop() and then call start().

Please notice that I cannot test my example, so it will probably fail, but at least it will give you an idea of what you have to do. Next week I could share with you the script I normally use.

Content of CmapServerd file:

start() {
/opt/IHMC_CmapServer/bin/cmapserver
}

stop() {
killall CmapServerd
}

case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: $prog {start|stop}"
exit 1
exit 1

After you create the file you will need to add execution permissions

chmod 755 CmapServerd

Then add the daemon:

chkconfig --add CmapServerd

You can either restart the machine and see if the daemon was properly installed or run

chkconfig CmapServerd on

You can check any file under /etc/init.d and see how the structure is.

Some info:
http://my.opera.com/pddinh/blog/2007/10 ... -on-redhat
Rodrigo Carvajal

dgroos
Posts: 128
Joined: Sun May 31, 2009 9:12 pm
Location: Minnesota USA

Re: Ways to start a CmapServer

Post by dgroos » Fri Oct 14, 2011 8:32 pm

Thanks for the info @rcarvajal.

If I had full access to the server and could experiment around with it, I would give your script a try right now. Unfortunately I have to ask the tech people at the U to do anything requiring sudo outside of folder in which I installed the IHMC_CmapServer. Therefore, I need to wait till you get back to me next week with the script you use--I'll be able to edit pathways on it but don't have the knowledge to edit much more. You may want to consider in the future having CmapServer installation process create that daemon.

David G

dgroos
Posts: 128
Joined: Sun May 31, 2009 9:12 pm
Location: Minnesota USA

Re: Ways to start a CmapServer

Post by dgroos » Wed Oct 19, 2011 9:24 am

Has anyone else done this, created a start/stop file, and be willing to share it? This is a show-stopper for me right now...

Thanks,
David G

Post Reply