SipX ConfigServer Troubleshooting

From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia

Jump to: navigation, search

Single most important tip is to look in the log file. See Logging for log information and how to change the log level

Contents

An internal error has occurred. Click here to continue.

Look in the /var/log/sipxpbx/sipxconfig.log for more information. TIP: Brief error is also on the page if you turn style sheet off or view page source, but complete error should be in sipxconfig.log file

Only see Apache Test Page

If you have apache preinstalled, chances are it's setup to start when your system starts which causes a conflict when sipXpbx starts. You'll know this if you the apache test page.

You can check this by running this command:

  /sbin/chkconfig --list httpd

it should return

 httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off

If any read "on", then

 /sbin/chkconfig httpd off
 service httpd stop
 service sipxpbx restart


Cannot log into Web Admin UI

Postgresql server not running or missconfigured

TEST: Try logging into postgres from client

psql -U postgres SIPXCONFIG
\q  to quit

SOLUTION Start postgres.

 service postgresql start

If postgres is running and you just want to clear all configuration information

 /usr/bin/sipxconfig.sh --database drop create

If you suspect your database is corrupt, you can reinitialize postgres with the following commands:

 ## WARNING : Clears all postgres databases!!!
 service postgresql stop
 rm -rf /var/lib/pgsql/data
 su - postgres -c "initdb /var/lib/pgsql/data"
 /usr/bin/sipxconfig.sh --setup

Forgot superadmin password

SOLUTION:: You can always reset superadmin password to blank, log in then immediately change the password to a new value.

 sipxconfig.sh --database reset-superadmin
 

You can run this while PBX is still running.

I changed my REALM and users cannot log in

In short, you cannot change your realm, however here are some commands to help you test PINs from the command line. PINs are not stored in the postgres DB for security reasons. Only a hashcode is stored to validate PINs. If you want to test a PIN from the command line, try this command.

For your values of username , password , and realm, the following values must match:

echo -n "username:realm:password" | md5sum
psql -U postgres SIPXCONFIG -c "select pintoken from users where user_name = 'username';"

TIP: If you know basic SQL, it would be relatively easy to write a shell script to reset all passwords to the same value. Better still, if you have access a list of passwords for each user in a text file, you could also write a shell script that sets each pintoken for each user.

sipXconfig won't start

General failure to start server

TEST: Look for string

"Process ConfigServer state changed: STARTING --> FAILED"

in

/var/log/sipxpbx/watchdog.log

SOLUTION Stop sipXpbx service. Start sipXconfig from console by running

In 3.4

  su - sipx
  sipxconfig.sh

In 3.2 or older:

  su - sipxchange
  sipxconfig.sh

You should see an error somewhere in the console.

TEST: Look in /var/log/sipxpbx/sipxconfig.log for error messages.

SOLUTION As indicated by the messages.

org.postgresql.util.PSQLException: The connection attempt failed.

An error such as below appears in the console when you run sipxconfig.sh:

  /usr/local/sipx/etc/sipxpbx/database/database.xml:33:
  org.postgresql.util.PSQLException: The connection attempt failed.
  
  Total time: 0 seconds
  
  ERROR: relation "version_history" does not exist
  Error: could not get the database version. Exiting now.

One thing that could be causing this error is if postgres is using IPv6 when it binds to "localhost". This is very common on Fedora Core 6 / Debian Etch (and probably other 2.6 kernel distros) as they enable IPv6 by default. The best way to solve this problem is by disabling IPv6 completely and editing your hosts file, however if your network is using IPv6 you might be able to get away with just editing your /etc/hosts file.

CHECK: If you see ::1 in your /etc/hosts file and not 127.0.0.1 then this is likely the source of your problems.

File: /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1   localhost.localdomain   localhost

should be

File: /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1   localhost.localdomain   localhost

use your favorite editor to make this change and then restart postgres

  service postgresql stop
  service postgresql start

if this is your first time trying to run the sipxconfig then you will need to drop and create the database since that failed the first time sipxconfig.sh tried to do it.

  sipxconfig.sh --database drop create

If this does not solve the problem then you may need to disable IPv6 completely. These instructions for Fedora Core 6 should work well for other distro's with some tweaking.

Cisco 79XX Configuration information not delivered

Phones failed to restart

After projecting profiles, Cisco phones should restart. Try restarting phones manually.

TFTP server not started or misconfigured

TEST: Try to download from from your TFTP server. You may need to install tftp client software and your tftp client may have slightly different command syntax

tftp localhost -c get SIPDefault.cnf
less SIPDefault.cnf

SOLUTION: Walk through installation notes for TFTP server installation and look in /var/log/messages for TFTP error messages.

User log out before 15 minutes/sporadic crashes with Sun's JRE

If Web UI crashes, it will restart. Average time to restart is about 20 seconds so you might not notice the web ui not being available, but you may notice being logged out before your 15 minutes normal timeout.

To verify you are getting crashes, check following log files for restarts to "Config Server"

File: /var/log/sipxpbx/watchdog.log
0:WatchDog:"Process ConfigServer found in non-running state. (Waiting for it to start)."
"2006-03-06T15:54:23.146208Z":42:WATCHDOG:WARNING:p2.pingtel.com::B7AFDBB0:WatchDog:
"Process ConfigServer found in non-running state (it was in STARTING state for more than 5 seconds)."
"2006-03-06T15:54:23.146246Z":43:WATCHDOG:WARNING:p2.pingtel.com::B7AFDBB0:WatchDog:"Attempting  
ConfigServer startup..."


SMP Kernels and higher number of users seems to prevoke this issue. See this bug for more details and workaround involving installing IBM's JRE. http://track.sipfoundry.org/browse/XCF-938

Convenient Commands

  • To take a quick backup of the database
pg_dump -U postgres -F t SIPXCONFIG | gzip --best > sipxconfig.tar.gz
  • To restore from a quick database
sipxconfig.sh --database drop
createdb -U postgres --encoding=UNICODE SIPXCONFIG
zcat sipxconfig.tar.gz | pg_restore -U postgres -d SIPXCONFIG

Using Wireshark to see inside the box

  • Decrypting the SSL

sipXconfig uses HTTPS, which in turn uses SSL encryption to hide the details of the transaction from prying eyes. But that can be a pain for developers who want to figure out exactly what is happening. The WireShark network protocol analyzer has the ability to decrypt the SSL communications if given the appropriate keys. The documentation for how to do that is here under "Preference Settings", and below is an example that should work for sipXconfig. In the WireShark "Preferences" pane, under SSL, there is an "RSA keys list" text box (Edit->Preferences->Protocols->SSL->RSA keys list:). Fill it out thusly:

{sipxconfig ip addr},8443,http,{prefix}/var/sipxdata/certdb/{host}.{domain}.key

Then, after capturing packets between a client and sipXconfig, highlight one of the packets to port 8443, right-click to bring up the menu, and select "Decode As...", then select SSL. Then, right-click again and the option "Follow SSL Stream" should now be enabled. Select that, and enjoy seeing inside the box.

Personal tools