Discussion:
[Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to reload Netdot/Model/Ipblock.pm aborted
Charles
2016-09-22 15:25:27 UTC
Permalink
Hello Netdot users :-)

Setting up Netdot 1.0.7 on Debian Jessie following the 1.0.5 procedure
from
https://osl.uoregon.edu/redmine/attachments/download/146/netdot-manual.pdf,
I got stuck at "Attempt to reload Netdot/Model/Ipblock.pm aborted"

The tarball was netdot-1.0.7.tar.gz and checksummed OK.

The special packages installed from the Debian repos were:
build-essential graphviz libapache2-mod-apreq2 libapache2-mod-perl2
libapache2-request-perl libapache2-sitecontrol-perl
libapache-session-perl libclass-dbi-mysql-perl libhtml-mason-perl
liblog-log4perl-perl libnet-dns-perl librrds-perl libsocket6-perl
libsql-translator-perl libsql-translator-perl rrdtool

No further action beyond package installation was required except to run
a2enmod perl

The significant error messages shown by systemctl -l status apache2.service:

Sep 22 20:23:16 netdot apache2[28766]: AH00526: Syntax error on line 31
of /etc/apache2/sites-enabled/netdot.conf:
Sep 22 20:23:16 netdot apache2[28766]: Attempt to reload
Netdot/Model/Ipblock.pm aborted.\nCompilation failed in require at
/usr/share/perl/5.20/base.pm line 100.\n\t...propagated at
/usr/share/perl/5.20/base.pm line 110.\nBEGIN failed--compilation
aborted at (eval 259) line 1.\nBEGIN failed--compilation aborted at
/usr/local/netdot/lib/Netdot/Model.pm line 381.\nCompilation failed in
require at /usr/local/netdot/lib/Netdot/UI.pm line 5.\nBEGIN
failed--compilation aborted at /usr/local/netdot/lib/Netdot/UI.pm line
5.\nCompilation failed in require at
/usr/local/netdot/lib/Netdot/Mason.pm line 21.\nBEGIN
failed--compilation aborted at /usr/local/netdot/lib/Netdot/Mason.pm
line 21.\nCompilation failed in require at
/etc/apache2/sites-enabled/netdot.conf line 32.\nBEGIN
failed--compilation aborted

Any ideas?

Best

Charles
--
Aurinoco Systems
Auroville Foundation Bhavan
Auroville, Tamil Nadu 605101
+91 413 262 2222
Charles
2016-09-27 07:38:25 UTC
Permalink
> Date: Thu, 22 Sep 2016 20:55:27 +0530
> From: Charles <***@aurinoco.net>
> Subject: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to
> reload Netdot/Model/Ipblock.pm aborted
> To: netdot-***@osl.uoregon.edu
> Message-ID: <6874fc5d-680b-92cc-60bc-***@aurinoco.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hello Netdot users :-)
>
> Setting up Netdot 1.0.7 on Debian Jessie following the 1.0.5 procedure
> from
> https://osl.uoregon.edu/redmine/attachments/download/146/netdot-manual.pdf,
> I got stuck at "Attempt to reload Netdot/Model/Ipblock.pm aborted"
...
>
> Any ideas?
>
> Best
>
> Charles

Fixed by:

1. Running make installdeps
(had forgotten to run make testdeps after installing packages from the
Debian repos)

2. Increasing memory from 512 MB to 2 GB
(after seeing OOM killer messages in /var/log/syslog)

3. Re-installing from scratch

