Ticket #5763 (closed Bugs: fixed)

Opened 1 year ago

Last modified 10 months ago

Clicking Auto Configure in SIP Settings crashes apache

Reported by: mickecarlsson Assigned to: p_lindheimer
Priority: crash Milestone: 2.11
Component: Asterisk SIP Settings Version: 2.10-branch
Keywords: Cc:
Confirmation: Need Feedback Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

Fresh install of FreePBX Distro.

Go to Asterisk SIP Settings and click on Auto Configure. System halts for about 10 - 20 seconds the display an error pop up:
An Error occurred trying fetch network configuration and external IP address

After that the system is dead. You can't click on anything, it is just waiting for a response from the system.

Restarting apache with service httpd restart restores functionality.

Editing modules/sipsettings/natget.html.php and removing :5060 makes this work again.

Not working:

$fn = "http://myip.freepbx.org:5060/whatsmyip.php";

Working

$fn = "http://myip.freepbx.org/whatsmyip.php";

Related to r13465

Change History

04/05/12 10:04:08 changed by p_lindheimer

  • priority changed from regression to crash.
  • confirmation changed from Unreviewed to Need Feedback.
  • type changed from Bugs to Feature Requests.

that sounds like it may be a 'bug' or issue elsewhere, in an apache setting, php timeout setting, etc and possibly related to a restrictive firewall. It would be helpful to try to get to root cause as to why this is creating an issue on your system.

All we are doing here is directing the http traffic to port 5060 instead of 80 which is a completely valid operation. The reason we do this is that some network setups might be directing 5060 traffic out a different WAN and by doing this, we get the proper WAN address for the NAT settings. The freepbx server that handles this listens to both port 80 (for older versions of FreePBX before we did this) and port 5060.

Although we could put in an advanced setting that allowed you to change this from port 5060, I think it would be more useful, at least initially, to find out what the real reason for the crash is.

Can you try this with and without the Advanced setting for wget set and not, and then check various timeouts on the system. There may be something we can try setting in the code that would alleviate this issue.

Changing to a feature request now until we get more details as I don't think there is a bug here, though there may be something in the distro apache or php settings we may be able to do to help this.

04/05/12 11:36:29 changed by mickecarlsson

I tried that, no change. There is a 5 minute timeout in apache config file, but long after 5 minutes passed, I could not get any response back from apache, the browser is just sitting there waiting for a response.

Tested on two installs, on two different sites, one with the distro, one hand built system. Two different firewalls, both allowing traffic out without any filter.

04/05/12 22:54:33 changed by p_lindheimer

odd … it might be worth striking up something on the forums in addition to this ticket and seeing if anyone else is seeing anything weird or has ideas since that will get more eyes on it. I can also try setting up yet another port to listen on other than 80 and 5060 and see if you get the same results when you try that, in case it is somehow very specifically related to 5060???

04/06/12 05:06:25 changed by mickecarlsson

Here is the explanation.

When using wget, there are some defaults that you might want to add:

‘--tries=number’, The default is to retry 20 times if not receiving 404
‘--timeout=seconds’, default is a 900-second read timeout

If these are not present and if the server is somewhat responsive it will take 20 * 900 seconds = 5 hours before it give up. In the mean time, apache is busy and non-responsive.

I have not tested it with the other method not using wget.

I tested by adding --tries=1 and --timeout=60 to the code:

$fn = "--tries=1 --timeout=60 http://myip.freepbx.org:5060/whatismyip.php";

and sure enough, after 60 seconds apache was responsive again.

Are you sure that you don't have any firewall or blocking mechanism in front of mirror.freepbx.org that is blocking :5060?

I have disabled the local iptables on the distro just to make sure, and I have a full blown connection to Internet without any blocking software.

I have tested it on three different sites here in Sweden, none worked. On site I tested it has a 1 GB backbone, one site with 100 MB and one with 8 MB.

04/06/12 20:00:33 changed by p_lindheimer

I'm on vacation so will have to check when I get back. Unless something changed port 5060 should be opened as it was explicitly setup and tested when I first made the change. Maybe something got screwed up in the firewall. As far as the other settings, thanks that is helpful and I'll look into making those changes to the defaults.

04/14/12 14:23:29 changed by p_lindheimer

same as #5716

04/14/12 14:41:29 changed by p_lindheimer

  • type changed from Feature Requests to Bugs.

04/14/12 14:43:06 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [13972]) fixes #5716 and fixes #5763 set reasonable timeouts with wget, port 5060 is still an issue and the server needs to be checked as something has changed there

04/16/12 14:46:14 changed by p_lindheimer

There had been some infrastructure changes that had broken 5060/TCP access which have now been fixed and should fully address this issue.

07/11/12 17:22:22 changed by p_lindheimer

(In [14253]) Merged revisions 13971-13972,13979,14026,14031,14048-14049,14052,14054,14060,14082,14119,14128,14133-14135,14148-14149,14151-14153,14159,14205,14218 via svnmerge from http://www.freepbx.org/v2/svn/freepbx/branches/2.10

