[Spread-users] port limitation to int16
John Schultz
jschultz at spreadconcepts.com
Thu Aug 8 10:36:22 EDT 2013
Try this patch out (on 4.3) to see if it fixes your issue:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: daemon_port.patch
Type: application/octet-stream
Size: 1800 bytes
Desc: not available
Url : http://lists.spread.org/pipermail/spread-users/attachments/20130808/5218c0bd/attachment-0001.obj
-------------- next part --------------
Cheers!
-----
John Lane Schultz
Spread Concepts LLC
Cell: 443 838 2200
On Aug 8, 2013, at 9:41 AM, Johannes Wienke wrote:
Hi,
On 07.08.13 16:04 schrieb John Schultz:
> I see it. It looks like that limitation was removed with 4.3.0.
>
> I think you can safely remove that check from your version or upgrade to 4.3.
I just tried this with version 4.3 with mixed results. If I use e.g.
48000 at localhost in the SP_connect call, the connection succeeds.
However, if I try to use a local socket by providing only the port
number connection does not work. Attached is a test program which
demonstrates this problem.
The connection problems in the case of socket communication are actually
caused by the daemon itself. Looking at the output at start I can see:
Conf_load_conf_file: My name: localhost, id: 127.0.0.1, port: -17536
Membership id is ( 2130706433, 1375968222)
--------------------
Configuration at localhost is:
Num Segments 1
1 127.0.0.255 -17536
localhost 127.0.0.1
====================
Notice the negative port numbers. There is an integer overflow in the
daemon and this does not only exist in the printing. Actually the socket
file in /tmp is really called -17536. The client API doesn't seem to
have this overflow and tries to correctly find a file with name 48000.
Strangely, the TCP listen port is constructed without this overflow and
the daemon correctly listens on 48000:
languitar at miles:~$ lsof -i tcp:48000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
spread 72864 languitar 6u IPv4 0x665a353ce83db745 0t0 TCP
*:nimcontroller (LISTEN)
Kind regards,
Johannes
<main.cpp><spread.conf>_______________________________________________
Spread-users mailing list
Spread-users at lists.spread.org
http://lists.spread.org/mailman/listinfo/spread-users
More information about the Spread-users
mailing list