jabberd2 win32

A Windows build of jabberd2, popular Jabber server

jabberd2 binariesDescription

This page contains jabberd2 SVN version guide that allows compiling and running jabberd2 server natively on Windows machine. You may choose whether you want to build the Windows version by yourself or get the binaries I provide at Download section.

Multi-User Conferencing

Multi-User Conferencing component extension is also available for Windows at MUC win32 page.

Note

Windows platforms prior to Windows 2000 are not supported, so this won’t work on Windows 95/98/ME/NT.

Installation

jabberd2 servicesThere is NO installer for Windows version yet, but I am working on that. Right now you can use zipped binaries that you can extract anywhere you like (i.e. C:\Program Files\jabberd2).After you have your files extracted or compiled you can run jabberd2 components as Windows services. To install some jabberd2 component as service type:

router.exe -I

to uninstall type:

router.exe -U

Follow jabberd2 manual to configure jabberd2 exactly same way as on unix machine.

Note

SQLite is default storage & authentication module for my Windows builds. To change that behaviour modify sm.xml and c2s.xml configuration files.You may be interested in using NTLogon authentication module, so all your Windows local users are jabberd2 users as well. To use this module edit c2s.xml:

  1. Setup auth module using: <module>ntlogon</module>.
  2. Since NTLogon module requires plain-text passwords you need to disable all authentication methods except plain-text under <mechanisms> use <!– comments –>.
  3. You may require TLS so passwords are never sent trough unencrypted stream, add require-starttls=’true’ attribute to your <id>.

Configuration

By default configuration files shipped with Windows jabberd2 build are set up to run on localhost with SQLite module for authentication and storage, with user registration enabled.

Important

If you are willing to run jabberd2 as a XMPP server for sampledomain.com you need to change <id> entries in c2s.xml and sm.xml, so they match your domain: <id>sampledomain.com</id>, before you will be able to serve any XMPP clients for sampledomain.com. The sampledomain.com must be properly set up as DNS entry that resolves to the machine where jabberd2 services are installed and running.You may also need to open ports on your firewall for incoming connections:

  • 5222, 5223 - for client to your server connections
  • 5269 - for other server to your server connections (only if you plan to open for communication with other servers with s2s service)

If you want to know more about configuration of jabberd2 please read chapters starting from no. 3 of Jabberd 2 Installation and Administration Guide.

Building Windows jabberd2

Thanks to Tomasz Sterna starting from revision #229 complete win32 support with Visual Studio 2005 project files is present in jabberd2 SVN repository. To build jabberd2 win32 please read the rest of this section. If you are interested in binaries go to Download section.

Prerequisites

All libraries shall be installed locally and added to VC Include files and Library files paths using Tools->Options->Project and Solutions->VC++ Directories. All libraries’ DLL files shall be copied to win32/bin folder and win32/bin/sasl folder for SASL plugins respectively.

  1. libidn, sources, linking to: libidn.lib, since there are no VC project files provided along with sources, please use the patch I provide at Downloads: libidn-win32+vc8.patch for libidn sources from the official distribution.
    Please read README.win32 created by the patch before compiling.
  2. Win32 OpenSSL, binaries, linking to: libeay32MT.lib ssleay32MT.lib
  3. Expat XML Parser win32, binaries, linking: libexpat.lib
  4. libgsasl, sources, linking to: libgsasl.lib, since there are no VC project files provided along with sources, please use the patch I provide at Downloadsgsasl-lib-win32+vc8.patch for gsasl sources from the official distribution.
    Please read README.win32 created by the patch before compiling.
  5. MySQL, auth & storage module, binary, linking to: libmysql.lib
  6. SQLite, auth & storage module, source, linking to: sqlite3.lib. Since there are no libraries for VC except DLLs you shall make one using sqlite-source-3.x.zip from SQLite downloads.
  7. xsltproc (libxml) for Windows and Subversion (svn-win32) to generate version.h from SVN using version.xsl. Put them into the executable PATH. Alternatively you can disable jabberd2.rc and version.xsl compilation in the project.
  8. WiX 3.0.3029.0 or newer for building MSI jabberd2 setup inside Visual Studio 2005 IDE

Building

After all prerequisite libraries are configured for use within VC open win32/jabberd2.sln and build all projects. You should have now fresh & ready Windows build of jabberd2 at win32/bin folder !

License

jabberd - Jabber Open Source Server

Copyright ? 2002 Jeremie Miller, Thomas Muldowney, Ryan Eatmon, Robert Norris

jabberd - win32 version patches & build

