Discussion:
[Freeswitch-users] Gateway registration issue, can only be solved through "killgw"
Roman_
2010-08-10 03:02:43 UTC
Permalink
Hi all,

I experienced an issue with gateway registration yesterday, where the
registration first failed with a "Request Timeout (408)" error and after
that it kept failing with "Bad Request (400)". It kept retrying periodically
with increasing delays in between, but even after almost 24 hours the
registration still failed (and with delays of about 40 minutes between
attempts).
Only then did I notice that the gateway had failed, and restarting the
gateway ("killgw" then "rescan") immediately solved the problem and the
gateway registered successfully.

This is part of the log:

2010-08-08 16:31:30.464055 [ERR] sofia_reg.c:1502 gateyway.com Registration
Failed with status Request Timeout [408]. failure #1
2010-08-08 16:31:35.444058 [WARNING] sofia_reg.c:387 gateway.com Failed
Registration, setting retry to 60 seconds.
2010-08-08 16:32:54.674056 [NOTICE] sofia_reg.c:342 Registering gateway.com
2010-08-08 16:32:54.744052 [ERR] sofia_reg.c:1502 gateway.com Registration
Failed with status Bad Request [400]. failure #2
2010-08-08 16:33:04.614052 [WARNING] sofia_reg.c:387 gateway.com Failed
Registration, setting retry to 90 seconds.

this then continued for almost 24 hours before I noticed it, always with
error code 400.

Now, what worries me about this is that the gateway stopped working, but was
not able to recover from the problem by itself. Only manual intervention by
restarting the gateway solved the issue.

Is there any way I can make sure that the gateway does not get stuck like
this and can recover by itself? Does the fact that it did not recover by
itself not suggest that there might be a bug in Freeswitch when registration
fails, which prevents a successful registration until one manually kills and
restarts the gateway?

I am using the Freeswitch version from the master branch of the git
repository, compiled on July 19.

Any help is appreciated, thanks.

Best regards,

Roman
--
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Gateway-registration-issue-can-only-be-solved-through-killgw-tp5391507p5391507.html
Sent from the freeswitch-users mailing list archive at Nabble.com.
Steven Ayre
2010-08-10 07:41:19 UTC
Permalink
Do you have any packet traces to the gateway during that time? If not, are
you able to reproduce the problem?

It would be useful to see the SIP traces to see what FS was sending to check
whether it was valid, and if not to see what was wrong.

You can do that by running 'sofia profile profilename siptrace on' from the
CLI, the SIP packets will then show in your logfile. Same command with off
instead of on will turn it back off once you're done.

-Steve
Post by Roman_
Hi all,
I experienced an issue with gateway registration yesterday, where the
registration first failed with a "Request Timeout (408)" error and after
that it kept failing with "Bad Request (400)". It kept retrying periodically
with increasing delays in between, but even after almost 24 hours the
registration still failed (and with delays of about 40 minutes between
attempts).
Only then did I notice that the gateway had failed, and restarting the
gateway ("killgw" then "rescan") immediately solved the problem and the
gateway registered successfully.
2010-08-08 16:31:30.464055 [ERR] sofia_reg.c:1502 gateyway.comRegistration
Failed with status Request Timeout [408]. failure #1
2010-08-08 16:31:35.444058 [WARNING] sofia_reg.c:387 gateway.com Failed
Registration, setting retry to 60 seconds.
2010-08-08 16:32:54.674056 [NOTICE] sofia_reg.c:342 Registering gateway.com
2010-08-08 16:32:54.744052 [ERR] sofia_reg.c:1502 gateway.com Registration
Failed with status Bad Request [400]. failure #2
2010-08-08 16:33:04.614052 [WARNING] sofia_reg.c:387 gateway.com Failed
Registration, setting retry to 90 seconds.
this then continued for almost 24 hours before I noticed it, always with
error code 400.
Now, what worries me about this is that the gateway stopped working, but was
not able to recover from the problem by itself. Only manual intervention by
restarting the gateway solved the issue.
Is there any way I can make sure that the gateway does not get stuck like
this and can recover by itself? Does the fact that it did not recover by
itself not suggest that there might be a bug in Freeswitch when registration
fails, which prevents a successful registration until one manually kills and
restarts the gateway?
I am using the Freeswitch version from the master branch of the git
repository, compiled on July 19.
Any help is appreciated, thanks.
Best regards,
Roman
--
http://freeswitch-users.2379917.n2.nabble.com/Gateway-registration-issue-can-only-be-solved-through-killgw-tp5391507p5391507.html
Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100810/5f2dc743/attachment-0001.html
Roman_
2010-08-10 08:14:37 UTC
Permalink
I do not have any traces from that time.

