When connecting to an ejabberd server, profanity just quits abruptly

135 views
Skip to first unread message

nithi...@gmail.com

unread,
Dec 30, 2016, 7:08:18 AM12/30/16
to profanity development
Hi,

I am completely new to the world of XMPP and profanity and so the below query might sound very basic.
I have run an ejabberd server using profanity as my client.
When i try to connect to my registered account in ejabberd via the /connect command, profanity abruptly exits and returns to my prompt. I enabled the profanity debug option but I do not unfortunately see anything useful from it. I have copied it for you here.

29/12/2016 07:31:39: prof: INF: Starting Profanity (0.5.0)...
29/12/2016 07:31:39: prof: INF: Initialising chat logs
29/12/2016 07:31:39: prof: INF: Initialising groupchat logs
29/12/2016 07:31:39: prof: INF: Loading accounts
29/12/2016 07:31:39: prof: INF: Initialising UI
29/12/2016 07:31:39: prof: INF: Initialising XMPP
29/12/2016 07:31:39: prof: INF: Loading capabilities cache
29/12/2016 07:31:39: prof: INF: Initialising commands
29/12/2016 07:31:39: prof: INF: Initialising contact list
29/12/2016 07:31:39: prof: INF: Loading TLS certificates
29/12/2016 07:31:39: prof: INF: Starting main event loop
29/12/2016 07:31:53: prof: DBG: Input received: /connect bvp@localhost
29/12/2016 07:31:56: prof: INF: Connecting without account, JID: bvp@localhost/profanity
29/12/2016 07:31:56: prof: INF: Connecting as bvp@localhost/profanity


I have been trying to find out if there's a problem with the server side but i dont see anything suspicious. Is there something else I need to do in profanity ?

Thanks,
Nithin Mohan

pasis

unread,
Dec 31, 2016, 3:25:26 PM12/31/16
to profanity development, nithi...@gmail.com
Hello,

It sounds like a crash. As far as I know Profanity doesn't quit unless user types `/quit`. Do you see any message above the terminal prompt, e.g. "Segmentation fault"?

Could you tell what libstrophe version do you use and how did you installed it: from package manager or manually?

Dmitry.

nithi...@gmail.com

unread,
Jan 2, 2017, 7:16:00 AM1/2/17
to profanity development, nithi...@gmail.com
Hello Dmitry,

Thanks for the response.
There was no segmentation fault message seen.
The libstrophe version is 0.9.1. The package was installed manually.
Please let me know if there is any other information required too.

Regards,
Nithin Mohan

Boothj5

unread,
Jan 2, 2017, 10:43:13 AM1/2/17
to profanity development, nithi...@gmail.com
Hey, as Dmity says, definitely sounds like a crash. Is there a "core" file in the directory from which you ran profanity?

I have a local ejabberd set up on a couple of my machines working ok.

1) Have you successfully connected to any non local servers?
2) Could you attach the output of /account show <account> for the account you're trying to connect with.
3) Also, the ejabberd config file might be useful.

Make sure to remove any passwords etc if you attach this info.

Even if there is a config problem though, profanity obviously still shouldn't crash, so sounds like a bug.

Thanks,

James.

pasis

unread,
Jan 2, 2017, 4:33:36 PM1/2/17
to profanity development, nithi...@gmail.com
If you have gdb, the easiest way to find the problem is to run Profanity under gdb:

$ gdb profanity
(gdb) run -l DEBUG

nithi...@gmail.com

unread,
Jan 3, 2017, 5:32:11 AM1/3/17
to profanity development, nithi...@gmail.com
Hello,

I don't see any "core" file in the directory I am running profanity from.

1) I have been trying to connect to only local servers (localhost). Haven't tried non-local servers yet. Will give that a try.
2) I hadn't added an account in my earlier trials. I added one now and the result is the same.

03:43:50 - Account prakash:
03:43:50 - enabled : TRUE
03:43:50 - jid : bvp@localhost
03:43:50 - resource : profanity
03:43:50 - muc service : conference.localhost
03:43:50 - muc nick : bvp
03:43:50 - Last presence : online
03:43:50 - Login presence : online
03:43:50 - Priority : chat:0, online:0, away:0, xa:0, dnd:0

3) The ejabberd config file has not been changed and is exactly the same as the one available in the ejabberd github.

https://github.com/processone/ejabberd/blob/master/config/ejabberd.yml

When I posted the issue first I had used a modified config file but then after stopping ejabberd , it would never start again no matter what I tried. So i replaced the file with the original one.
If you need more information, please let me know.

And yes, thanks for the quick responses.

Regards,
Nithin Mohan

nithi...@gmail.com

unread,
Jan 3, 2017, 5:32:58 AM1/3/17
to profanity development, nithi...@gmail.com
Hello,

I shall try to run profanity with gdb next.

Regards,
Nithin Mohan

nithi...@gmail.com

unread,
Jan 3, 2017, 6:45:41 AM1/3/17
to profanity development, nithi...@gmail.com
One more thing I missed to mention, I am running both ejabberd and Profanity on an Ubuntu 16.04. Hope there are no compatibility issues with this version.

Regards,
Nithin Mohan

nithi...@gmail.com

unread,
Jan 5, 2017, 10:57:45 AM1/5/17
to profanity development, nithi...@gmail.com
Hello,

Sorry I was busy with other stuff at work.

I used gdb and found that it abruptly quits when below api is called
xmpp_conn_set_flags(conn.xmpp_conn, XMPP_CONN_FLAG_MANDATORY_TLS);

from connection_connect().

I couldn't find the definition for xmpp_conn_set_flags(). I checked if I missed anything while compiling libstrophe but the steps seem to be correct.

Can you tell me what's wrong ?

Thanks,
Nithin Mohan

pasis

unread,
Jan 6, 2017, 6:15:06 PM1/6/17
to profanity development, nithi...@gmail.com
Hello,

xmpp_conn_set_flags() appeared in libstrope-0.9.0, see src/conn.c.

Could you provide more info, please?
1. What exactly steps you made to build libstrophe and Profanity? The most important part is where they are installed.
2. Run `strace profanity 2>strace.txt` and find what libstrophe is used: `grep libstrophe strace.txt`.
3. Check whether libstrophe from the 2nd paragraph contains required symbol (put proper library path):
    nm -D /usr/lib64/libstrophe.so.0 | grep xmpp_conn_set_flags

nithi...@gmail.com

unread,
Jan 9, 2017, 5:41:05 AM1/9/17
to profanity development, nithi...@gmail.com
Hello,

Your suggestions helped especially the strace.
I found out that there were 2-3 installations of libstrophe and the one that profanity was pointing to didn't the xmpp_conn_set_flags defined in it.Once I pointed it(soft link) to the correct libstrophe installation, I was able to connect and also chat.
I just discovered this is the same case as:

https://github.com/boothj5/profanity/issues/860

Thanks for the help !

Regards,
Nithin Mohan

Reply all
Reply to author
Forward
0 new messages