SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Thu Apr 18, 2024 23:40
SMSTools3 Community » Help and support Bottom

[answered] smsd stopped running

  This topic is locked

Page:  1

Author Post
Member
Registered:
Oct 2010
Location: New Caledonia
Operating system name and version: Linux 2.6.32-29-server #58-Ubuntu SMP Fri Feb 11 21:06:51 UTC 2011 x86_64 GNU/Linux
Version of smsd: 3.1.14
Smsd installed from: source
Name and model of a modem / phone: FALCOM TANGO-55 RS-232
Interface: mos7720 Moschip 2 port adapter converter USB-RS232

Well, I had the bad surprise to see that smsd was not running anymore.
sms3 is well installed with rc-inits :

GSM1 service was not running

I had to restart it to make it run:

Now all is OK

But I would like to know if some of you have experienced this kind of problem ...
I plan to check if there is no defunct flag on smsd lines and restart service is needed but I would prefer to understand how it can have been in default.
Thanks in advance for your time.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
In the log there should be a line "Modem handler 0 terminated abnormally", and before that line there should be a line which tells the reason why modem process was stopped. Some fatal failures may cause abnormal termination, like error with PIN, error with spooler, or error with whitelist/blacklist file. Also, if modem cannot register to the GSM network right after smsd is started, modem process will terminate. And if the USB port is lost, smsd will stop.

If in the log there is only "Modem handler 0 terminated", and no reason for it, probably some process has sent SIGTERM to the modem process. If there is not even that line, probably SIGKILL was received.

Member
Registered:
Oct 2010
Location: New Caledonia
Topic owner
cat /var/log/smsd.log.1

cat /var/log/messages.1 | grep usb

From your answer, I understand that smsd has quit because USB port has been lost.

It turns out that this is caused by main a main power lost.
cat /var/log/ups.log

I'll update my UPS script to restart smsd when power is back.

Thanks so much keke to have pointed out the different ways for smsd to stop !

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
electronico_nc wrote
I'll update my UPS script to restart smsd when power is back.

Okay, but why are USB ports gone away when UPS goes on battery? Isn't it the main problem, as UPS should still deliver the power? Or is the UPS too small, and cannot feed the adapter and modem? ;)

Anyways, in your system you could have a cron job which periodically detects if smsd and modem processes are running or not (assuming that some other reason than UPS may cause port loss and reconnect too). For example something like this:

#!/bin/bash

#--------------------------------------------------------------------------
checkProcess()
{
  local PSLIST=$(ps -ef | grep -v grep)
  local ARG
  local tmp

  for ARG in "$@"
  do
    tmp=$(echo -n "$PSLIST" | grep "$ARG")
    [ -z "$tmp" ] &&  echo -n "$ARG "
  done
}

#--------------------------------------------------------------------------

MESSAGE=$(checkProcess "smsd -n MAINPROCESS" GSM1_ GSM2_ apache mysql)
MESSAGE=$(echo "$MESSAGE" | sed 's/_//g')

if [ -n "$MESSAGE" ]; then
  MESSAGE="$MESSAGE not running."

  # some actions
fi
 
'bash' Syntax Highlight powered by GeSHi


Member
Registered:
Oct 2010
Location: New Caledonia
Topic owner
Quote
Okay, but why are USB ports gone away when UPS goes on battery? Isn't it the main problem, as UPS should still deliver the power? Or is the UPS too small, and cannot feed the adapter and modem? ;)
UPS is a 800VA model and it well feeds the server and the modem, thanks for asking ;)
Its online power consumption is 9VA, so no trouble with this.

I have tried a dozen times to unplug it's main cord (to simulate a power failure) and this has NEVER disconnected the modem USB port ... So I think it is a problem that only occurs sometimes ...

I'll post if I find further infos about this.
Thanks again.

  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.