Send netdisco-users mailing list submissions to
netdisco-users@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
netdisco-users-requ...@lists.sourceforge.net
You can reach the person managing the list at
netdisco-users-ow...@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:
1. Re: undefined symbol: PL_current_contex (Stuart Kendrick)
2. Re: How does netdisco-web resolve its hostname? (Stuart Kendrick)
--- Begin Message ---
Turns out I had confused myself with multiple Perl installations
Narrowing the environment down to the one provided by the OS, wiping
/home/netdisco/*, and installing afresh resolved the issues
Thank you for your assistance
--sk
-----Original Message-----
From: Christian Ramseyer <ramse...@netnea.com>
Sent: Tuesday, December 12, 2023 10:33 AM
To: Stuart Kendrick <stua...@alleninstitute.org>;
netdisco-users@lists.sourceforge.net
Subject: Re: [Netdisco] undefined symbol: PL_current_contex
CAUTION: This email originated from outside the Allen Institute. Please do not
click links or open attachments unless you've validated the sender and know the
content is safe.
________________________________
Hi
>
> 2023-12-12T04:24:33.922371-08:00 ganesh netdisco-daemon[51448]: Can't locate
> Path/Class.pm in @INC (you may need to install the Path::Class module) (@INC
> contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32
> /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5
> /usr/share/perl5) at /home/netdisco/perl5/bin/netdisco-backend line 31.
> 2023-12-12T04:24:33.922371-08:00 ganesh netdisco-daemon[51448]: BEGIN
> failed--compilation aborted at /home/netdisco/perl5/bin/netdisco-backend line
> 31.
> 2023-12-12T04:24:33.923416-08:00 ganesh systemd[1]:
> netdisco-daemon.service: Control process exited, code=exited,
> status=2/INVALIDARGUMENT
> 2023-12-12T04:24:33.923650-08:00 ganesh systemd[1]: netdisco-daemon.service:
> Failed with result 'exit-code'.
>
> ==> So why isn't /usr/bin/perl finding Path::Class.pm?
>
> [netdisco@ganesh perl5]$ pwd
> /home/netdisco/perl5
> [netdisco@ganesh perl5]$ find . | grep Path | grep Class.pm
> ./lib/perl5/Path/Class.pm [netdisco@ganesh perl5]$
>
> ==> Ahh, well, /usr/bin/perl isn't finding Path/Class.pm because @INC doesn't
> include /home/netops/perl5 ....
>
> ==> OK, I think I'm fuzzy on how to include library paths for perl ... does
> any of the above spark an insight from you around what I am missing?
We're getting closer :)
In theory all the binaries like netdisco-web have some setup code to arrange
the environment, e.g:
head -50 perl5/bin/netdisco-web
#!/usr/bin/env perl
use strict;
use warnings;
our $home;
BEGIN {
use FindBin;
FindBin::again();
my $me = File::Spec->catfile($FindBin::RealBin, $FindBin::RealScript);
my $uid = (stat($me))[4] || 0;
$home = ($ENV{NETDISCO_HOME} || (getpwuid($uid))[7] || $ENV{HOME});
# try to find a localenv if one isn't already in place.
if (!exists $ENV{PERL_LOCAL_LIB_ROOT}) {
use File::Spec;
my $localenv = File::Spec->catfile($FindBin::Bin, 'localenv');
exec($localenv, $0, @ARGV) if -f $localenv;
$localenv = File::Spec->catfile($home, 'perl5', 'bin', 'localenv');
exec($localenv, $0, @ARGV) if -f $localenv;
die "Sorry, can't find libs required for App::Netdisco.\n"
if !exists $ENV{PERLBREW_PERL};
}
}
BEGIN {
use Path::Class;
# stuff useful locations into @INC and $PATH
unshift @INC,
dir($FindBin::RealBin)->parent->subdir('lib')->stringify,
dir($FindBin::RealBin, 'lib')->stringify;
use Config;
$ENV{PATH} = $FindBin::RealBin . $Config{path_sep} . $ENV{PATH}; }
But that seems to not work out in your case. The most direct way to tell Perl
where the libraries are is via
PERLLIB=/home/netdisco/perl5/lib:/home/netdisco/perl5/lib/perl5:/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multi
Maybe set NETDISCO_HOME in the systemd unit as well. The PERL_LOCAL_LIB_ROOT
should be /home/netdisco/perl5(/lib maybe) if anything, but I have this
generally unset IIRC.
Cheers
Christian
>
> --sk
>
> -----Original Message-----
> From: Christian Ramseyer <ramse...@netnea.com>
> Sent: Monday, December 11, 2023 4:23 PM
> To: netdisco-users@lists.sourceforge.net; Stuart Kendrick
> <stua...@alleninstitute.org>
> Subject: Re: [Netdisco] undefined symbol: PL_current_contex
>
> CAUTION: This email originated from outside the Allen Institute. Please do
> not click links or open attachments unless you've validated the sender and
> know the content is safe.
> ________________________________
>
> Hi
>
> On 11.12.2023 21:24, Stuart Kendrick wrote:
>> Hi folks,
>>
>> BRIEF
>>
>> * I have NetDisco running on an old CentOS 7.9 box; I have built a new
>> Rocky 9.3 and am attempting to install NetDisco there
>>
>> Can't load
>> '/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-multi/auto/YAML/X
>> S
>> /LibYAML/LibYAML.so' for module
>> YAML::XS::LibYAML:/home/netdisco/perl5/lib/perl5/x86_64-linux-thread-
>> m
>> ulti/auto/YAML/XS/LibYAML/LibYAML.so: undefined symbol:
>> PL_current_contex
>>
>> DETAIL
>
>> [netdisco@new-server LibYAML]$ strings LibYAML.so | grep PL_current
>>
>> PL_current_context
>>
>> PL_current_context
>
> Your error says contex while the .so has contex*t*, copy/paste mishap or is
> that really the output?
>
>
> To make matters worse, the LibYAML.so I quickly checked in a fresh docker
> image (aarch64, unfortuntately I can't run x86_64 right now) doesn't have
> this string at all:
>
> docker run --rm -it rockylinux:9.3 bash
>
> ... doing the App::Netdisco install, until after the cpanm step
>
> [root@a687675a099c perl5]# find . -name LibYAML.so
> ./lib/perl5/aarch64-linux-thread-multi/auto/YAML/XS/LibYAML/LibYAML.so
>
> [root@a687675a099c perl5]# strings
> ./lib/perl5/aarch64-linux-thread-multi/auto/YAML/XS/LibYAML/LibYAML.so | grep
> -i PL_curr || echo crickets....
>
> crickets....
>
> I checked another LibYAML.so on Suse x86_64 and that also doesn't have
> it. Getting weird :)
>
> Maybe try reinstalling the module with -v and running the tests, see if that
> works or there are errors already there?
>
> [root@a687675a099c perl5]# ./bin/cpanm --reinstall -v YAML::XS
>
> You can also show which version of libyaml is used, but it seems to ship with
> the CPAN package so unlikely to get a surprise there:
>
> [root@a687675a099c perl5]#
> PERLLIB=./lib/perl5/:./lib/perl5/aarch64-linux-thread-multi perl -MYAML::XS
> -E 'say YAML::XS::LibYAML::libyaml_version();'
>
> 0.2.4
>
> Is this a completely fresh install or did you restore any parts from a backup
> or upgrade from an older Rocky snapshot?
>
> Cheers
> Christian
--
Christian Ramseyer, netnea ag
Network Management. Security. OpenSource.
https://www.netnea.com/
Phone: +41 79 644 77 64
--- End Message ---
--- Begin Message ---
This solved the issue
I have added
Environment=IPV=4
to /etc/systemd/system/netdisco-web.service
thank you
--sk
From: Oliver Gorwits <oli...@cpan.org>
Sent: Wednesday, November 15, 2023 11:41 AM
To: Stuart Kendrick <stua...@alleninstitute.org>
Cc: netdisco-users@lists.sourceforge.net
Subject: Re: [Netdisco] How does netdisco-web resolve its hostname?
CAUTION: This email originated from outside the Allen Institute. Please do not
click links or open attachments unless you've validated the sender and know the
content is safe.
________________________________
Hi Stuart
I wonder if IPv6 is interfering. Perhaps try with IPV=4 environment variable
set?
https://github.com/netdisco/netdisco/wiki/Environment-Variables#ipv
Regards
Oliver.
On Wed, 15 Nov 2023 at 18:27, Stuart Kendrick
<stua...@alleninstitute.org<mailto:stua...@alleninstitute.org>> wrote:
BRIEF
* How does netdisco-web resolve its hostname?
BACKGROUND
* I am currently running NetDisco under CentOS 7.9
* I have a built a new box running Rocky 9.2 and am installing NetDisco
DETAIL
On the new box ('new-server'), when I load the Web front-end:
[netdisco@new-server ~]$ ~/bin/netdisco-web start
Netdisco Web [Started]
config watcher: watching /home/netdisco/environments for updates.
[netdisco@new-server ~]$
I see the following in /home/netdisco/logs/netdisco-web.log
Resolved [*]:5000 to [::]:5000, IPv6
Not including resolved host [0.0.0.0] IPv4 because it will be handled by [::]
IPv6
Binding to TCP port 5000 on host :: with IPv6
2023/11/14-10:47:44 Can't connect to TCP port 5000 on :: [Invalid argument] at
line 66 in file /home/netdisco/perl5/lib/perl5/Net/Server/Proto/TCP.pm
2023/11/14-10:47:44 Received QUIT. Running a graceful shutdown
2023/11/14-10:47:44 Worker processes cleaned up
2023/11/14-10:47:44 Server closing!
And nothing is listening on TCP 5000
[root@new-server ~]# lsof -nP -i:5000
[root@new-server ~]#
So, examining those logs messages ... seems to me that the Web front-end is
having trouble resolving its hostname ...
If I specify host, the Web front-end loads fine:
[netdisco@new-server ~]$ bin/netdisco-web start --host 127.0.0.1
Netdisco Web [Started]
config watcher: watching /home/netdisco/environments for updates.
[netdisco@new-server ~]$ bin/netdisco-web stop
config watcher: sending TERM to the web server (pid:411033)...
Netdisco Web [Stopped]
[netdisco@new-server ~]$ bin/netdisco-web start --host new-server
config watcher: watching /home/netdisco/environments for updates.
Netdisco Web [Started]
[netdisco@new-server ~]$
And I see comforting feedback in the log:
Binding to TCP port 5000 on host 127.0.0.1 with IPv4
[411034] 2023-11-14 22:52:00 warn App::Netdisco 2.069000 web
[411035] 2023-11-14 22:52:00 warn App::Netdisco 2.069000 web
[411038] 2023-11-14 22:52:00 warn App::Netdisco 2.069000 web
[411037] 2023-11-14 22:52:00 warn App::Netdisco 2.069000 web
[411036] 2023-11-14 22:52:00 warn App::Netdisco 2.069000 web
2023/11/15-09:39:01 Server closing!
2023/11/15-09:39:14 Starman::Server (type Net::Server::PreFork) starting!
pid(445758)
Resolved [ganesh]:5000 to [10.1.2.3]:5000, IPv4
Binding to TCP port 5000 on host 10.1.2.3with IPv4
[445760] 2023-11-15 17:39:14 warn App::Netdisco 2.069000 web
[445759] 2023-11-15 17:39:14 warn App::Netdisco 2.069000 web
[445761] 2023-11-15 17:39:14 warn App::Netdisco 2.069000 web
[445762] 2023-11-15 17:39:14 warn App::Netdisco 2.069000 web
[445763] 2023-11-15 17:39:14 warn App::Netdisco 2.069000 web
And I can point a browser at the appropriate hostname and get in fine:
[cid:image001.png@01DA32F3.C43832B0]
How does netdisco-web figure out what IP address to bind to?
--sk
Stuart Kendrick
_______________________________________________
Netdisco mailing list
netdisco-users@lists.sourceforge.net<mailto:netdisco-users@lists.sourceforge.net>
https://sourceforge.net/p/netdisco/mailman/netdisco-users/
--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
netdisco-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netdisco-users