Thanks Alvaro, I think it can be the case, actually i used a precompiled version ( is that a bad idea ? ) because still in the test phase of setting this up. i used debian package and used apt-get to install kannel. rather than compiling the source. but may be that has the parachute option. i will try with source code compilation then. btw, does parachute has any extra overhead or drawback?
On Wed, Mar 9, 2011 at 9:42 PM, Alvaro Cornejo <[email protected]>wrote: > Hi > > Seems you used the --parachute option when compiling? or at bearbox > start. That option forces bb to restart each time it crashes or is > shutdown and as you learned, does that ONLY with BB, not with smsbox. > That is why you can not restart bb manually. Also, after > starting/restarting smsbox you are able to send sms. > > > Regards > > Alvaro > > > > > > > > |-----------------------------------------------------------------------------------------------------------------| > Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier > celular y Nextel > en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via > SMS y GPRS online > Visitenos en www.perusms.NET www.smsglobal.com.mx y > www.pravcom.com > > > > On Wed, Mar 9, 2011 at 9:44 AM, Jalal Uddin <[email protected]> wrote: > > Thanks again Richard. > > > > May be you are right, this is a linux issue. and that is why i tried to > > search in google whether there is anything which acts like restarting a > dead > > process. so far no luck. by the way i have figured out something - > > > > previously my approach was, i made some change in kannel.conf (as i have > to > > try various configuration) and i wanted to restart kannel. restarting > kannel > > did worked, but after that when i wanted to restart bearerbox unless the > > port is change in kannel.conf in the last edit, the bearer box didn't run > as > > it says the port is already in use. so i gave up and though i am not able > to > > run the bearerbox without changing the port. > > > > and after discussing with you, this is what i figured out. > > > > now after i change the kannel.conf, i didn't try to restart kannel. and > > didn't try to rerun bearerbox. rather, i went to web admin and issues, > > restart, after that i tried to send sms but it failed as no smsbox is > > running, so i tried to run smsbox and was able to send sms using the last > > change in config. so it stand for me like the. the bearer box is the one > > that runs the admin web interface. and for me, it is always running, i > can't > > stop it. so i never get a failed request for admin web interface. the > only > > thing stops for me is smsbox, so whenever i try to rerun smsbox, that > works > > fine and then i can send sms, somehow the bearerbox is always starting > > automatically for me. even if i try to stop it, it restart again. but > > whatever, i got a solution to my initial problem that i don't have to > assign > > a new port. just linux is doing my work of running the bearerbox after > the > > config change, but i don't mind it as long as it works. > > > > Thanks for the help. > > > > On Wed, Mar 9, 2011 at 5:05 PM, Richard Crawshaw > > <[email protected]> wrote: > >> > >> Jalal > >> > >> > >> > >> When you shut-down Kannel using HTTP if you then request the status you > >> will get a 102 error, “Connection refused”: at least that’s what I get. > >> Though if you request status immediately after issuing the shut-down > request > >> you can see that the Bearer Box is in the process of shutting down, but > >> you’ve probably only got a second to do that. > >> > >> > >> > >> If you start the Bearer Box with the –d switch you can also supply the > -P > >> (capital P) switch. This starts a watcher process that will restart > Kannel > >> if it crashes. It only restarts the Bearer Box, you have to handle > >> restarting any SMS Boxes you might have yourself. You can also supply > the > >> -X <filename> (capital X) switch to specify a script (or executable) to > be > >> run when a crash is detected. This script could handle restarting your > SMS > >> box(es). This is not something I’ve tried. I don’t know how it handles > a > >> standard shut-down request. > >> > >> > >> > >> What you describe with the -d switch: nothing showing up in the > console, > >> is what I would expect. However, when I issue the status request via > HTTP I > >> can see that my Kannel is running. How did you determine that the > Bearer > >> Box did not start? > >> > >> > >> > >> From what I can tell the web interface is integral with the Bearer Box; > >> certainly when I start the Bearer Box without starting an SMS box I can > >> access the web interface. And after I’ve shut-down the Bearer Box the > web > >> interface does not respond. > >> > >> > >> > >> I believe that you need to have one port for admin and a different port > >> for sending SMS requests to Kannel. > >> > >> > >> > >> I don’t understand why your Bearer Box is restarting by itself. It > sounds > >> to me that you’ve got a Linux related issue, rather than a Kannel > issue. I > >> know very little about Linux: indeed all I know I’ve learnt this week > (more > >> or less)! > >> > >> > >> > >> Perhaps some folks on here who know more about Linux might be able to > >> throw some more light on the matter. > >> > >> > >> > >> Richard > >> > >> > >> > >> From: Jalal Uddin [mailto:[email protected]] > >> Sent: 09 March 2011 10:15 > >> To: Richard Crawshaw > >> > >> Cc: [email protected] > >> Subject: RE: How to stop bearerbox and smsbox > >> > >> > >> > >> Thanks a lot Richard, you gave me some info that I didn’t know before. > >> > >> > >> > >> But unfortunately the problem remains, this time I tried the web > interface > >> through url to shutdown the bearerbox / admin process. > >> > >> It told me “Bringing system down” and I applied this command: sudo > netstat > >> -anp|grep 12345 (12345 is the admin port for me) > >> > >> > >> > >> I can see that the bearerbox stops when I apply this, but after a while > it > >> just again comes back. I just simply don’t understand why it is auto > >> restarting even if I kill it or stop it. I just simply applied the same > >> command you used to start bearerbox or smsbox, just that I didn’t used > the > >> –d option. When I use –d option nothing shows up in the console but I > see > >> that the bearerbox also do not start then, so I avoided the –d. > >> > >> > >> > >> When you use –d option, can you run the bearerbox in the same port? Does > >> admin process (the web interface) always keeps running? I have a feeling > >> that after installing kannel this admin thing do not die ever. It always > >> runs, (even if I stop kannel) > >> > >> > >> > >> Any idea around it? > >> > >> > >> > >> Thanks > >> > >> > >> > >> From: Richard Crawshaw [mailto:[email protected]] > >> Sent: Wednesday, March 09, 2011 3:32 PM > >> To: Jalal Uddin > >> Cc: [email protected] > >> Subject: RE: How to stop bearerbox and smsbox > >> > >> > >> > >> Jalal > >> > >> > >> > >> You can shut-down the Bearer Box using HTTP. When the Bearer Box is > >> shut-down the SMS box shuts-down. > >> > >> > >> > >> In the core group of the config file you can set the admin-port. Use > this > >> port to control the Bearer Box. Look at “HTTP Administration” section > in > >> the User Guide; this will tell you how to do this. > >> > >> > >> > >> My core group looks like this: > >> > >> group = core > >> > >> admin-port = 4001 > >> > >> smsbox-port = 4002 > >> > >> admin-password = foobar > >> > >> <snip> > >> > >> > >> > >> From the computer that is running Kannel, this will retrieve the Bearer > >> Box status: > >> > >> http://localhost:4001/status.html > >> > >> and this will shut-down the Bearer Box > >> > >> http://localhost:4001/shutdown?password=foobar > >> > >> > >> > >> If you start the Bearer Box and the SMS Box with the -d (or --daemonize) > >> switch then you won’t have the terminal window tied up running them. > I’m > >> using this: > >> > >> <path-to-bb>/bearerbox -v 1 -d <path-to-config>/kannel.conf > >> > >> followed by: > >> > >> <path-to-sms>/smsbox -v 1 -d > <path-to-config>/kannel.conf > >> > >> > >> > >> (The -v 1 turns off debug logging.) > >> > >> > >> > >> I’ve constructed a web-page to manage the Bearer Box through HTTP. You > >> might want to do similar. I can post this code if people would find it > >> useful. > >> > >> > >> > >> Hope this helps. > >> > >> > >> > >> Richard > >> > >> > >> > >> From: [email protected] [mailto:[email protected]] On > Behalf > >> Of Jalal Uddin > >> Sent: 09 March 2011 08:44 > >> To: 'Alejandro Guerrieri' > >> Cc: [email protected] > >> Subject: RE: How to stop bearerbox and smsbox > >> > >> > >> > >> Thank you very much for the reply. > >> > >> > >> > >> Actually I tried to kill bearerbox many times, and now I have tried it > >> again. I have applied the “top” command to see the running processes. > And > >> everytime I kill the bearerbox, it just comes back again with a new > process > >> id. Any idea why this can happen. It is like something is monitoring > >> bearerbox and whenever it is dead, it re creates it. You told me to use > >> –daemonize switch, the documentation says that it will detach the > bearerbox > >> from terminal, so I guess that will free my terminal, but will that > solve > >> this issue? It seems like something is not letting bearerbox to be dead. > >> > >> > >> > >> Btw, I have stopped kannel with the following command before killing the > >> bearerbox, I have also killed smsbox using the killall and using kill -9 > >> process id, and still the bearerbox is getting back, I can’t believe > this. > >> Any idea what monitors bearerbox or how to stop it so that it do not > >> restart? > >> > >> > >> > >> Thank you. > >> > >> > >> > >> From: Alejandro Guerrieri [mailto:[email protected]] > >> Sent: Wednesday, March 09, 2011 1:02 PM > >> To: Jalal Uddin > >> Cc: <[email protected]> > >> Subject: Re: How to stop bearerbox and smsbox > >> > >> > >> > >> Use the --daemonize switch to detach from the console. > >> > >> > >> > >> To kill the processes, you can identify the process id's and kill -9 > them, > >> or do a killall by process name. > >> > >> > >> > >> Check the user guide for the finer details. > >> > >> > >> > >> Anyway, I'd recommend you to use an init script, there's some examples > for > >> RedHat/CentOS and other distros floating around, google a little bit and > >> you'll find out. > >> > >> > >> > >> Regards, > >> > >> -- > >> > >> Alex Guerrieri > >> > >> On 09/03/2011, at 07:50, "Jalal Uddin" <[email protected]> wrote: > >> > >> Hello, > >> > >> I am new with kannel. I usually run kannel (bearerbox , smsbox) from > >> command prompt. Like below: > >> > >> > >> > >> Terminal 1 > >> > >> $> cd /etc/kannel > >> > >> $> Bearerbox kannel.conf > >> > >> > >> > >> Terminal 2 > >> > >> $> cd /etc/kannel > >> > >> $> Smsbox kannel.conf > >> > >> > >> > >> And everything starts up and I can send sms from the browser using url. > >> The problem is when I start kannel like that it hangs the terminal as it > >> continuously listens to the service. But that is not a problem. The > problem > >> is when I need to shut down the server. I need to stop those two > bearerbox > >> and smsbox. > >> > >> > >> > >> So say I apply Ctrl+z and they stop. Then I close the terminals, and > >> restart the pc. But after that when I try to start bearerbox and > smsbox, I > >> can’t do that. It says the ports are already in use. If I restart kannel > >> (well server restart should do that as well I guess) it still says port > is > >> in use and nothing works. So I have to open kannel.conf and change the > port > >> and then again the bearerbox and smsbox work. Interesting is I can’t use > the > >> old ports never ever. So this is a problem that every time I need to > change > >> kannel.conf or restart kannel or server. I have to apply a brand new > port. I > >> understand this is very silly and should be the case. I feel like all my > >> previous runs are still running in the pc. But I don’t know how to stop > them > >> and can use the same port next time. I have searched hard in internet > but I > >> hardly see anyone facing such silly problem, so I wonder what I am > missing. > >> > >> > >> > >> I will be very thankful if someone can point out what I am missing, like > >> what is the perfect way to restart kannel and how can I use the previous > >> ports again. > >> > >> > >> > >> Thank you > >> > >> > > >
