Problems getting 0.8 running on Debian
Forum » WikiPBX / Technical Support » Problems getting 0.8 running on Debian
Started by: sirdotcomsirdotcom
On: 1271049026|%e %b %Y, %H:%M %Z|agohover
Number of posts: 14
rss icon RSS: New posts
Summary:
Some wikipbx web pages don't display.
Problems getting 0.8 running on Debian
sirdotcomsirdotcom 1271049026|%e %b %Y, %H:%M %Z|agohover

I am running a fresh install of wikipbx 0.8 on debian lenny. I finally got all the python, django, and wsgi stuff working ;-) Now everything seems to be stable and operating - Freeswitch shows the SIP profiles I created in wikipbx so I know they are communicating. But for some reason some of the links on the Admin User dashboard just don't load (I click them and the browser sits forever "waiting for response" which doesn't come.) Also when I create an endpoint and hit 'submit' the page does not reload, but when I click on 'manage' it shows the endpoint I just created. Also when I click 'Endpoints -> Manage' or 'Calls -> Live' the same thing happens, no response. Everything seems to be square and I haven't seen anybody else having similar problems.

Other than that, I ram really excited about wikipbx and how powerful it is … I've tried Fusionpbx and freepbx-v3 but wasn't nearly as impressed as I am with Wikipbx.

Thanks,
Steve

Reply  |  Options
Unfold Problems getting 0.8 running on Debian by sirdotcomsirdotcom, 1271049026|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
stas_shtinstas_shtin 1271062338|%e %b %Y, %H:%M %Z|agohover

Did it give you any errors in web server's error log?

It looks like some kind of problem with ESL library or with event socket connection to freeswitch. Can you connect with telnet to the same host IP and port you've specified in event socket config settings?

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by stas_shtinstas_shtin, 1271062338|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
sirdotcomsirdotcom 1271068682|%e %b %Y, %H:%M %Z|agohover

Yes, I am able to connect to the event socket by telnet (on port 8021). The apache error log shows 3 errors for each request:

[Mon Apr 12 10:22:38 2010] [error] get_fs_connections()
[Mon Apr 12 10:22:38 2010] [error] 1 eventsockets
[Mon Apr 12 10:22:38 2010] [error] creating eslconnection

So it must be something with ESL? The freeswitch libs/esl was compiled as the installation manual described.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by sirdotcomsirdotcom, 1271068682|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
stas_shtinstas_shtin 1271075426|%e %b %Y, %H:%M %Z|agohover

Although those messages appear in the error log, they are actually just informational. They look normal to me.

Can you have a look at the access log file and see which status do the hanging pages return?

Try changing DEBUG value in your settings.py file to True or False, see if it makes any difference. You'll need to restart apache for the new value to have effect.

If it won't help, here's a patch that would show some info about ESL connection:

Index: wikipbx/wikipbxweb/views.py
===================================================================
--- wikipbx/wikipbxweb/views.py    (revision 276)
+++ wikipbx/wikipbxweb/views.py    (working copy)
@@ -851,16 +851,20 @@
     for connection in fsutil.get_fs_connections():
         try:
             for endpoint in endpoints:
+                logger.info("Endpoint: %s" % endpoint)
                 # we have to check each profile, since in theory
                 # and endpoint can be regd to any defined profile
                 regd_on_any_profile = False
                 for sipprofile in SipProfile.objects.all():
                     cmd = ("api sofia status profile %s user %s@%s" %
                            (sipprofile.name, endpoint.userid, account.domain))
+                    logger.info("Sending command: %s" % cmd)
                     results = connection.sendRecv(cmd)
+                    logger.info("Result: %s" % results)
                     if not results:
                         raise Exception("Could not connect to FreeSWITCH")
                     data = results.getBody().splitlines()
+                    logger.info("Results data: %s" % str(data))
                     for line in data:
                         if line.startswith("Contact:"):
                             # found "Contact:", that means this endpoint is reg'd

Make a backup copy of your wikipbx/wikipbxweb/views.py file, cd to wikipbx root directory, apply the patch with "patch -p0 < /path/to/patch/file" and restart apache. You should see some extra info in apache error log after following Endpoints > Manage link. Post it here, replacing any confidential info with *'s and restore you views.py file from the backup.

That would shed some light in case if it's ESL library problem.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by stas_shtinstas_shtin, 1271075426|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
sirdotcomsirdotcom 1271122579|%e %b %Y, %H:%M %Z|agohover

Thanks for the info … DEBUG in settings.py was True already but I tried False anyway — no errors in the wikipbx-error log. However, I did go back and check all the Django and Python paths, and everything looked good, but still no GUI page loads. So as a last ditch effort, I re-installed apache2 along with mod_wsgi, and now it works! I'm not sure what changed exactly, but now that I [think] I know how it all fits together I'm going to re-install Debian, FS, and wikipbx from scratch and see how it all works! Looking forward to using it.

Thanks…
Steve

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by sirdotcomsirdotcom, 1271122579|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
tleydentleyden 1271125260|%e %b %Y, %H:%M %Z|agohover

I guess it's too late, but I was going to ask if the pages where it would never return a response were only those which used ESL to talk to freeswitch, eg:

  • Show endpoints (queries freeswitch for registration status)
  • Live calls