Copyright ? 2005-2007 Adam Strzelecki. All right reserved.This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Download

Binaries:

  • jabberd-2.1svn557-win32.msi 2008-02-05, 1.46 MB, win32 SVN revision #557 installer, modules: SQLite (default) auth & storage, MySQL auth & storage, NTLogon auth module
  • OpenSSL Runtime Version 0.9.8 or higher required by the jabberd2 win32 binaries & installer
  • vcredist_x86.exe 2006-12-02, 2.55 MB, Visual C++ 2005 Runtime Libraries, required by the jabberd2 win32 binaries & installer

Windows and Visual Studio compatibility patches:

  • libidn-win32+vc8.patch 2008-02-05, 13.2 KB, a patch file containing Windows fixes and Visual Studio 2005 project files for libidn, use it together with official distribution sources, tested with version 1.4 and git HEAD
  • gsasl-lib-win32+vc8.patch 2008-02-05, 33.3 KB, a patch file containing Windows fixes and Visual Studio 2005 project files for gsasl library, use it together with official distribution sources, tested with version 0.2.24 and git HEAD

62 Responses to “jabberd2 win32”

  1. Fadil Says:

    Hi, I successfully run the server but I cant register any account though the c2s log says the client is connected. I’m using Exodus as client and MySQL as the database backend. The MySQL server is running but I dont see any data written in the tables.

    Can you please tell what should I do ?

    Regards,
    Fadil

  2. Draco Says:

    Hi, I compiled the source successfully, but when I tried to debug an application (such as sm.exe), I got the error 0×80000003.

    Any help will be appreciated.

  3. Adam Says:

    @Fadil: I don’t really know how can I help you, since I don’t know what’s the problem? Is Exodus “online” with your Jabber server. If you’re using NTLogon authentication which is default, you should use your Windows username & password in order to log in.
    If you want to use MySQL authentication you should change this in c2s.xml.
    Still if you’re getting connected, that’s fine. With NTLogon nothing is written into the tables until you change your vCard or get offline message, stored in the database.

  4. Adam Says:

    @Draco: I think 0×80000003 may be related to missing VS 2005 runtime libraries. Did you install vcredist_x86.exe on the machine you want to run jabbberd2 first ?

  5. Draco Says:

    Adam,

    Thanks for your reply. I had installed vcredist_x86.exe that I downloaded from Microsoft website. Only the debug application crashed, the release seems ok.

    Another question, when I tried to run the release sm.exe and/or c2s.exe, I got this error “[error] cannot stringprep id wangkl, aborting 101
    ” from log file.

    My machine’s name is wangkl (ip: 192.168.1.84), I run everyone at the same machine.

    Any reply appreciated.

  6. Adam Says:

    @Draco: Debug crashes because normally you need to copy stuff from C:\Program Files\Microsoft Visual Studio 8\VC\redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT into the folder of application on remote machine that is compiled with “debug” CRT, as “debug” CRT is non-distributable.

    Regarding the [error] cannot stringprep id wangkl this points that there’s something wrong with your libidn. Did you used recipe from this page for compilation of libidn? Maybe you got some older files somewhere? Please check that libidn project is referring to proper win32/ files from libidn-0.6.x-win32-VC8-project.zip.

  7. Draco Says:

    Adam,

    I download the libidn-0.6.x-win32-VC8-project.zip and unzip it, open the sln file by VC8.

    When compile it, there are many files missing (..\lib\*.c), so I download the libidn-0.6.9.tar.gz, unzip it.

    Even though, there are some files missing (striconv.h,
    c-ctype.c, c-strcasecmp.c, c-strncasecmp.c, c-strcase.h, c-ctype.h, striconv.c), I get these files form libidn’s svn.

    Any problem with these steps ?

    My OS: WinSvr2003+SP1, VS2005+SP1.

    Best Regargs

  8. Draco Says:

    Adam,

    I get the new libidn-0.6.x-win32-VC8-project.zip, unzip libidn-0.6.9.tar.gz, modify stringprep.h, compile the project in VS2005 successfully.

    Copy the libidn.dll to the jabberd2/win32/bin folder, the same error found “cannot stringprep id wangkl”.

    Any suggestion ?

    Thanks & Best Regards

  9. Adam Says:

    @Draco: Ahh… maybe the problem raises because you haven’t took the latest version of libidn which is http://josefsson.org/libidn/releases/libidn-0.6.14.tar.gz. I just recompiled everything step by step from scratch and works for me OK with 0.6.14.

  10. Adam Says:

    I’ve updated binary distribution’s c2s.xml so the SQLite is now default auth & storage module, therefore jabberd2 for Windows is ready out of the box.
    NTLogon is no longer default (as IMHO it can be confusing), please read recipe at the beginning of this page how to use this module.

  11. Draco Says:

    Adam,

    I can start the router.exe, resolver.exe, c2s.exe, sm.exe, thanks for your help.

    After the four application started, there no listen on the port 5222/5223. Do I need to configure the windows firewall?

    I always have many problems ;)

    Thanks again.

  12. Adam Says:

    @Draco: Have a look into c2s.log. Do you see anything like:

    [notice] connection to router established
    [notice] [0.0.0.0, port=5222] listening for connections
    [notice] [0.0.0.0, port=5223] listening for SSL connections
    [notice] ready for connections

    If yes.. then you’re able to accept connections, however yes if you’re running on Windows with firewall you should enable ports 5222 5223 for client to your server connections and 5269 for server to your server connections.
    Normally anyway to test is this is working fine, from your server machine you shall be able to do telnet localhost 5222, and after you type “anything” you should see something like:

    <stream:stream>
    <stream:error>
    <xml-not-well-formed>
    <text>syntax error
    </text></stream:error></stream:stream>

    Good luck!

  13. Fadil Says:

    Hi Adam,

    Thanx for your reply. I will check this out and try to configure it using SQLite.

    Regards.

  14. Fadil Says:

    Hi again,

    I successfully connect and register a new account on my server using SQLite.
    I will now try it again using MySQL.

    Thanx again.

    Cheers.

  15. Draco Says:

    Adam?

    Every release application works well now. Thanks for your help :)

    Regards

  16. nivas Says:

    sir i want to down load the chat application from jabberd and want to activate or build according to our intranet network. may i know the process to download and work in our organisation.
    ok thankyou
    bye
    nivas

  17. nivas Says:

    can any one make as early as possible. will wait for reply.
    with regards
    nivas

  18. Adam Says:

    @nivas: Dear Mr.,
    This page is only about Windows build of jabberd2 XMPP server. So if you are willing to install XMPP Windows server at your organization you may download ready binaries at Downloads or build them yourself as stated at the beginning of this page. The binaries provided run out of the box, so you don’t need to configure anything extra.

    If you are looking for jabberd2 customization guide please read chapters starting from no. 3 of Jabberd 2 Installation and Administration Guide (Chapters 1-2 are for UNIX environments, so you better follow the guide of Windows installation from this page)

    If you are looking for particular clients for XMPP protocol please read Jabber Clients page at official Jabber site.

    However if you are NOT IT technician or system administrator or you need commercial guided assistance please contact me directly using form at Contact page.

  19. monkeyking Says:

    hi, first of all thank you for your win32 project.
    but this is my first time to use jabberd2, so i can’t run my jabberd2(jabberd-2.1svn236-win32.zip).
    could you tell me how to do or show me some guidebooks or other resources?
    thank you very much.

  20. Adam Says:

    @monkeykind: I wish to help, but I need more specific question. What does it mean you can’t run? Did you read this page guide completely?

  21. Draco Says:

    Adam,

    I come back this page with a new question. Now I try to use Oracle DB as the storage device, so I create a dll project by vc8, add the storage_oracle.c to this project. There are some syntax error while compiling at the below line:
    OCIDefine *arrFields[nNumberOfFields];

    Any suggestion about oracle storage/authreg? Even though the oracle authreg is not applied.

    Best Regards,

    Draco

  22. monkeyking Says:

    hi ,Adam,
    Thanks for your reply. my jabberd work well now.
    I will read the guide again to get more information

  23. Adam Says:

    @Draco: I know the Oracle storage isn’t in the SVN, but it’s available as separately downloaded patch. I’ll speak with main jabberd2 maintainer and see whether we can put this Oracle thing into the mainstream. Yet I think your problems are because GCC code isn’t always compliant to VC (which is more ISO strict). I shoot OCIDefine *arrFields[nNumberOfFields] error is caused because nNumberOfFields isn’t a constant, is it ?

    @monkeyking: Nice to hear that.. I’m on the way making some installer for Windows so hopefully for binary users only no guide will be needed, as the installer itself will give enough guidance to setup basic server.

  24. Fadil Says:

    Hi Adam,

    I can’t register any account on the server using the agsXMPP SDK (http://www.ag-software.de/index.php?page=agsxmpp-sdk) which, as far as I know, supports In-Band Registration.

    BTW, I can both register and login successfully using Exodus, though I got a message box that the server doesn’t support In-Band Registration.

    Can you please tell me what I have to do ?

    Thanks,
    Fadil

  25. Fadil Says:

    Hi again,

    I forgot something; I can login using the agsXMPP SDK but CANNOT register.

    Regards,
    Fadil

  26. Leonid Says:

    hi,
    the problem is the same as described before - can’t register new user by Psi client.
    The looks like: the client send request and stay waiting answer, but wasn’t receive it.
    Used SQLite db.

    wbr, Leonid

  27. Rubin Says:

    I can’t complie it.
    error
    Error 1 Error result 255 returned from ‘C:\WINDOWS\system32\cmd.exe’. Project
    Error 28 fatal error RC1015: cannot open include file ‘include/version.h’.

    d:\New\Jabberd2\jabberd2\win32\jabberd2.rc 1
    Error 37 fatal error RC1015: cannot open include file ‘include/version.h’.

    d:\New\Jabberd2\jabberd2\win32\jabberd2.rc 1
    Error 66 fatal error LNK1104: cannot open file ’sqlite3.lib’ storage_sqlite
    Error 104 fatal error LNK1104: cannot open file ’sm.lib’ storage_mysql
    Error 105 fatal error LNK1104: cannot open file ’sqlite3.lib’ authreg_sqlite
    Error 106 fatal error LNK1104: cannot open file ‘c2s.lib’ authreg_sspi
    Error 107 fatal error LNK1104: cannot open file ‘c2s.lib’ authreg_ntlogon
    Error 120 fatal error LNK1104: cannot open file ‘c2s.lib’ authreg_mysql
    Error 121 fatal error LNK1104: cannot open file ‘c2s.lib’ authreg_anon
    Error 122 fatal error LNK1104: cannot open file ’sm.lib’ mod_validate
    Error 123 fatal error LNK1104: cannot open file ’sm.lib’ mod_vacation
    Error 124 fatal error LNK1104: cannot open file ’sm.lib’ mod_template-roster
    Error 125 fatal error LNK1104: cannot open file ’sm.lib’ mod_status
    Error 126 fatal error LNK1104: cannot open file ’sm.lib’ mod_session
    Error 127 fatal error LNK1104: cannot open file ’sm.lib’ mod_roster
    Error 129 fatal error LNK1104: cannot open file ’sm.lib’ mod_privacy
    Error 130 fatal error LNK1104: cannot open file ’sm.lib’ mod_presence
    Error 131 fatal error LNK1104: cannot open file ’sm.lib’ mod_offline
    Error 132 fatal error LNK1104: cannot open file ’sm.lib’ mod_iq-version
    Error 133 fatal error LNK1104: cannot open file ’sm.lib’ mod_iq-time
    Error 134 fatal error LNK1104: cannot open file ’sm.lib’ mod_iq-private
    Error 135 fatal error LNK1104: cannot open file ’sm.lib’ mod_iq-ping
    Error 137 fatal error LNK1104: cannot open file ’sm.lib’ mod_iq-last
    Error 139 fatal error LNK1104: cannot open file ’sm.lib’ mod_help
    Error 140 fatal error LNK1104: cannot open file ’sm.lib’ mod_echo
    Error 141 fatal error LNK1104: cannot open file ’sm.lib’ mod_disco-publish
    Error 148 fatal error LNK1104: cannot open file ’sm.lib’ mod_disco
    Error 149 fatal error LNK1104: cannot open file ’sm.lib’ mod_deliver
    Error 155 fatal error LNK1104: cannot open file ’sm.lib’ mod_announce
    Error 156 fatal error LNK1104: cannot open file ’sm.lib’ mod_amp
    Error 157 fatal error LNK1104: cannot open file ’sm.lib’ mod_active
    Error 159 fatal error RC1015: cannot open include file ‘include/version.h’.

    d:\New\Jabberd2\jabberd2\win32\jabberd2.rc 1
    Error 168 fatal error RC1015: cannot open include file ‘include/version.h’.

    d:\New\Jabberd2\jabberd2\win32\jabberd2.rc 1
    Error 174 fatal error RC1015: cannot open include file ‘include/version.h’.

    d:\New\Jabberd2\jabberd2\win32\jabberd2.rc 1
    Error 176 fatal error LNK1104: cannot open file ’sm.lib’ mod_iq-vcard
    Error 177 fatal error LNK1104: cannot open file ‘msi.lib’ ca

  28. Adam Says:

    @Leonid: I’ll try to investigate it. It seems there’s still some problem with win32 mio when initialising connections.
    @Rubin: Is the xsltproc command is installed on your system? It is required in order to generate version.h files. See Prerequisites point 8.

  29. Mark Fruhling Says:

    I’m trying to install the jabberd-2.1svn333-win32.msi and I’m getting the error

    “Failed to open file c:\Program Files\jabberd2\\c2s.dist.xml, system error: -2147024786″

    I’m trying install on Windows XP Service pack 2.

  30. Mark Fruhling Says:

    Getting a error when installing the .msi on windows xp machine.

    “Failed to open XML file c:\Program Files\jabberd2\\c2s.dist.xml, system error -2147024786″

    Any reply is appreciated.

  31. Adam Says:

    Ahh… dammit! The bugfix is on the way Mark. I need just to get into SVN repo, coz we got some server problem.
    Best regards.

  32. Adam Says:

    Fixed with SVN 336 release in downloads… now MSI shall install jabberd2 without problem. Cheers!

  33. Mark Fruhling Says:

    Thanks for the updated .msi Adam. Got everything up and running on my windows xp laptop.

  34. Mark Fruhling Says:

    Adam,

    Trying to take the next step and get this running on my Windows Server 2003 Virtual Dedicated Host. The installation fails when trying to start the windows service. No real error message, just rolls back because the service cannot be started. The VC++ Redist is installed. I’m trying to figure out the dependencies that might be causing it to fail. Any ideas?

    Thanks…

  35. Nick Says:

    Same problem here with services not starting during install process. What permissions are necessary (i am installing as local admin so i thought i’d have the rights?!)

  36. Mark Fruhling Says:

    I tried manually installing the router.exe as a windows service and the error messages let me know that my server setup was missing libeay32.dll and ssleay32.dll. I copied these over from my development laptop and everything installed completely.

  37. Adam Says:

    @Mark: Ahhh thanks for those tips about OpenSSL DLLs, that saved me lot of time… I’ll try to embed some basic checks about OpenSSL & MSVC 2005 Runtime installation in the future setup versions.

  38. LiWen Says:

    I can?t complie it.

    Error 63 fatal error RC1015: cannot open include file ?stdint.h?

    Any suggestion ?
    Thanks & Best Regards

  39. bruno Says:

    quand j essaye d’installer le version win32svn l’installateur me dit qu’il ne peut installer les services alors que je suis admin de mon poste sous XP sp2 avec le redist d’installer

    a l’aide

  40. Genisys Says:

    Anybody help me?
    I couldn’t install binary file on my server becasuse of this error: “Service ‘Jabber 2 C2S’ (jabberd2c2s) failed to start. Verify that you have sufficient privileges to start system services.”. I setup with “localhost” parmeter and installed VC++ runtime already but still get that error.

  41. Adam Says:

    @All: Make sure you got OpenSSL & MSVC 2005 runtimes installed prior the installation.

  42. dems Says:

    Hi, I ran and installed the MSI binary jabberd-2.1svn557-win32.msi on my Windows Server 2003 box, and after installation with default settings, all services were running, but s2c was not listening on ports 5222/5223. The server is not firewalled at all. Any idea what the problem could be? Tried rebooting…
    Here’s the log:

    Wed Mar 12 18:54:55 2008 [notice] starting up
    Wed Mar 12 18:54:55 2008 [info] process id is 1364, written to ./c2s.pid
    Wed Mar 12 18:54:55 2008 [notice] modules search path: modules
    Wed Mar 12 18:54:55 2008 [info] loading ’sqlite’ authreg module
    Wed Mar 12 18:54:55 2008 [notice] initialized auth module ’sqlite’
    Wed Mar 12 18:54:55 2008 [notice] [fragtion-gw] configured; realm=fragtion-gw, registration enabled
    Wed Mar 12 18:54:55 2008 [notice] attempting connection to router at 127.0.0.1, port=5347

  43. Adam Says:

    @dems: Can you paste also your router.log file? Can you connect to 127.0.0.1:5347?

  44. Jeff Says:

    I am wondering what is the correct way of applying the win32 patch for gsasl-lib? I downloaded the patch file, using the gnu-win32 patch utility to run the patch file, got the following error. What did I do wrong? Thx for any advice. –Jeff

    C:\work\vnet\jabberd2>\work\tools\gnu-win32\bin\patch.exe -i “gsasl-lib-win32+vc8.patch”
    patching file README.win32
    can’t find file to patch at input line 19
    Perhaps you should have used the -p or –strip option?
    The text leading up to this was:
    ————————–
    |diff –git a/lib/gl/gc-gnulib.c b/lib/gl/gc-gnulib.c
    |index c199833..4675864 100644
    |— a/lib/gl/gc-gnulib.c
    |+++ b/lib/gl/gc-gnulib.c
    ————————–
    File to patch:

  45. Adam Says:

    @Jeff: Yes you need to cut off some of the path components that were generated by GIT, the best way would be using:

    patch --dry-run -p1 < gsasl-lib-win32+vc8.patch

    Remove dry-run and try again if it succeeds. If you are using source directly from GIT try:

    git-apply
  46. Jeff Says:

    Thanks Adam. That worked.

  47. Jeff Says:

    Now I got all the other projects built fine except authreg_mysql, with following error.

    Tried to add openssl’s lib (libeay32MTd.lib ssleay32MTd.lib) into the lib dependency list, didn’t help.

    Thx in advance for any advice.

    —— Build started: Project: authreg_mysql, Configuration: Debug Win32 ——
    Linking…
    Creating library ../../lib/debug/authreg_mysql.lib and object ../../lib/debug/authreg_mysql.exp
    authreg_mysql.obj : error LNK2019: unresolved external symbol _crypt referenced in function __ar_mysql_check_password
    ../../bin/debug/modules/authreg_mysql.dll : fatal error LNK1120: 1 unresolved externals
    Build log was saved at “file://c:\work\vnet\jabberd2\jabberd2-svn\win32\modules\authreg_mysql\Debug\BuildLog.htm”
    authreg_mysql - 2 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 31 up-to-date, 0 skipped ==========

  48. Justin Goldberg Says:

    What would you say about this page which states:

    Jabberd is native to Unix. Although libraries exist for installing Jabberd to Windows, you should make your corporate installation only to a flavor of Unix.

    Does this mean that I should run Jabberd2 under a virtual machine? If I do, what is a good secure virtual machine which can run jabberd2 fast when supporting ~15 max users?

  49. Justin Goldberg Says:

    You might want to edit the post to include links to those bloated msvc 2005 runtimes, and openssl dlls.

  50. Justin Goldberg Says:

    Whoops, I didn’t even read the whole post. You can delete the last comment and edit this one.

    But leave this:
    Are there any other stable builds of jabberd2 for windows?

  51. treemon Says:

    D:\jabber\server\gsasl\gsasl-0.2.9>patch –dry-run -p1

  52. Nujoom Says:

    Hi,
    I am also facing the issue as Dems facing. I could install jabber2 by using jabberd-2.1svn557-win32.msi and after that I could see all the services have started successfully but s2c is not listening to port 5222/3. The server is not firewalled at all. Any idea what the problem could be? I tried restarting all the services manually but no hope. I could see xml parse error in router log:
    Thu Mar 27 14:16:13 2008 [notice] starting up
    Thu Mar 27 14:16:13 2008 [info] process id is 280, written to ./router.pid
    Thu Mar 27 14:16:13 2008 [notice] loaded user table (1 users)
    Thu Mar 27 14:16:13 2008 [notice] loaded filters (0 rules)
    Thu Mar 27 14:16:13 2008 [notice] [127.0.0.1, port=5347] listening for incoming connections
    Thu Mar 27 14:16:14 2008 [notice] [127.0.0.1, port=3792] connect
    Thu Mar 27 14:16:16 2008 [notice] [127.0.0.1, port=3794] connect
    Thu Mar 27 14:16:17 2008 [notice] [127.0.0.1, port=3795] connect
    Thu Mar 27 14:16:18 2008 [notice] [127.0.0.1, port=3796] connect
    Thu Mar 27 14:54:58 2008 [notice] [127.0.0.1, port=4011] connect
    Thu Mar 27 14:55:02 2008 [notice] [127.0.0.1, port=4011] error: XML parse error (syntax error)
    Thu Mar 27 14:55:02 2008 [notice] [127.0.0.1, port=4011] disconnect

  53. Nujoom Says:

    Also I am able to connect to 127.0.0.1:5347. Please help.

  54. Jeff Says:

    Hi, Adam

    I still could not compile the mysql_authreg.dll, but I downloaded your binaries, this seems to work. Now I can start all the services, but my problem is, c2s can not get authenticated by router. Following is c2s.log and router.log. I’m pretty new to jabberd2 server code, so not even sure where should I start looking at the code to find out the problem. Any hint would be greatly appreciated. Thanks.

    ================ c2s.log ====================================================
    Mon Apr 07 00:42:10 2008 [notice] starting up
    Mon Apr 07 00:42:10 2008 [info] process id is 3488, written to ./c2s.pid
    Mon Apr 07 00:42:10 2008 [notice] modules search path: modules
    Mon Apr 07 00:42:10 2008 [info] loading ‘mysql’ authreg module
    Mon Apr 07 00:42:10 2008 [notice] initialized auth module ‘mysql’
    Mon Apr 07 00:42:10 2008 [notice] [pub-vm.myhome.mydomain] configured; realm=pub-vm.myhome.mydomain, registration enabled
    Mon Apr 07 00:42:10 2008 [notice] attempting connection to router at 127.0.0.1, port=5347
    ==========================================================================

    ================ router.log ==================================================
    Mon Apr 07 00:42:10 2008 [notice] starting up
    Mon Apr 07 00:42:10 2008 [info] process id is 3532, written to ./router.pid
    Mon Apr 07 00:42:10 2008 [notice] loaded user table (1 users)
    Mon Apr 07 00:42:10 2008 [notice] loaded filters (0 rules)
    Mon Apr 07 00:42:10 2008 [notice] [127.0.0.1, port=5347] listening for incoming connections
    Mon Apr 07 00:42:10 2008 [notice] [127.0.0.1, port=1340] connect
    Mon Apr 07 00:42:14 2008 [notice] [127.0.0.1, port=1341] connect
    Mon Apr 07 00:42:17 2008 [notice] [127.0.0.1, port=1342] connect
    Mon Apr 07 00:42:21 2008 [notice] [127.0.0.1, port=1344] connect
    ==========================================================================

  55. Sob Says:

    Jeff> Building of authreg_mysql on Windows is broken since revision 539 which added crypted passwords support in mysql. It seems that crypt() function is not available on Windows.

    The second problem reminds me the one I had. When I run jabberd2 executables from command line under Administrator account, everything worked ok. But when I installed them as services under different account, it behaved exactly as is shown in your logs. It turned out that c2s was trying to read some strange file from C:\Documents and Settings\ \Application Data\Microsoft\Crypto\RSA\ which didn’t exist. I created it (inspired by the ones belonging to other accounts) and it works fine since. You can try FileMon to check if it’s your case too.

  56. Jeff Says:

    I am using the Administrator account. Here is the debug output of router when sm tries to connect to it. The router’s output is very much similar when c2s connects to it.

    Sun Apr 13 02:43:01 2008 [notice] starting up
    Sun Apr 13 02:43:01 2008 [info] process id is 4028, written to ./router.pid
    Sun Apr 13 02:43:01 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\user.c:34 loading user table
    Sun Apr 13 02:43:01 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\user.c:89 remembering user ‘jabberd’
    Sun Apr 13 02:43:01 2008 [notice] loaded user table (1 users)
    Sun Apr 13 02:43:01 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\aci.c:37 loading aci
    Sun Apr 13 02:43:01 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\aci.c:56 building list for ‘all’
    Sun Apr 13 02:43:01 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\aci.c:77 added ‘jabberd’
    Sun Apr 13 02:43:01 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\filter.c:51 loading filter
    Sun Apr 13 02:43:01 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\filter.c:96 building filter list
    Sun Apr 13 02:43:01 2008 [notice] loaded filters (0 rules)
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\sasl_gsasl.c:691) initialising sasl plugin
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\sasl_gsasl.c:718) sasl context initialised
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\env.c:75) plugin initialised (index 0)
    mio.c#471: created listener class
    mio.c#471: created listener window (2e0404)
    mio.c#323: mio to listen on 5347 [0.0.0.0]
    mio.c#99: adding fd #1852
    Sun Apr 13 02:43:02 2008 [notice] [0.0.0.0, port=5347] listening for incoming connections
    mio.c#212: mio running for 5
    Sun Apr 13 02:43:07 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\main.c:446 running time checks
    Sun Apr 13 02:43:07 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\main.c:451 next time check at 1208079847
    mio.c#212: mio running for 5
    mio.c#57: get mio event 8 on socket #1852
    mio.c#228: mio working: 1
    mio.c#153: accepting on fd #1852
    mio.c#164: new socket accepted fd #1824, 127.0.0.1:1534
    mio.c#99: adding fd #1824
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:907 accept action on fd 1824
    Sun Apr 13 02:43:11 2008 [notice] [127.0.0.1, port=1534] connect
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\sx.c:53) allocated new sx for 1824
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:236) doing server init for sx 1824
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:251) waiting for stream header
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:254) tag 1824 event 0 data 0×0
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:516 want read
    mio.c#57: get mio event 1 on socket #1852
    mio.c#153: accepting on fd #1852
    mio.c#57: get mio event 1 on socket #1824
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:858 read action on fd 1824
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:190) 1824 ready for reading
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:196) tag 1824 event 2 data 0xafe0a0
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:526 reading from 1824
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:584 read 98 bytes
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:212) passed 98 read bytes
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\chain.c:93) calling io read chain
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:236) decoded read data (98 bytes):
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:118) stream request: to (null) from (null) version 1.0
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:133) 1824 state change from 0 to 1
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:151) stream id is a9uarzy394b115n7ftzbk4clmuujrundnjqtr51n
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:181) prepared stream response:
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:252) tag 1824 event 1 data 0×0
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:521 want write
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:872 write action on fd 1824
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:324) 1824 ready for writing
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:282) encoding 144 bytes for writing:
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\chain.c:79) calling io write chain
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:345) handing app 144 bytes to write
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:346) tag 1824 event 3 data 0xafe2d8
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:591 writing to 1824
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:595 144 bytes written
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:29) stream established
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:39) 1824 state change from 1 to 3
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:40) tag 1824 event 4 data 0×0
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\server.c:45) building features nad
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\sasl_gsasl.c:238) offering sasl mechanisms
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:379) tag 1824 event 0 data 0×0
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:516 want read
    mio.c#57: get mio event 2 on socket #1824
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:872 write action on fd 1824
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:324) 1824 ready for writing
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:282) encoding 66 bytes for writing: <stream:features xmlns:stream=’http://et
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\chain.c:79) calling io write chain
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:345) handing app 66 bytes to write
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:346) tag 1824 event 3 data 0xafe708
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:591 writing to 1824
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:595 66 bytes written
    sx (c:\work\vnet\jabberd2\jabberd2-svn\sx\io.c:379) tag 1824 event 0 data 0×0
    Sun Apr 13 02:43:11 2008 c:\work\vnet\jabberd2\jabberd2-svn\router\router.c:516 want read
    mio.c#212: mio running for 5
    mio.c#212: mio running for 5
    mio.c#212: mio running for 5

  57. yangshuai Says:

    Hi Adam,
    please help me how to use the patch file for libidn.
    I have put the libidn-win32+vc8.patch in the libidn-1.4 package. Then I typed the command as follows

    patch -p1 < “libidn-win32+vc8.patch” . But It goes wrong. The wrong is
    ” patching file README.win32
    Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application’s support team for more information.”

    What’s wrong with it.?I am not familiar with patch file, so I want to get your help. Thanks advanced

  58. Adam Says:

    @Jeff, @Sob: Thanks for all of the logs, hopefully I can find something about c2s not running properly on the service account. Reading those crypto files from C:\Documents and Settings is indeed bizarre. I’m bit desynchronized with latest trunk with all the Windows fixes, and it happens quite often I’m fixing some Windows incompatibility few revisions afterwards. Lately I haven’t touch jabberd2 much, but I’ll try to focus on making it updated for Windows.

    @yangshuai: What kind of patch command you’re using. Where it does came from? Mine works fine (from MSYS I believe). Also it shouldn’t crash regardless of the input data.

  59. yangshuai Says:

    I used the GnuWin32 tools. It doesn’t work.

    I have tried to patch using MSYS. Yes, the patchfile works. Thank you very much.

  60. Manohar Says:

    +1 as Jeff and Nujoom : I can connect to 5347 but the c2s log sits at connecting to router. Router log shows the connection. I think reading the datagram in c2s may be broken.

    Are there any archives of older downloads. I was not able to find. I wanted to check those out.

  61. Mauro Says:

    Does your jabberd2 win32 build include LDAP authentication support?

  62. had1117 Says:

    I installed jabberd-2.1svn557-win32.msi today and configured to use Active Directory in c2s.xml. I am getting following error:
    Fri May 15 15:55:17 2008 [notice] starting up
    Fri May 15 15:55:17 2008 [info] process id is 4028, written to ./c2s.pid
    Fri May 15 15:55:17 2008 [notice] modules search path: modules
    Fri May 15 15:55:17 2008 [info] loading \’ldap\’ authreg module
    Fri May 15 15:55:17 2008 [error] failed loading authreg module \’ldap\’ (errcode: 7e)

    I looked at authreg.c and found out that it is trying to load \’authreg_ldap.dll\’. Does anyone know where I cat get authreg_ldap.dll?

Leave a Reply

*
To prove you're a person (not a spam script), type the answer to the math equation shown in the picture. Click on the picture to hear an audio file of the equation.
Click to hear an audio file of the anti-spam equation