I have problem with opening SCTP socket. See
-----------
Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.7.5 (abort with ^G)
1> gen_sctp:open().
** exception error: bad argument
in function gen_sctp:open/1
called as gen_sctp:open([])
2>
-------------
I try it on SLES 11 64bit (kernel 2.6.27).
SCTP on this system works well if I use sctp_darn (from lksctp-tools package) or if I use OpenJDK7 with SCTP support.
Erlang/OTP has been configured and compiled with --enable-sctp option.
What shall I check to find where the problem could be?
When I try to localize problem I have found that following call fails:
2> prim_inet:open(sctp).
{error,badarg}
Any hint is welcome.
Best regards,
Tomas
________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questio...@erlang.org
I ran into the same issue with RB13B04 on RH ES running 2.6.18-92 with
lksctp1.0.9 that I had installed from source.
In the end I removed 1.0.9 and installed an RPM for lksctp 1.0.7 and after
that Erlang SCTP worked. I expect the problem was due to the way I had
installed 1.0.9 and not a dependency on 1.0.7 but this should you some idea
where to look.
Regards
Mark.
/Anders
lksctp-tools
lksctp-tools-doc
lksctp-tools-devel
Br,
Shehan
Hello,
Any hint is welcome.
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5186 (20100610) __________
The message was checked by ESET NOD32 Antivirus.
I had already lksctp-tools and lksctp-tools-devel installed.
Also output of Erlan configuration and make looks good from SCTP point of view.
checking for netinet/sctp.h... yes
checking whether SCTP_UNORDERED is declared... yes
checking whether SCTP_ADDR_OVER is declared... yes
checking whether SCTP_ABORT is declared... yes
checking whether SCTP_EOF is declared... yes
checking whether SCTP_SENDALL is declared... no
checking whether SCTP_ADDR_CONFIRMED is declared... yes
checking for struct sctp_paddrparams.spp_pathmtu... yes
checking for struct sctp_paddrparams.spp_sackdelay... yes
checking for struct sctp_paddrparams.spp_flags... yes
checking for struct sctp_remote_error.sre_data... yes
checking for struct sctp_send_failed.ssf_data... yes
I tried also precompiled Erlang from SUSE repository (http://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_11/x86_64/)
but unfortunately with the same result.
Any other idea what to check?
I will try what happens on 32bit system.
Best regards,
Tomas
Check your build logs, that you run what you build
and then check whith strace what happens during emulator start:
$ strace -f -o strace.txt erl
Erlang R13B04 (erts-5.7.5.1) [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]
Eshell V5.7.5.1 (abort with ^G)
1> [Ctrl-\]
$
$ less strace.txt # search for libsctp
There should be a section that tries to load libsctp.so from
several locations and one should succeed or the sctp socket
open will fail. Such as:
13418 open("/home/raimo/lib/tls/x86_64/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/home/raimo/lib/tls/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/home/raimo/lib/x86_64/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/home/raimo/lib/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/opt/local/lib/tls/x86_64/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/opt/local/lib/tls/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/opt/local/lib/x86_64/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/opt/local/lib/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/usr/local/lib/tls/x86_64/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/usr/local/lib/tls/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/usr/local/lib/x86_64/libsctp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
13418 open("/usr/local/lib/libsctp.so.1", O_RDONLY) = 7
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
I have found that it did not try to load libsctp at all.
When I clear everything and run ./configure and make again it works now.
Thanks again for support.
Tomas
1> X=gen_sctp:open().
{ok,#Port<0.503>}
2> {ok,S}=X.
{ok,#Port<0.503>}
3> gen_sctp:close(S).
ok
4>