C
Charles
2016-09-29 09:09:03 UTC
Permalink
> Date: Tue, 27 Sep 2016 13:08:25 +0530
> From: Charles <***@aurinoco.net>
> Subject: Re: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to
> reload Netdot/Model/Ipblock.pm aborted
> To: netdot-***@osl.uoregon.edu
> Message-ID: <4b74576a-0fe3-12ad-3a53-***@aurinoco.net>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
>> Date: Thu, 22 Sep 2016 20:55:27 +0530
>> From: Charles <***@aurinoco.net>
>> Subject: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to
>> reload Netdot/Model/Ipblock.pm aborted
>> To: netdot-***@osl.uoregon.edu
>> Message-ID: <6874fc5d-680b-92cc-60bc-***@aurinoco.net>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>>
>> Hello Netdot users :-)
>>
>> Setting up Netdot 1.0.7 on Debian Jessie following the 1.0.5 procedure
>> from
>> https://osl.uoregon.edu/redmine/attachments/download/146/netdot-manual.pdf,
>> I got stuck at "Attempt to reload Netdot/Model/Ipblock.pm aborted"
> ...
>>
>> Any ideas?
>>
>> Best
>>
>> Charles
>
> Fixed by:
>
> 1. Running make installdeps
> (had forgotten to run make testdeps after installing packages from the
> Debian repos)
>
> 2. Increasing memory from 512 MB to 2 GB
> (after seeing OOM killer messages in /var/log/syslog)
>
> 3. Re-installing from scratch
>
> C

Scrub my last mail and sorry for the noise. The test (does Apache start
with no errors?) was not sufficient and I had messed up re-initialising
the Apache perl modules.

Is Netdot known to work with perl in the 5.20 version installed by
Debian 8 Jessie? The git's installation procedure says "Perl 5.6.1 or
later". A 14 point release change may be too much for compatibility.
Perhaps the error is caused by a long standing bug exposed by stricter
checking.

Is Netdot still actively supported? Perhaps not:
* Last release on 8 Dec 2014
* 54 unclosed issues since last release
* Browsing issues shows few responses from developer(s)

Details of my further attempts to get Netdot installed follow.

After re-initialising the Apache perl modules by aptitude purge and
aptitude install Apache failed to start with:

Attempt to reload Netdot/Model/Device.pm aborted.
Compilation failed in require at /usr/share/perl/5.20/base.pm line 100.
...propagated at /usr/share/perl/5.20/base.pm line 110.
BEGIN failed--compilation aborted at (eval 209) line 1.
BEGIN failed--compilation aborted at
/usr/local/netdot/lib/Netdot/Model.pm line 381.
Compilation failed in require at /usr/local/netdot/lib/Netdot/UI.pm line 5.
BEGIN failed--compilation aborted at /usr/local/netdot/lib/Netdot/UI.pm
line 5.
Compilation failed in require at /usr/local/netdot/lib/Netdot/Mason.pm
line 21.
BEGIN failed--compilation aborted at
/usr/local/netdot/lib/Netdot/Mason.pm line 21.
Compilation failed in require at /etc/apache2/sites-enabled/netdot.conf
line 32.
BEGIN failed--compilation aborted

That is the same as Support #1880 "Can not restart Apache after install
Netdot" (https://osl.uoregon.edu/redmine/issues/1880), reported 4 Nov
2015, unsolved, no progress since 19 Nov 2015.

The OS was CentOS 7.1.1503 so the issue is affecting at least CentOS
7.1.1503 and Debian 8 Jessie.

I tried to debug, hampered by not being a perl programmer and by perl
run via mod_perl having different line numbers at run time than in the
.pm file (IIUC). The only useful thing I found was changing the
definition of $logger in /usr/local/netdot/lib/Netdot/Model.pm ...

***@netdot.iciti:/usr/local/netdot/lib/Netdot# diff Model.pm.org Model.pm
24c24,25
< my $logger = Netdot->log->get_logger("Netdot::Model");
---
> #my $logger = Netdot->log->get_logger("Netdot::Model");
> my $logger = Log::Log4perl->get_logger("Netdot::Model");

... changed the eval number in "BEGIN failed--compilation aborted at
(eval 209) line 1."

Stuck, I installed from git. Netdot 1.0.7 was released on 8 Dec 2014
since when there have been 46 commits including changes to the
installation procedure.

Starting Apache resulted in exactly the same error message.
Vincent Magnin
2016-09-29 10:15:29 UTC
Permalink
Hi Charles,

