[Dxspider-support] Sockhost
sm6hoc at telia.com
sm6hoc at telia.com
Sun Jul 13 05:04:32 BST 2025
Dirk can you look at this !
Lars SM6HOC
Hi again.
Dirk can you look at this !
I have had this problem before whan I did a update. (This time was an update too)
I have fixed it temporarily as what Fabian wrote. See the old case her:
Lars
[Dxspider-support] Problem after update
Fabian Kurz fabian at fkurz.net
Mon Apr 7 19:16:50 BST 2025
Previous message (by thread): [Dxspider-support] Problem after update
Next message (by thread): [Dxspider-support] Problem after update
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
Previous message (by thread): [Dxspider-support] Problem after update
Next message (by thread): [Dxspider-support] Problem after update
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Dxspider-support mailing list
More information about the Dxspider-support
mailing list