Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238052 - net-im/jabberd-1.6.1.1-r1: mio unable to listen without ipv6
Summary: net-im/jabberd-1.6.1.1-r1: mio unable to listen without ipv6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Thomas Anderson (tanderson) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-18 22:49 UTC by manwe
Modified: 2009-01-14 00:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Jabberd 1.6 config (jabberd.xml,7.82 KB, application/xml)
2008-10-09 11:19 UTC, manwe
Details
Workaround-patch for the ebuild file (patch,448 bytes, patch)
2009-01-12 13:16 UTC, Patrick Beckmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description manwe 2008-09-18 22:49:01 UTC
Compiled without ipv6 USE, jabberd still doesn't want to listen:

Fri Sep 19 00:43:04 2008  deliver.cc:614 DELIVER 3:-internal <log xmlns='jabber:server' type='alert' from='-internal'>mio unable to listen on 5269 [80.53.26.122]: jabberd already running or invalid interface?</log>

Fri Sep 19 00:44:51 2008  log.cc:221 <log xmlns='jabber:server' type='alert' from='-internal'>mio unable to listen on 5553 [127.0.0.1]: jabberd already running or invalid interface?</log>

Of course ports were free and no jabberd was running. Version 1.4.4 is almost working almost, takes 100% cpu [loadavg 1.0], so I really need to switch to 1.6 asap.


Reproducible: Always

Steps to Reproduce:
1. jabberd -D -h jabber.info.pl




# emerge --info
Portage 2.1.4.4 (default/linux/x86/2008.0, gcc-3.4.6-hardened, glibc-2.3.6-r5, 2.6.16-hardened-r11-drath2v i686)
=================================================================
System uname: 2.6.16-hardened-r11-drath2v i686 Pentium III (Coppermine)
Timestamp of tree: Thu, 18 Sep 2008 21:45:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-O2 -march=pentium3 -pipe -fomit-frame-pointer"
Comment 1 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-09-20 13:16:54 UTC
Would you paste the output of `emerge -pv` jabberd please?
Comment 2 manwe 2008-09-20 16:57:17 UTC
Sure can. Only mysql USE is turned on. 

# emerge -pv jabberd

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild     U ] net-im/jabberd-1.6.1.1-r1 [1.4.4-r3] USE="mysql -ipv6 -postgres (-debug%) (-ssl%*)" 0 kB
Comment 3 manwe 2008-09-24 12:20:59 UTC
Shameless bump. Any ideas how to solve this? 
Comment 4 michal Babuska 2008-10-09 04:31:20 UTC
(In reply to comment #3)
> Shameless bump. Any ideas how to solve this? 
> 

I've ran into something similar. Specifying exact interfaces to listen on in jabber.xml solved the problem for me.
&lt;ip port="5222"&gt;PUT IP OF THE INTERFACE HERE&lt;/ip&gt . 
Be sure to have &lt;ip port="5222"&gt;::&lt;/ip&gt; commented out.

Apply this trick to all desired interfaces and all the ports (5223, 5269 if you use them).
Comment 5 manwe 2008-10-09 11:13:04 UTC
I've found this solution in google few days before decided to report a bug. Unfortunately that didn't help.

# egrep '(ip|tls) port' /etc/jabber/jabberd.xml.16
      <ip port="5222">80.53.26.122</ip>
      <tls port="5223">80.53.26.122</tls>
      <ip port="5269">80.53.26.122</ip>

and transports:

# grep -B 1 '<port>' /etc/jabber/jabberd.xml.16
          <ip>127.0.0.1</ip>
          <port>5553</port>
--
           <ip>127.0.0.1</ip>
           <port>5363</port>
--
          <ip>127.0.0.1</ip>
          <port>7005</port>
--
          <ip>127.0.0.1</ip>
          <port>5555</port>
Comment 6 manwe 2008-10-09 11:19:20 UTC
Created attachment 167724 [details]
Jabberd 1.6  config

Whole config [ only <secret>s removed ]. Maybe there's a mistake which causes this. I can't find anything.
Comment 7 Bruce Karsh 2008-10-21 04:54:52 UTC
I've emerged jabberd-1.6.1.1-r1 with -ipv6 and strace shows it trying to make a PF_INET6 socket.

socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 EAFNOSUPPORT (Address family not supported by protocol)

Here's how I set up the port in jabberd.xml:

<ip port="5222">xx.xx.xxx.xx</ip>
Comment 8 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2008-10-26 18:13:47 UTC
Given that, I'd recommend going upstream with this bug. It seems to be a problem in upstream's code, not our packaging. I'm closing as RESO UPSTREAM but feel very free to reopen if upstream can't do anything about it(saying it's our problem).
Comment 9 Patrick Beckmann 2009-01-12 13:16:11 UTC
Created attachment 178165 [details, diff]
Workaround-patch for the ebuild file
Comment 10 manwe 2009-01-13 04:20:28 UTC
It works :D Many thanks. Btw. I can understand --enable-ssl, but what's the difference between $(use_enable ipv6) and $(use ipv6 && echo --enable-ipv6)? 
Comment 11 Patrick Beckmann 2009-01-13 13:18:30 UTC
(In reply to comment #10)
> but what's the difference between $(use_enable ipv6) and $(use ipv6 && echo --enable-ipv6)? 

Whether the use flag is set or not, use_enable produces output: --enable-ipv6 or --without-ipv6 in this case. "configure" seem to interprete the latter like the first. The workaround only produces an output if the use flag is set. I do not know the exact mechanisms...
Comment 12 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2009-01-14 00:19:06 UTC
Reopen as I can reproduce.
Comment 13 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2009-01-14 00:19:31 UTC
+  13 Jan 2009; Thomas Anderson <gentoofan23@gentoo.org>
+  jabberd-1.6.1.1-r1.ebuild:
+  Fix weirdness in configure, as reported in bug #238052. Thanks to Patrick
+  Beckmann for the patch.
+

Thanks for the patch and the heads up on what was wrong!