Permissions Issue?

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#1
Hello!

My PBX is working fine, except that the main interface, after a while, stops responding to TAB clicks. No matter what I click, it displays the extensions.

I did a "tail /var/log/httpd/ssl_error_log -f" and this is what I get:

[Thu Oct 21 10:05:15 2010] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Unknown: Too many login failures (errflg=2) in Unknown on line 0, referer: https://xxx.xxx.xxx.xxx/
[Thu Oct 21 10:08:30 2010] [error] [client xxx.xxx.xxx.xxx] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/functions.inc.php on line 782, referer: https://xxx.xxx.xxx.xxx/
[Thu Oct 21 10:08:30 2010] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined index: extdisplay in /var/www/html/admin/modules/dahdiconfig/functions.inc.php on line 1502, referer: https://xxx.xxx.xxx.xxx/
[Thu Oct 21 10:08:30 2010] [error] [client xxx.xxx.xxx.xxx] Thu, 21 Oct 2010 11:08:30 -0400 - Got event.. rtcpreceived, referer: https://xxx.xxx.xxx.xxx/
[Thu Oct 21 10:08:30 2010] [error] [client xxx.xxx.xxx.xxx] Thu, 21 Oct 2010 11:08:30 -0400 - No event handler for event 'rtcpreceived', referer: https://spti-pbx1.webhop.net/
[Thu Oct 21 10:08:30 2010] [error] [client 200.75.208.214] PHP Notice: Undefined index: 1 in /var/www/html/admin/modules/fax/functions.inc.php on line 389, referer: https://xxx.xxx.xxx.xxx/
[Thu Oct 21 10:08:30 2010] [error] [xxx.xxx.xxx.xxx] PHP Notice: Undefined variable: htmlFPBX in /var/www/html/modules/pbxadmin/index.php on line 515, referer: https://xxx.xxx.xxx.xxx/
[Thu Oct 21 10:08:30 2010] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/modules/pbxadmin/js/script.legacy.js, referer: https://xxx.xxx.xxx.xxx/?menu=pbxconfig
[Thu Oct 21 10:08:33 2010] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/panel/background.jpg

Since I'd never had to look at this particular log before, I don't know if these messages are normal, or if something is wrong in my configs. Also, googling the "File does not exist:" keeps pointing at a Permissions fault, but a quick "ls -l" in the html and panel directory shows all are asterisk:asterisk.

Anyone know what's going on?
 

Lee Sharp

Joined
Sep 28, 2010
Messages
332
Likes
0
Points
0
#2
Missing and corrupt files... Not good. I would start with checking the hard drive.

yum install smartmontools

smartctl --all /dev/sda (Or /dev/hda if you have a ata hard drive)

You should get something like this...

Code:
smartctl version 5.38 [i686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Second Generation Serial ATA family
Device Model:     WDC WD5000AAKS-00UU3A0
Serial Number:    WD-WCAYU5717564
Firmware Version: 01.03B01
User Capacity:    500,107,862,016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Thu Oct 21 12:37:13 2010 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x84)    Offline data collection activity
                    was suspended by an interrupting command from host.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0)    The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:          (7980) seconds.
Offline data collection
capabilities:              (0x7b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003)    Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01)    Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:      (   2) minutes.
Extended self-test routine
recommended polling time:      (  95) minutes.
Conveyance self-test routine
recommended polling time:      (   5) minutes.
SCT capabilities:            (0x3037)    SCT Status supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   135   135   021    Pre-fail  Always       -       4216
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       13
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       647
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       10
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       9
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       3
194 Temperature_Celsius     0x0022   111   107   000    Old_age   Always       -       32
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
If you see errors, we know the problem. SMART needs to be on it your BIOS to use this.
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#3
Great, thanks for the heads up, Lee, I'll fiddle with that tonight once my center closes.
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#4
Great, thanks for the heads up, Lee, I'll fiddle with that tonight once my center closes.
 

Lee Sharp

