Windows and IPv6

ejabberd 2.1.6 official binary, Windows 7 Pro x64

config:

{listen,
[
  {(5222, "::"}, ejabberd_c2s, [<options>]}
]}.

result:

=ERROR REPORT==== 2011-03-15 03:21:36 ===
E(<0.265.0>:ejabberd_listener:512) : Failed to open socket:
  {5222,ejabberd_c2s,[inet6,{ip,{0,0,0,0,0,0,0,0}}]}
Reason: invalid argument

Tested on two separate machines. Is it me doing something wrong or is ejabberd's IPv6 support broken on Windows? I spent last two hours searching for answer, but with no luck.

This is what happens when it

This is what happens when it works correctly (tested in my Linux):

$ erl
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit]
 [smp:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.6.5  (abort with ^G)
1> gen_tcp:listen(5221, [inet6]).
{ok,#Port<0.384>}

The problem appears with ejabberd installed in Windows XP, and in Windows 7 Starter:

werl.exe
Eshell V5.6.4  (abort with ^G)
1> gen_tcp:listen(5221, [inet6]).
{error,einval}
2>

I installed Erlang/OTP R14B02 in Windows 7, and the listen returns ok. So, it may be a problem with older Erlangs. But recompiling ejabberd in Windows is difficult.

Thank you for info. Good to

Thank you for info. Good to know that it's not my fault. I may try the compilation when I'm in mood to learn something new. :)

Syndicate content