........

r13971 | p_lindheimer | 2012-04-14 10:56:49 -0700 (Sat, 14 Apr 2012) | 1 line

don't make manager creds readonly now that they are auto updated when changed

........

r13972 | p_lindheimer | 2012-04-14 11:43:05 -0700 (Sat, 14 Apr 2012) | 1 line

fixes #5716 and fixes #5763 set reasonable timeouts with wget, port 5060 is still an issue and the server needs to be checked as something has changed there

........

r13979 | p_lindheimer | 2012-04-17 17:12:25 -0700 (Tue, 17 Apr 2012) | 1 line

this is supplied by core now

........

r14026 | p_lindheimer | 2012-04-27 13:18:08 -0700 (Fri, 27 Apr 2012) | 1 line

fixes #5742 conflict with html ID on Advanced Settings page breaks abiliity to change this one setting, will go live with next framework module update

........

r14031 | mbrevda | 2012-04-30 07:58:12 -0700 (Mon, 30 Apr 2012) | 1 line

fixes #5743 by namsepacing ari css stuff

........

r14048 | p_lindheimer | 2012-05-03 07:19:25 -0700 (Thu, 03 May 2012) | 1 line

fixes #5533 harmless warning message by not checking the filesize of the log file the first time if it does not exists yet

........

r14049 | p_lindheimer | 2012-05-03 08:54:56 -0700 (Thu, 03 May 2012) | 1 line

check if dbug file exists before calculatin size to remove otherwise harmless warning message re #5533

........

r14052 | p_lindheimer | 2012-05-04 08:26:35 -0700 (Fri, 04 May 2012) | 1 line

revert r12549 merged in error as well as remove undefined index all re #5692 which may fix issues but needs testing

........

r14054 | p_lindheimer | 2012-05-04 09:12:50 -0700 (Fri, 04 May 2012) | 1 line

don't duplicate this first setting re #5692

........

r14060 | p_lindheimer | 2012-05-07 15:03:50 -0700 (Mon, 07 May 2012) | 1 line

revert accidental checkin of part of r13972 re #5812

........

r14082 | p_lindheimer | 2012-05-18 15:16:54 -0700 (Fri, 18 May 2012) | 1 line

incorrect parsing of REQUEST variable results in streamlined ajax path's not being honored

........

r14119 | mbrevda | 2012-05-30 00:10:38 -0700 (Wed, 30 May 2012) | 1 line

function to recursivly remove a directory

........

r14128 | p_lindheimer | 2012-06-11 08:21:11 -0700 (Mon, 11 Jun 2012) | 1 line

fixes #5874 variable name typo

........

r14133 | p_lindheimer | 2012-06-14 11:22:37 -0700 (Thu, 14 Jun 2012) | 1 line

remove some advanced settings no longer valid

........

r14134 | p_lindheimer | 2012-06-14 12:37:43 -0700 (Thu, 14 Jun 2012) | 1 line

makes spnosor image and associated link configurable as is freepbx image

........

r14135 | p_lindheimer | 2012-06-14 12:39:02 -0700 (Thu, 14 Jun 2012) | 1 line

closes #5833 USEDEVSTATE defaults to true

........

r14148 | p_lindheimer | 2012-06-15 13:19:15 -0700 (Fri, 15 Jun 2012) | 1 line

fixes #5646 reload Asterisk after initial start if using Dynamic Hints to get over Asterisk bug where #exec fails on first startup

........

r14149 | mbrevda | 2012-06-18 08:48:21 -0700 (Mon, 18 Jun 2012) | 1 line

re #5879, #5839 - add bootstrap hook; write writetimeout to mamanger.conf; cosmetics

........

r14151 | mbrevda | 2012-06-19 05:36:10 -0700 (Tue, 19 Jun 2012) | 1 line

syntaxt error

........

r14152 | p_lindheimer | 2012-06-19 08:23:43 -0700 (Tue, 19 Jun 2012) | 1 line

add 2.10.1 upgrade dir, migration for writetimeout re #5839, and remove some advanced settings that are no longer used

........

r14153 | GameGamer?43 | 2012-06-19 15:10:37 -0700 (Tue, 19 Jun 2012) | 1 line

closes #5885 - check recordings in cdr prior to enabling or disabling the delete button

........

r14159 | p_lindheimer | 2012-06-27 16:51:15 -0700 (Wed, 27 Jun 2012) | 1 line

don't take out the description or it doesn't show up in module admin when not online

........

r14205 | p_lindheimer | 2012-06-30 13:11:53 -0700 (Sat, 30 Jun 2012) | 1 line

Creating release 2.10.1

........

r14218 | p_lindheimer | 2012-06-30 13:30:57 -0700 (Sat, 30 Jun 2012) | 1 line

remove some of the security auditing code that got checked in error and not used or ready

........