Joined
Sep 28, 2010
Messages
332
Likes
0
Points
0
#5
As long as you do not have to reboot to turn on SMART in the BIOS, you can do it live. It will not interrupt anything. I did for the example just now.
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#6
Hi Lee, sorry it took so long for me to try this, I got caught up in a bit of corporate Tug of War with Angel.com. That being said, I think this log is good.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 119 099 006 Pre-fail Always - 203101463
3 Spin_Up_Time 0x0003 098 097 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 277
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 6
7 Seek_Error_Rate 0x000f 075 060 030 Pre-fail Always - 33624605
9 Power_On_Hours 0x0032 097 097 000 Old_age Always - 2679
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 277
183 Unknown_Attribute 0x0000 100 100 000 Old_age Offline - 0
184 Unknown_Attribute 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Unknown_Attribute 0x0032 100 099 000 Old_age Always - 4295032863
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 065 059 045 Old_age Always - 35 (Lifetime Min/Max 25/38)
194 Temperature_Celsius 0x0022 035 041 000 Old_age Always - 35 (0 22 0 0)
195 Hardware_ECC_Recovered 0x001a 032 024 000 Old_age Always - 203101463
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 199 000 Old_age Always - 211
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 48601849924983
241 Unknown_Attribute 0x0000 100 253 000 Old_age Offline - 1849357764
242 Unknown_Attribute 0x0000 100 253 000 Old_age Offline - 3013654487

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing

----------------------------------------------------------------------------------------

The original issue with my ssl_log file remains however, and I still don't understand if its a permissions issue or a problem with my config. Here is my current tail of ssl_error_log:

[root@spti-pbx1 ~]# tail /var/log/httpd/ssl_error_log -
==> /var/log/httpd/ssl_error_log <==
[Tue Oct 26 12:50:44 2010] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/panel/background.jpg, referer: https://spti-pbx1.webhop.net/panel/flas ... _panel.swf
[Tue Oct 26 13:32:55 2010] [error] [client yyy.yyy.yyy.yyy] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/functions.inc.php on line 782, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension
[Tue Oct 26 13:32:55 2010] [error] [client yyy.yyy.yyy.yyy] PHP Notice: Undefined index: extdisplay in /var/www/html/admin/modules/dahdiconfig/functions.inc.php on line 1502, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension
[Tue Oct 26 13:32:55 2010] [error] [client yyy.yyy.yyy.yyy] PHP Notice: Undefined index: 1 in /var/www/html/admin/modules/fax/functions.inc.php on line 389, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension
[Tue Oct 26 13:32:55 2010] [error] [client yyy.yyy.yyy.yyy] PHP Notice: Undefined variable: htmlFPBX in /var/www/html/modules/pbxadmin/index.php on line 515, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension
[Tue Oct 26 13:32:55 2010] [error] [client yyy.yyy.yyy.yyy] File does not exist: /var/www/html/modules/pbxadmin/js/script.legacy.js, referer: https://spti-pbx1.webhop.net/?menu=pbxconfig
[Tue Oct 26 13:34:25 2010] [error] [client yyy.yyy.yyy.yyy] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/functions.inc.php on line 782, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension
[Tue Oct 26 13:34:25 2010] [error] [client yyy.yyy.yyy.yyy] PHP Notice: Undefined index: extdisplay in /var/www/html/admin/modules/dahdiconfig/functions.inc.php on line 1502, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension
[Tue Oct 26 13:34:25 2010] [error] [client yyy.yyy.yyy.yyy] PHP Notice: Undefined index: 1 in /var/www/html/admin/modules/fax/functions.inc.php on line 389, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension
[Tue Oct 26 13:34:25 2010] [error] [client yyy.yyy.yyy.yyy] PHP Notice: Undefined variable: htmlFPBX in /var/www/html/modules/pbxadmin/index.php on line 515, referer: https://spti-pbx1.webhop.net/?menu=summary_by_extension

---------------------------------------------------------------------------------------

Now, again, the PBX is functioning beautiful. The only problem is the user interface, which seems to 'lose' the session. At a certain point every option leads back to PBX Configuration/Extensions. Any thoughts are appreciated.

Victor
 

Lee Sharp

Joined
Sep 28, 2010
Messages
332
Likes
0
Points
0
#7
I think you need to look again. Let me cut it down to the important bits...

Code:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   119   099   006    Pre-fail  Always       -       203101463
  7 Seek_Error_Rate         0x000f   075   060   030    Pre-fail  Always       -       33624605
195 Hardware_ECC_Recovered  0x001a   032   024   000    Old_age   Always       -       203101463
199 UDMA_CRC_Error_Count    0x003e   200   199   000    Old_age   Always       -       211
My drive does not have a Hardware_ECC_Recovered attribute. But all the rest I have and they are 0. I think your drive is going or your cable is bad.
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#8
To think I thought I'd get this weekend off.

