<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>Trouble Talking Between 2 Servers</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi,<BR>
<BR>
I was wondering if someone can run their eye over my config's, as I can't seem to get 2 spread servers talking to each other.<BR>
<BR>
The machine host names are spread1 (10.1.1.213) and spread2 (10.1.1.214)<BR>
They are freebsd 6.1 running spread 3.17.3 as a freebsd port installation.<BR>
I have the port 4803 open on both boxes, and have tested that using separate perl scripts that communicate over sockets.<BR>
<BR>
I am using 2 perl scripts to test communications, and they seem to work ok when run on a single server, but not across 2 servers.<BR>
<BR>
These are the config files:<BR>
-----------------------><BR>
### Spread 1 Config File<BR>
Spread_Segment 10.1.1.255:4803 {<BR>
spread2 10.1.1.214<BR>
spread1 10.1.1.213<BR>
}<BR>
DebugFlags = { ALL !DATA_LINK }<BR>
EventLogFile = /var/log/spread.log<BR>
EventTimeStamp = "[%a %d %b %Y %H:%M:%S]"<BR>
SocketPortReuse = ON<BR>
AllowedAuthMethods = "NULL"<BR>
-----------------------><BR>
### Spread 2 Config File<BR>
Spread_Segment 10.1.1.255:4803 {<BR>
spread2 10.1.1.214<BR>
spread1 10.1.1.213<BR>
}<BR>
DebugFlags = { ALL !DATA_LINK }<BR>
EventLogFile = /var/log/spread.log<BR>
EventTimeStamp = "[%a %d %b %Y %H:%M:%S]"<BR>
SocketPortReuse = ON<BR>
AllowedAuthMethods = "NULL"<BR>
-----------------------><BR>
<BR>
Here is the script that waits for a message to come in:<BR>
-----------------------><BR>
#!/usr/bin/perl<BR>
use strict;<BR>
use Spread;<BR>
use Data::Dumper;<BR>
# Connect<BR>
my($mbox, $private_group) = Spread::connect( {<BR>
spread_name => '4803@10.1.1.214',<BR>
private_name => 'cam' . $$,<BR>
} );<BR>
<BR>
my $sperrno;<BR>
my $sperrorno;<BR>
<BR>
# Join groups<BR>
my(@group_to_join) = ( 'Group1');<BR>
my(@joined_groups) = grep( Spread::join($mbox, $_), @group_to_join );<BR>
<BR>
my($messsize) = Spread::poll($mbox);<BR>
if(defined($messsize)) { print "Next message: $messsize bytes\n"; }<BR>
else { print "Spread::poll $sperrno\n"; }<BR>
<BR>
while (1) {<BR>
# Receive messages (see spread's man pages for more description)<BR>
my($service_type, $sender, $groups, $mess_type, $endian, $message) =<BR>
Spread::receive($mbox);<BR>
next if ($message =~ m/^\@/);<BR>
#next if ($message =~ m/^?/);<BR>
print "Got Message: [" . $message . "] From: [" . $sender . "]\n";<BR>
}<BR>
<BR>
# Disconnect<BR>
if(Spread::disconnect($mbox)) { print "Successful disconnect\n"; }<BR>
else { print "Spread::disconnect -- $sperrorno\n"; }<BR>
<BR>
exit;<BR>
-----------------------><BR>
<BR>
And here is the script that sends a message:<BR>
-----------------------><BR>
#!/usr/bin/perl<BR>
use strict;<BR>
use Spread;<BR>
use Data::Dumper;<BR>
# Connect<BR>
my($mbox, $private_group) = Spread::connect( {<BR>
spread_name => '4803',<BR>
private_name => 'cam' . $$,<BR>
} );<BR>
<BR>
# Join groups<BR>
my(@group_to_join) = ( 'Group1');<BR>
my(@joined_groups) = grep( Spread::join($mbox, $_), @group_to_join );<BR>
<BR>
# Multicast to group(s)<BR>
Spread::multicast($mbox, FIFO_MESS, 'Group1', 0, "Message sent by cam");<BR>
<BR>
print "Message sent\n";<BR>
<BR>
exit;<BR>
-----------------------><BR>
<BR>
Can anybody help?<BR>
Cheers,<BR>
Cam</FONT>
</P>
</BODY>
</HTML>