Did you check the mailing list archive?
- http://osl.uoregon.edu/pipermail/netdot-users/2016-April/002076.html

> Is Netdot known to work with perl in the 5.20 version installed by
> Debian 8 Jessie? The git's installation procedure says "Perl 5.6.1 or
> later". A 14 point release change may be too much for compatibility.

It seems that you need a patched netdot_apache24_local.conf conf file.

I was able to use netdot on a Ubuntu 16.04 LTS using the supplied conf file (perl 5.22).


Regards,

Vincent
Vincent Magnin
2016-09-29 11:13:25 UTC
Permalink
Oh sorry:

Same bug.

Seems that using mysql, no object is returned after insert (Ipblock->insert() returns nothing, but the object is created).

I'll try to debug it too.

Regards,

Vincent
________________________________________
De : netdot-users-***@osl.uoregon.edu <netdot-users-***@osl.uoregon.edu> de la part de Vincent Magnin <***@unil.ch>
Envoyé : jeudi 29 septembre 2016 12:15
À : netdot-***@osl.uoregon.edu
Objet : Re: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to reload Netdot/Model/Ipblock.pm aborted

Hi Charles,

Did you check the mailing list archive?
- http://osl.uoregon.edu/pipermail/netdot-users/2016-April/002076.html

> Is Netdot known to work with perl in the 5.20 version installed by
> Debian 8 Jessie? The git's installation procedure says "Perl 5.6.1 or
> later". A 14 point release change may be too much for compatibility.

It seems that you need a patched netdot_apache24_local.conf conf file.

I was able to use netdot on a Ubuntu 16.04 LTS using the supplied conf file (perl 5.22).


Regards,

Vincent
Matt Zagrabelny
2016-09-29 11:11:48 UTC
Permalink
On Thu, Sep 29, 2016 at 4:09 AM, Charles <***@aurinoco.net> wrote:
>> Date: Tue, 27 Sep 2016 13:08:25 +0530
>> From: Charles <***@aurinoco.net>
>> Subject: Re: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to
>> reload Netdot/Model/Ipblock.pm aborted
>> To: netdot-***@osl.uoregon.edu
>> Message-ID: <4b74576a-0fe3-12ad-3a53-***@aurinoco.net>
>> Content-Type: text/plain; charset=windows-1252; format=flowed
>>
>>> Date: Thu, 22 Sep 2016 20:55:27 +0530
>>> From: Charles <***@aurinoco.net>
>>> Subject: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to
>>> reload Netdot/Model/Ipblock.pm aborted
>>> To: netdot-***@osl.uoregon.edu
>>> Message-ID: <6874fc5d-680b-92cc-60bc-***@aurinoco.net>
>>> Content-Type: text/plain; charset=utf-8; format=flowed
>>>
>>> Hello Netdot users :-)
>>>
>>> Setting up Netdot 1.0.7 on Debian Jessie following the 1.0.5 procedure
>>> from
>>> https://osl.uoregon.edu/redmine/attachments/download/146/netdot-manual.pdf,
>>> I got stuck at "Attempt to reload Netdot/Model/Ipblock.pm aborted"
>> ...
>>>
>>> Any ideas?
>>>
>>> Best
>>>
>>> Charles
>>
>> Fixed by:
>>
>> 1. Running make installdeps
>> (had forgotten to run make testdeps after installing packages from the
>> Debian repos)
>>
>> 2. Increasing memory from 512 MB to 2 GB
>> (after seeing OOM killer messages in /var/log/syslog)
>>
>> 3. Re-installing from scratch
>>
>> C
>
> Scrub my last mail and sorry for the noise. The test (does Apache start
> with no errors?) was not sufficient and I had messed up re-initialising
> the Apache perl modules.
>
> Is Netdot known to work with perl in the 5.20 version installed by
> Debian 8 Jessie?

Yes. We use it with Debian 8.X Jessie.