Thanks for the heads up, I'll replace it this weekend.
 

trymes

Joined
Aug 19, 2009
Messages
228
Likes
0
Points
0
#9
Of course, keep in mind that your problem may or may not be related to the fact that your hard disk is on its last legs...

Tom
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#10
Hi Tom.

To be honest, if Lee hadn't mentioned the SmartMon tools, I wouldn't even had thought there was a hard drive issue to begin with, since the PBX itself is working beautiful. I went ahead and picked up a brand new SATA drive, and I'll go ahead and reinstall this weekend. After I'm done, I'll start to monitor that SSL_ERROR_LOG file more often, to see if those messages continue.

The current issue I have is that it appears to 'lose' the session, and no matter what tab I hit, it goes to the Extensions screen. However, a quick logout, login fixes it, and everything else is working fine, so I'm not even concerned, just perhaps a tad curious.

Anyhow, on Monday, I'll have more info. Thanks everyone for you assists!
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#11
Hello!

So, this weekend I went ahead and reinstalled Elastix on a brand new 1 TB drive. Something really curious occurred. I manually copied the configuration for the extensions, trunks, in/out bound routes and channel spy. called ext to ext. Everything 'seemed' to be ok. So I went home. I have an extension at home, and as it turned out, I needed to make a long distance call, which from my pbx is free. Didn't work (hang dead air for 30 seconds, then busy signal). Odd. Tried calling my home number from my cell phone, busy. Tried any of the inbound access numbers, busy. So I came back to the office, and sure enough, nothing worked, from the outside, coming in.

So, I put in the old drive, used Bulk DID/EXT utility to export the existing info, took screen shots of my Trunk configs. Then I put the new drive back in, made a fresh reinstall, did all the upgrades, then used BULK DID/EXT utility to import what I had before, and used the screen shots to recreate EXACTLY what I had before.

Same effect: nothing worked. Why on God's green earth could this be? So what I did next was leave the old HD in place, and left it doing a backup (it was going to take a long time because it's also backing up all the recordings. Tonight, I'm planning on putting the new drive back and just running a Restore, to see if it will work. Any thoughts on this very odd behavior?

Also: what is the best way to 'clone' a system config? Is it safe to simply move the config files from /etc/asterisk and /var/www/html to another machine? Are there other directories that also need to get moved?
 

trymes

Joined
Aug 19, 2009
Messages
228
Likes
0
Points
0
#12
There may be some Elastix specific problem with doing this, but I would make sure that both systems have the same versions of FreePBX, including all modules, etc. Then use the FreePBX backup program.

Elastix also has its own backup system. Either of these ways would be the proper method, as FreePBX stores all of its data in a MySQL Database and generates its configurations based on that database. Just using The bulk DID/Ext tool will leave a lot of this stuff out, IMHO.

Tom
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#13
How about this:

Tonight, after the office closes, I export my databases individually to *.sql files. Then, I swap drives, restore from backup, drop the existing sql table and import from the sql dumps. Is that safe to do?
 

trymes

Joined
Aug 19, 2009
Messages
228
Likes
0
Points
0
#14
If it was me, I would either:

1.) Clone the hard disk using Ghost or Acronis or some similar utility. Use dd if you prefer, but it's often slower.
2.) Use the built-in FreePBX Backup/Restore module to backup the old system (everything) and then restore it to a fresh install on the new server. Make sure that both systems are running the same updates and the exact same versions of FreePBX and modules.

YMMV.

Tom
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#15
Any thoughts though on why a FRESH install, wouldn't work though? So strange.
 

trymes

Joined
Aug 19, 2009
Messages
228
Likes
0
Points
0
#16
Yes. When you applied your settings to the fresh install, something was missed/overlooked/entered incorrectly, etc. Because you didn't use a backup utility, the two systems are not identical.

Tom
 

vperez69

Joined
Sep 2, 2010
Messages
71
Likes
0
Points
0
#17
Update: New 1 TB drive installed. Full upgrades performed. Manually entered extensions, DID's, Incoming Routes, inbound and outbound trunks. Took mysqldump of the cd and reimported it. saved all recordings to CD.

System running almost great. Some russian jerkween is trying to hack me though, and it took me a day to figure it out, then half a night to configure my firewall to block a big patch of Eastern Europe.

Still having problems with Inphonex, though, which I will post in the existing thread at:
Inphonex Issues
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,886
Members
17,563
Latest member
dineshr
Top