[Dxspider-support] Problem after update

sm6hoc at telia.com sm6hoc at telia.com
Tue Apr 8 15:45:26 BST 2025


Hi again. HURRA

Thanks to Fabian

I follwed what Fabian wrote and it fixed it.
I think that Dirk should look at it due to its a temp fix for now.
SM6HOC is now up and running.

Thank you all of you

Lars SM6HOC




Hi Lars,

On Mon, Apr 07, 2025 at 07:57:13PM +0200, sm6hoc--- via Dxspider-support wrote:
> I have done what Kin said:
> 
> Revert to the previous build:
> git reset --hard HEAD~1
> And try again.
> 
> and restarted and got this:
> 
> Doing local initialisations ...
> (*) Namn eller tj%C3%A4nst ok%C3%A4nd
> (*) Can't call method "sockhost" on an undefined value at /spider/perl/DXUtil.pm line 732.
> (*)  at /spider/perl/DXUtil.pm line 732.
> (*) 	DXUtil::find_local_ipaddr() called at ./cluster.pl line 812
> (*) 	main::setup_start() called at ./cluster.pl line 936
> Can't call method "sockhost" on an undefined value at /spider/perl/DXUtil.pm line 732.

the problem is the function find_local_ipaddr() in which DXspider
attempts to create a TCP socket to example.com:80 for the sole reason
of finding out the *local* IP address that will be used for this
purpose.

The whole relevant code to test this can be reduced to this minimal
Perl script:

-----------------------
use IO::Socket::IP;

sub find_local_ipaddr
{   
    my $sock = IO::Socket::IP->new(
                       PeerAddr=> "example.com",
                       PeerPort=> 80,
                       Proto   => "tcp");
    return $sock->sockhost;
}
print find_local_ipaddr();
-----------------------

This script returns my local IP address when I run it.

If I run it and replace example.com to some hostname that does not
exist (like: ilovedxspider.com), or which I can not connect to,
like example.com:81, I get the same error as you do.

So DXSpider relies on being able to connect to example.com:80.
If this is not possible on your node, it will fail as shown above.

As a quick fix, I'd temporarily hard-code 

sub find_local_ipaddr {
 return "1.2.3.4";
}

(where you replace 1.2.3.4 with your server's address) before
deploying a "proper" fix eventually.

73
Fabian

-- 
Fabian Kurz              Munich, Germany
fabian at fkurz.net         +49(174)6926713
https://fkurz.net/       DJ5CW / SO5CW



More information about the Dxspider-support mailing list