There were a few patches we applied to get things working.

The git's installation procedure says "Perl 5.6.1 or
> later". A 14 point release change may be too much for compatibility.
> Perhaps the error is caused by a long standing bug exposed by stricter
> checking.
>
> Is Netdot still actively supported?

I don't know how supported it is now compared to the past due to only
having used it for less than a year. Carlos (the main dev) still works
on it.

-m
Charles
2016-09-29 13:18:44 UTC
Permalink
On 29/09/16 16:41, Matt Zagrabelny wrote:

>> Is Netdot known to work with perl in the 5.20 version installed by
>> Debian 8 Jessie?
>
> Yes. We use it with Debian 8.X Jessie.
>
> There were a few patches we applied to get things working.
>

Thanks Matt. That's good news. Do you have any further information on
the patches you applied?
Matt Zagrabelny
2016-09-29 14:33:21 UTC
Permalink
On Thu, Sep 29, 2016 at 8:18 AM, Charles <***@aurinoco.net> wrote:
> On 29/09/16 16:41, Matt Zagrabelny wrote:
>
>>> Is Netdot known to work with perl in the 5.20 version installed by
>>> Debian 8 Jessie?
>>
>>
>> Yes. We use it with Debian 8.X Jessie.
>>
>> There were a few patches we applied to get things working.
>>
>
> Thanks Matt. That's good news. Do you have any further information on the
> patches you applied?

The main one was the apache 2.4 config file git commit.

https://osl.uoregon.edu/redmine/projects/netdot/repository/revisions/9ec7993c97eef51674ce170eaa7b80ecbdbbd046

There were other ones as well to get things like REST functioning
correctly with apache 2.4, fix stack traces, format MAC address, add
export hooks, etc.

-m
Phil Regnauld
2016-09-29 21:01:05 UTC
Permalink
Matt Zagrabelny (mzagrabe) writes:
>
> https://osl.uoregon.edu/redmine/projects/netdot/repository/revisions/9ec7993c97eef51674ce170eaa7b80ecbdbbd046
>
> There were other ones as well to get things like REST functioning
> correctly with apache 2.4, fix stack traces, format MAC address, add
> export hooks, etc.

If someone has a list of those patches and pointers to them, that'd
be aweesome. May be a good idea to maintain that somewhere.
Charles
2016-09-30 09:19:29 UTC
Permalink
> Date: Thu, 29 Sep 2016 10:15:29 +0000
> From: Vincent Magnin <***@unil.ch>
> Subject: Re: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to
> reload Netdot/Model/Ipblock.pm aborted
> To: "netdot-***@osl.uoregon.edu" <netdot-***@osl.uoregon.edu>
> Message-ID: <***@unil.ch>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Charles,
>
> Did you check the mailing list archive?
> - http://osl.uoregon.edu/pipermail/netdot-users/2016-April/002076.html
>
>> Is Netdot known to work with perl in the 5.20 version installed by
>> Debian 8 Jessie? The git's installation procedure says "Perl 5.6.1 or
>> later". A 14 point release change may be too much for compatibility.
>
> It seems that you need a patched netdot_apache24_local.conf conf file.
>
> I was able to use netdot on a Ubuntu 16.04 LTS using the supplied conf file (perl 5.22).
>
>
> Regards,
>
> Vincent

Thanks Vincent

For future reference, here's what I did, including a context diff for
the patch.

~# ln -s /usr/local/netdot/etc/netdot_apache24_local.conf
/etc/apache2/sites-available/netdot
~# diff -u /usr/local/netdot/etc/netdot_apache24_local.conf{.org,}
--- /usr/local/netdot/etc/netdot_apache24_local.conf.org 2016-09-29
13:02:32.366545852 +0530
+++ /usr/local/netdot/etc/netdot_apache24_local.conf 2016-09-30
11:35:03.032178417 +0530
@@ -29,6 +29,10 @@
PerlSwitches -I/usr/local/netdot/lib