Just now I briefly tried to reproduce the problem by blocking replies from
the gateway using iptables, and I did get the "Request Timeout (408)" when
FS tried to re-new the registration. I then opened the firewall again, but
FS immediately succeeded in registering again after the 60 second delay had
passed. So it seems that the problem is not easily reproducible or maybe
some other factors were also involved.

Thanks for the help.

Roman
Post by Steven Ayre
Do you have any packet traces to the gateway during that time? If not, are
you able to reproduce the problem?
It would be useful to see the SIP traces to see what FS was sending to check
whether it was valid, and if not to see what was wrong.
You can do that by running 'sofia profile profilename siptrace on' from the
CLI, the SIP packets will then show in your logfile. Same command with off
instead of on will turn it back off once you're done.
-Steve
Post by Roman_
Hi all,
I experienced an issue with gateway registration yesterday, where the
registration first failed with a "Request Timeout (408)" error and after
that it kept failing with "Bad Request (400)". It kept retrying periodically
with increasing delays in between, but even after almost 24 hours the
registration still failed (and with delays of about 40 minutes between
attempts).
Only then did I notice that the gateway had failed, and restarting the
gateway ("killgw" then "rescan") immediately solved the problem and the
gateway registered successfully.
2010-08-08 16:31:30.464055 [ERR] sofia_reg.c:1502
gateyway.comRegistration
Failed with status Request Timeout [408]. failure #1
2010-08-08 16:31:35.444058 [WARNING] sofia_reg.c:387 gateway.com Failed
Registration, setting retry to 60 seconds.
2010-08-08 16:32:54.674056 [NOTICE] sofia_reg.c:342 Registering gateway.com
2010-08-08 16:32:54.744052 [ERR] sofia_reg.c:1502 gateway.com
Registration
Failed with status Bad Request [400]. failure #2
2010-08-08 16:33:04.614052 [WARNING] sofia_reg.c:387 gateway.com Failed
Registration, setting retry to 90 seconds.
this then continued for almost 24 hours before I noticed it, always with
error code 400.
Now, what worries me about this is that the gateway stopped working, but was
not able to recover from the problem by itself. Only manual intervention by
restarting the gateway solved the issue.
Is there any way I can make sure that the gateway does not get stuck like
this and can recover by itself? Does the fact that it did not recover by
itself not suggest that there might be a bug in Freeswitch when registration
fails, which prevents a successful registration until one manually kills and
restarts the gateway?
I am using the Freeswitch version from the master branch of the git
repository, compiled on July 19.
Any help is appreciated, thanks.
Best regards,
Roman
--
http://freeswitch-users.2379917.n2.nabble.com/Gateway-registration-issue-can-only-be-solved-through-killgw-tp5391507p5391507.html
Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Gateway-registration-issue-can-only-be-solved-through-killgw-tp5391507p5392119.html
Sent from the freeswitch-users mailing list archive at Nabble.com.
guru singh
2010-08-10 12:53:56 UTC
Permalink
Hi,

I had similar problems a while back. The gateway would register
intermittently. If you're FS server is behind NAT then it may be the
case that your router is the culprit here. In my case the closest I
came to reproducing the issue was that after some 408 responses I just
restarted my router while FS was running and then it always
registered. What router are you using?

gsin
Roman_
2010-08-10 13:14:39 UTC
Permalink
Hi,

The server I am using is directly attached to the Internet with a public IP,
so there is no NAT going on. And I would be surprised if the firewall on the
server is the problem.

Thanks,

Roman
Post by guru singh
Hi,
I had similar problems a while back. The gateway would register
intermittently. If you're FS server is behind NAT then it may be the
case that your router is the culprit here. In my case the closest I
came to reproducing the issue was that after some 408 responses I just
restarted my router while FS was running and then it always
registered. What router are you using?
gsin
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Gateway-registration-issue-can-only-be-solved-through-killgw-tp5391507p5392975.html
Sent from the freeswitch-users mailing list archive at Nabble.com.
Loading...