Author Topic: [SOLVED] cannot start yate as service un 12.04 ubuntu (debian).  (Read 12737 times)

rsriram22

  • Newbie
  • *
  • Posts: 6
    • View Profile
i downloaded source from svn and installed compiled/installed as per http://docs.yate.ro/wiki/Compiling_and_Installing_Yate_from_SVN_on_Debian

and yes, i did change the bin path to /usr/local/bin in init.d/yate file (one location in that file).

but i cannot seem to start yate as service. all it says is start/running when i "service yate start" and stop/waiting when i run "service yate stop".in fact i do not get any PID when i do ps -ef or pidof yate..

i can run it from command line as yate -vvv -CDoa (or something similar) i can get calls through yate engine..

what am i missing here? any help is greatly appreciated..

i am on 12.04 LTS ubuntu x86 with 2.6.32 kernel..
« Last Edit: June 11, 2013, 08:35:53 AM by rsriram22 »

vankooch

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
Re: cannot start yate as service un 12.04 ubuntu (debian).
« Reply #1 on: June 10, 2013, 02:24:14 PM »
Hi,

maybe your init script is not working. Have run make install after compiling? You also can try one of the ppa's which offer yate debs for ubuntu.

You also can try to use a upstart job like this:
Code: [Select]
description "yate upstart job"
version "0.2"
author "null team"
emits voip

start on filesystem
stop on shutdown

expect fork
respawn
respawn limit 10 300
umask 022
oom 0

limit nofile 32768 32768
limit rtprio 0 12
nice -10

pre-start script
if [ ! -d /var/log/yate ]; then
mkdir -p -m0755 /var/log/yate
fi
end script

script
exec /usr/bin/yate -d -vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv -Ddf -l /var/log/yate/messages
end script

rsriram22

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: cannot start yate as service un 12.04 ubuntu (debian).
« Reply #2 on: June 11, 2013, 08:29:44 AM »
There was an error in the upstart script for yate.. When compiled from source, the yate binary will be in usr/local/bin and NOT in usr/bin.
The documentation link i pointed to talks about changing the /usr/bin to usr/local/bin in the init script but not in the upstart job script for yate.. When i looked at the script you sent, it stuck me immediately about the location of the yate binary for compiled version (the last line with exec in it)....

perhaps the document needs to mention about it as well.

(and by the way, there was an  error was logged in the /var/log/upstart/yate file that /usr/bin/yate was not found)...

makes sense now and i can now start the job and get a pid for it as well!

vankooch

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
Re: [SOLVED] cannot start yate as service un 12.04 ubuntu (debian).
« Reply #3 on: June 11, 2013, 07:20:05 PM »
I've added a note in the wiki.