<Perl>
+# http://osl.uoregon.edu/pipermail/netdot-users/2016-April/002080.html
+PerlModule Apache::LogSTDERR
+ HookStderr logs/stderr_log
+
# Set up the Mason handler and global variables and import modules.
use Netdot::Mason;

Then Apache started :D

But opening http://<server ID>/netdot gave "You don't have permission to
access /netdot on this server" and this familiar message in
/var/log/apache/error:

[Fri Sep 30 14:39:43.030669 2016] [perl:error] [pid 10161:tid
139888670263040] [client 10.10.50.110:47062] failed to resolve handler
`Netdot::Mason': Attempt to reload Netdot/Model/Device.pm
aborted.\nCompilation failed in require at /usr/share/perl/5.20/base.pm
line 100.\n\t...propagated at /usr/share/perl/5.20/base.pm line
110.\nBEGIN failed--compilation aborted at (eval 241) line 1.\nBEGIN
failed--compilation aborted at /usr/local/netdot/lib/Netdot/Model.pm
line 381.\nCompilation failed in require at
/usr/local/netdot/lib/Netdot/UI.pm line 5.\nBEGIN failed--compilation
aborted at /usr/local/netdot/lib/Netdot/UI.pm line 5.\nCompilation
failed in require at /usr/local/netdot/lib/Netdot/Mason.pm line
21.\nBEGIN failed--compilation aborted at
/usr/local/netdot/lib/Netdot/Mason.pm line 21.\nCompilation failed in
require at (eval 57) line 2.\n

Expanding the message:

[Fri Sep 30 14:39:43.030669 2016] [perl:error] [pid 10161:tid
139888670263040] [client 10.10.50.110:47062] failed to resolve handler
`Netdot::Mason': Attempt to reload Netdot/Model/Device.pm aborted.
Compilation failed in require at /usr/share/perl/5.20/base.pm line 100.
...propagated at /usr/share/perl/5.20/base.pm line 110.
BEGIN failed--compilation aborted at (eval 241) line 1.
BEGIN failed--compilation aborted at
/usr/local/netdot/lib/Netdot/Model.pm line 381.
Compilation failed in require at /usr/local/netdot/lib/Netdot/UI.pm line 5.
BEGIN failed--compilation aborted at /usr/local/netdot/lib/Netdot/UI.pm
line 5.
Compilation failed in require at /usr/local/netdot/lib/Netdot/Mason.pm
line 21.
BEGIN failed--compilation aborted at
/usr/local/netdot/lib/Netdot/Mason.pm line 21.
Compilation failed in require at (eval 57) line 2.

I repeated the test to confirm that the message was generated on opening
http://<server ID>/netdot not before. Confirmed.

Charles

> -------------- next part --------------
...
> ------------------------------
>
> Message: 6
> Date: Thu, 29 Sep 2016 09:33:21 -0500
> From: Matt Zagrabelny <***@d.umn.edu>
> Subject: Re: [Netdot-users] Netdot 1.0.7 on Debian Jessie: Attempt to
> reload Netdot/Model/Ipblock.pm aborted
> To: Charles <***@aurinoco.net>
> Cc: netdot-***@osl.uoregon.edu
> Message-ID:
> <CAOLfK3WbJ5b+dgHF8aoRxpuEptrAb5wVrY+***@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Thu, Sep 29, 2016 at 8:18 AM, Charles <***@aurinoco.net> wrote:
>> On 29/09/16 16:41, Matt Zagrabelny wrote:
...
>> Thanks Matt. That's good news. Do you have any further information on the
>> patches you applied?
>
> The main one was the apache 2.4 config file git commit.
>
> https://osl.uoregon.edu/redmine/projects/netdot/repository/revisions/9ec7993c97eef51674ce170eaa7b80ecbdbbd046
>
> There were other ones as well to get things like REST functioning
> correctly with apache 2.4, fix stack traces, format MAC address, add
> export hooks, etc.

Thanks Matt. I'm looking forward to those :p
Loading...