Maybe a few others I am forgetting about right now. But for example on the extensions page, it does not need to talk to freeswitch, all that just comes straight out of the db.

So was it just those two pages or was it a site-wide issue?

Well regardless, glad to hear you got it working .. and thanks for the kind words!

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by tleydentleyden, 1271125260|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
sirdotcomsirdotcom 1271134694|%e %b %Y, %H:%M %Z|agohover

Hi again — well I did a fresh install of debian, FS, and wikipbx and everything works great now! Sometimes a fresh install is just what is needed, and it only took a few hours :)

To answer your questions … yes, the points where the GUI hung were all that you mentioned, so they were all points where wikipbx is querying freeswitch. The problem links were 'manage endpoints' 'manage gateways' and 'live calls'. The dialplan link worked like you said, as did all the ones I didn't just mention. So apparently it was a fallout between ESL and freeswitch.

Great to have it working. Thanks for your help!

Steve

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by sirdotcomsirdotcom, 1271134694|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
leddaledda 1276265409|%e %b %Y, %H:%M %Z|agohover

I have the same issue on SuSE 10.3.
Apache/2.2.4 (Linux/SUSE) mod_ssl/2.2.4 OpenSSL/0.9.8e PHP/5.2.11 with Suhosin-Patch mod_wsgi/3.2 Python/2.5.1 configured

FS 1.0.6.

This problems happens with any page that is calling get_fs_connections(). E.g. (live calls, manage account, manage gateways…)
ESL.ESLconnection(…) from fsutil.py doesn't connect. The code stuck on this function and doesn't go any further.

I wasn't able to solve this issue so far.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by leddaledda, 1276265409|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
tleydentleyden 1276279432|%e %b %Y, %H:%M %Z|agohover

In the webserver logs, does it spit out the exact Ip / port its trying to connect to? (eg, wikipbx code running in webserver makes a socket connection to freeswitch)

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by tleydentleyden, 1276279432|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
leddaledda 1276503337|%e %b %Y, %H:%M %Z|agohover

I've made few changes in get_fs_connections() to add more logs. My code looks like:

logger.info("creating eslconnection %s %s %s" % (socket.listen_ip, str(socket.listen_port),socket.password))
con = ESL.ESLconnection("localhost","8021","ClueCon")
if con.connected:
logger.info("connected")
else:
logger.info("NOT connected")
yield con

Today after booting computer and starting wikipbx I was able to load several pages where get_fs_connections() being used (Endpoints Manage, Gateways Managed).
Apache logs looks like this:

[Mon Jun 14 05:56:27 2010] [error] get_fs_connections()
[Mon Jun 14 05:56:27 2010] [error] 1 eventsockets
[Mon Jun 14 05:56:27 2010] [error] creating eslconnection 127.0.0.1 8021 ClueCon
[Mon Jun 14 05:56:27 2010] [error] connected
[Mon Jun 14 05:56:27 2010] [error] get_fs_connections() done

After few clicks in wikipbx interface get_fs_connections() stops working and in apache logs I have:

[Mon Jun 14 05:56:33 2010] [error] get_fs_connections()
[Mon Jun 14 05:56:33 2010] [error] 1 eventsockets
[Mon Jun 14 05:56:33 2010] [error] creating eslconnection 127.0.0.1 8021 ClueCon

Now every click on "Calls Live", "Gateways Manage", "Endpoints Manage" just hangs, without producing any output or error logs.

After that I've tried FreeSwitch ESL sample scripts freeswitch-1.0.6/libs/esl/python/events.py and its working fine everytime I'm starting it.
It has the same kind of code:

con = ESLconnection("localhost","8021","ClueCon")
#are we connected?
if con.connected:
print "connected"
con.events("plain", "all");
….

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by leddaledda, 1276503337|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
leddaledda 1276524822|%e %b %Y, %H:%M %Z|agohover

I was able to make it work stable, rebuilding FreeSwitch ESL python interface.

1. I've installed latest SWIG (2.0.0)

2. Rebuild SWIG generated files in libs/esl/python directory:
make reswig

3. Then in libs/esl/ directory:
make clean; make pymod

After that wikipbx was able to call ESL functions properly.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by leddaledda, 1276524822|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
stas_shtinstas_shtin 1276540747|%e %b %Y, %H:%M %Z|agohover

Concratulations on solving this issue. I've added this info to our troubleshooting guide.

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by stas_shtinstas_shtin, 1276540747|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
chigambamukokochigambamukoko 1279464938|%e %b %Y, %H:%M %Z|agohover

ledda: care to share step by step instructions on how to do this solution? I have the same problem but I'm kinda limited on my skills here :-) thanks bud

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by chigambamukokochigambamukoko, 1279464938|%e %b %Y, %H:%M %Z|agohover
Re: Problems getting 0.8 running on Debian
chigambamukokochigambamukoko 1279476342|%e %b %Y, %H:%M %Z|agohover

I apologize for being a newbie, I had missed a step, everything seems to be working now, thanks for the help to everyone

Reply  |  Options
Unfold Re: Problems getting 0.8 running on Debian by chigambamukokochigambamukoko, 1279476342|%e %b %Y, %H:%M %Z|agohover
New Post
page_revision: 0, last_edited: 1226259295|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License