twonds / punjab

BOSH connection manager
MIT License
183 stars 49 forks source link

Unable to integrate Punjab with ejabberd #24

Closed pawanyanky closed 11 years ago

pawanyanky commented 11 years ago

I am using window and I wanted to integrate Punjab with ejabberd server and I followed instruction given in Install.txt of Punjab-master.zip folder but I am not sure whether I am going properly and finally I don`t know how to integrate Punjab with ejabberd server. please help me . Below is step what i followed and what output I received .

step 1. I downloaded python, punjab-master.zip, twisted.mis

step 2. Installed Python, twisted.mis and Extracted punjab-master.zip in a folder

step 3. I executed "python setup.py install" command in cmd then below text appeared

    D:\punjab-master>python setup.py install
    C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\punjab
    copying punjab\error.py -> build\lib\punjab
    copying punjab\httpb.py -> build\lib\punjab
    copying punjab\httpb_client.py -> build\lib\punjab
    copying punjab\jabber.py -> build\lib\punjab
    copying punjab\patches.py -> build\lib\punjab
    copying punjab\session.py -> build\lib\punjab
    copying punjab\ssl.py -> build\lib\punjab
    copying punjab\stream.py -> build\lib\punjab
    copying punjab\__init__.py -> build\lib\punjab
    creating build\lib\punjab\xmpp
    copying punjab\xmpp\error.py -> build\lib\punjab\xmpp
    copying punjab\xmpp\ns.py -> build\lib\punjab\xmpp
    copying punjab\xmpp\server.py -> build\lib\punjab\xmpp
    copying punjab\xmpp\__init__.py -> build\lib\punjab\xmpp
    package init file 'twisted\plugins\__init__.py' not found (or not a regular file)
    creating build\lib\twisted
    creating build\lib\twisted\plugins
    copying twisted\plugins\punjab_plugin.py -> build\lib\twisted\plugins
    package init file 'twisted\plugins\__init__.py' not found (or not a regular file)
    running install_lib
    running install_egg_info
    Removing C:\Python27\Lib\site-packages\punjab-0.15-py2.7.egg-info
    Writing C:\Python27\Lib\site-packages\punjab-0.15-py2.7.egg-info

step 4. executed "twistd.py punjab" command then below text appeared i think it is giving some error

    D:\punjab-master>twistd.py punjab
    Traceback (most recent call last):
    File "C:\Python27\Scripts\twistd.py", line 13, in <module>
    from twisted.scripts.twistd import run
    File "C:\Python27\lib\site-packages\twisted\scripts\twistd.py", line 11, in <module>
    from twisted.application import app
    File "C:\Python27\lib\site-packages\twisted\application\app.py", line 8, in <module>
    from twisted.python import runtime, log, usage, failure, util, logfile
    File "C:\Python27\lib\site-packages\twisted\python\log.py", line 17, in <module>
    from zope.interface import Interface
    ImportError: No module named zope.interface

Please help me to integrate Punjab with ejabberd

twonds commented 11 years ago

Punjab requires twisted and zope interface. See https://github.com/twonds/punjab/issues/23

pawanyanky commented 11 years ago

I followed given link by you and installed zope successfully as given at this below link http://pewetheb.blogspot.in/2010/08/install-zopeinterface-for-twisted.html and executed below command to run punjab .

    C:\Documents and Settings\admin>twistd.py punjab

Unhandled Error Traceback (most recent call last): File "C:\Python27\lib\site-packages\twisted\application\app.py", line 614, in parseOptions usage.Options.parseOptions(self, options) File "C:\Python27\lib\site-packages\twisted\python\usage.py", line 261, in par seOptions for (cmd, short, parser, doc) in self.subCommands: File "C:\Python27\lib\site-packages\twisted\application\app.py", line 631, in subCommands for plug in sorted(plugins, key=attrgetter('tapname')): File "C:\Python27\lib\site-packages\twisted\plugin.py", line 209, in getPlugin s allDropins = getCache(package) --- --- File "C:\Python27\lib\site-packages\twisted\plugin.py", line 167, in getCache provider = pluginModule.load() File "C:\Python27\lib\site-packages\twisted\python\modules.py", line 383, in l oad return self.pathEntry.pythonPath.moduleLoader(self.name) File "C:\Python27\lib\site-packages\twisted\python\reflect.py", line 506, in n amedAny topLevelPackage = _importAndCheckStack(trialname) File "C:\Python27\lib\site-packages\twisted\plugins\twisted_core.py", line 5, in from twisted.internet.endpoints import _SystemdParser, _TCP6ServerParser, _S tandardIOParser File "C:\Python27\lib\site-packages\twisted\internet\endpoints.py", line 28, i n from twisted.internet import stdio File "C:\Python27\lib\site-packages\twisted\internet\stdio.py", line 28, in <m odule> from twisted.internet import _win32stdio File "C:\Python27\lib\site-packages\twisted\internet_win32stdio.py", line 7, in import win32api exceptions.ImportError: No module named win32api 2012-12-13 16:49:39+0530 [-] Log opened. 2012-12-13 16:49:39+0530 [-] twistd 12.2.0 (C:\Python27\python.exe 2.7.3) starti ng up. 2012-12-13 16:49:39+0530 [-] reactor class: twisted.internet.selectreactor.Selec tReactor. 2012-12-13 16:49:39+0530 [-] Site starting on 5280 2012-12-13 16:49:39+0530 [-] Starting factory <twisted.web.server.Site instance at 0x013CC0D0>

I think again some error is coming, please guide me. and one more doubt I have i.e. as ejabberd uses 5280 port and pubjab also uses same port , then in this case what should I do.

pawanyanky commented 11 years ago

I installed pywin32-218.win32-py2.7.exe and after that above error went away, and then again I tried to run punjab by executing below command

    C:\Documents and Settings\admin>twistd.py punjab
    2012-12-14 12:30:56+0530 [-] Log opened.
    2012-12-14 12:30:56+0530 [-] twistd 12.2.0 (C:\Python27\python.exe 2.7.3) starting up.
    2012-12-14 12:30:56+0530 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
    2012-12-14 12:30:56+0530 [-] Site starting on 5280
    2012-12-14 12:30:56+0530 [-] Starting factory <twisted.web.server.Site instance at 0x013FE7D8>

I executed above command when ejabberd was stop, but later when I tried to start ejabberd, it gives error and says port 5280 is already in use and I dont know how to change ejabberd port number. I dont know what to do after this, how to integrate ejabberd and punjab, please help me.