Hi, I wouild like to add 1 more snag:
3. If bearerbox is in parachute mode and restarted for any reason, smsbox goes down and stays down. This is caused by failed heartbeats. It can be fixed by introducing a small delay witth retry in smsbox, if it realizes that bearerbox connectiuon is dropped. (1) Could you please post panic logs?I don't think it is due to the pid file. In my experience web restart fails always, because it doesn't preserve the original location and execvp() can't find the executable. Solution is to save original launch directory (i.e. "/usr/local/bin") and then do a chdir() just before you call execvp. You see, after initialization, bearerbox runs from "/" and all relative paths are broken. This could include the pid file as well. (2). Same solution as in (3). Introduce a small delay to smsbox. However, for this you don't need to modify the sources, you can just delay it in the init script. BR, Nikos On Tue, Aug 30, 2011 at 4:20 PM, Jacob Eiler <[email protected]> wrote: > Hi. > > I am trying to use the http administration interface to restart Kannel, > but there are a few snags and frankly I believe the current > implementation is broken: > > 1. Restart does not work in combination with --pid-file > If bearerbox (or smsbox) is started with --pid-file, then the restart > will cause a panic. > > This is because the execvp call uses the same arguments (makes sense), > but the attempt to write the pid-file in gwlib/utils.c#write_pid_file > fails/panics as the file already exists. > > This could be fixed by removing the pid-file option from the command > line arguments, but I am not sure if this is a good solution. > > > 2. smsbox restarts before bearerbox has restarted > In my experience the smsbox attempts to restart while the bearerbox is > still in the final part of the shutdown. Consequently the smsbox > attempts to bind to the bearerbox before the new bearerbox has opened > the port. This causes smsbox to panic and never get up again. > > I am not sure how to fix this issue - any input? > > BR > Jacob > > > > > > -- > Jacob Eiler > Apide ApS > e: [email protected] > t: +45 2374 0486 > w: apide.com > > > >
