Mailing List Archive

Trouble automating daemon startup for ntopng
I've followed the instructions in the nprobe manual to get it running as a daemon on system start, but I can't get ntopng to do the same thing.

I've got /etc/ntopng/ntopng.conf configured, and it works ok if I run sudo ntopng /etc/ntopng/ntopng.conf.

/etc/ntopng/ntop.start exists, but ntopng doesn't start on boot. What's wrong?

Here's the ntopng.conf file contents:

-G=/var/run/ntopng.pid
--daemon=
-i=tcp://192.168.0.222:2055
-w=3050
-F="mysql;localhost;ntopng;flows;root;admin"
--local-networks="192.168.0.0/23,192.168.2.0/24,192.168.3.0/24,192.168.6.0/24,192.168.7.0/24,192.168.30.0/24,192.168.60.0/24,192.168.32.0/24,192.168.62.0/24,192.168.33.0/24,192.168.63.0/24,192.168.37.0/24,192.168.67.0/24"

_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: Trouble automating daemon startup for ntopng [ In reply to ]
Hello Peter,

I am not sure if it's a typo or if it's the real file name, but shouldn't "ntop.start" be "ntopng.start"?



_____________________________
From: Peter Shute <pshute@nuw.org.au<mailto:pshute@nuw.org.au>>
Sent: Friday, October 28, 2016 4:38 AM
Subject: [Ntop-misc] Trouble automating daemon startup for ntopng
To: 'ntop-misc@listgateway.unipi.it<mailto:ntop-misc@listgateway.unipi.it>' <ntop-misc@listgateway.unipi.it<mailto:ntop-misc@listgateway.unipi.it>>


I've followed the instructions in the nprobe manual to get it running as a daemon on system start, but I can't get ntopng to do the same thing.

I've got /etc/ntopng/ntopng.conf configured, and it works ok if I run sudo ntopng /etc/ntopng/ntopng.conf.

/etc/ntopng/ntop.start exists, but ntopng doesn't start on boot. What's wrong?

Here's the ntopng.conf file contents:

-G=/var/run/ntopng.pid
--daemon=
-i=tcp://192.168.0.222:2055
-w=3050
-F="mysql;localhost;ntopng;flows;root;admin"
--local-networks="192.168.0.0/23,192.168.2.0/24,192.168.3.0/24,192.168.6.0/24,192.168.7.0/24,192.168.30.0/24,192.168.60.0/24,192.168.32.0/24,192.168.62.0/24,192.168.33.0/24,192.168.63.0/24,192.168.37.0/24,192.168.67.0/24"

_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it<mailto:Ntop-misc@listgateway.unipi.it>
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: Trouble automating daemon startup for ntopng [ In reply to ]
Yes, just a typo!

Peter Shute

Sent from my iPad

On 29 Oct. 2016, at 7:49 am, Y M <snort@outlook.com<mailto:snort@outlook.com>> wrote:

Hello Peter,

I am not sure if it's a typo or if it's the real file name, but shouldn't "ntop.start" be "ntopng.start"?



_____________________________
From: Peter Shute <pshute@nuw.org.au<mailto:pshute@nuw.org.au>>
Sent: Friday, October 28, 2016 4:38 AM
Subject: [Ntop-misc] Trouble automating daemon startup for ntopng
To: 'ntop-misc@listgateway.unipi.it<mailto:ntop-misc@listgateway.unipi.it>' <ntop-misc@listgateway.unipi.it<mailto:ntop-misc@listgateway.unipi.it>>


I've followed the instructions in the nprobe manual to get it running as a daemon on system start, but I can't get ntopng to do the same thing.

I've got /etc/ntopng/ntopng.conf configured, and it works ok if I run sudo ntopng /etc/ntopng/ntopng.conf.

/etc/ntopng/ntop.start exists, but ntopng doesn't start on boot. What's wrong?

Here's the ntopng.conf file contents:

-G=/var/run/ntopng.pid
--daemon=
-i=tcp://192.168.0.222:2055
-w=3050
-F="mysql;localhost;ntopng;flows;root;admin"
--local-networks="192.168.0.0/23,192.168.2.0/24,192.168.3.0/24,192.168.6.0/24,192.168.7.0/24,192.168.30.0/24,192.168.60.0/24,192.168.32.0/24,192.168.62.0/24,192.168.33.0/24,192.168.63.0/24,192.168.37.0/24,192.168.67.0/24"

_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it<mailto:Ntop-misc@listgateway.unipi.it>
http://listgateway.unipi.it/mailman/listinfo/ntop-misc


_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it<mailto:Ntop-misc@listgateway.unipi.it>
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: Trouble automating daemon startup for ntopng [ In reply to ]
I've now found that I should look in /var/log/syslog for clues about why ntopng won't autostart on boot. I found entries like this:
ntopng[1134]: * Starting ntopng
ntopng: [MySQLDB.cpp:624] ERROR: Failed to connect to MySQL: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) [localhost:root]
ntopng: [MySQLDB.cpp:624] ERROR: Failed to connect to MySQL: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) [localhost:root]
ntopng: [MySQLDB.cpp:78] ERROR: Unable to connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
ntopng: [main.cpp:279] ERROR: Unable to create database schema, quitting.
ntopng[1134]: ...done.
root: ntopng stop
ntopng[1516]: * Stopping ntopng

I assumed that meant that it couldn't start because mysql hadn't started yet, so I altered /etc/init.d/ntopng to add mysqld to this line:
# Required-Start: $local_fs $remote_fs $network $syslog $pf_ring mysqld

I'm no longer getting the mysql errors in the log, but it's still not starting. Now I just get these entries:
root: ntopng start
ntopng[1130]: * Starting ntopng
ntopng[1130]: * Unable to start ntopng
ntopng[1130]: ...fail!
(There are other non ntopng entries I haven't shown among those.)

Running /etc/init.d/ntopng start after bootup works fine. What else can I try to diagnose this?

> -----Original Message-----
> From: ntop-misc-bounces@listgateway.unipi.it [mailto:ntop-misc-
> bounces@listgateway.unipi.it] On Behalf Of Peter Shute
> Sent: Friday, 28 October 2016 12:39 PM
> To: 'ntop-misc@listgateway.unipi.it' <ntop-misc@listgateway.unipi.it>
> Subject: [Ntop-misc] Trouble automating daemon startup for ntopng
>
> I've followed the instructions in the nprobe manual to get it running as a
> daemon on system start, but I can't get ntopng to do the same thing.
>
> I've got /etc/ntopng/ntopng.conf configured, and it works ok if I run sudo
> ntopng /etc/ntopng/ntopng.conf.
>
> /etc/ntopng/ntop.start exists, but ntopng doesn't start on boot. What's
> wrong?
>
> Here's the ntopng.conf file contents:
>
> -G=/var/run/ntopng.pid
> --daemon=
> -i=tcp://192.168.0.222:2055
> -w=3050
> -F="mysql;localhost;ntopng;flows;root;admin"
> --local-
> networks="192.168.0.0/23,192.168.2.0/24,192.168.3.0/24,192.168.6.0/24,192.
> 168.7.0/24,192.168.30.0/24,192.168.60.0/24,192.168.32.0/24,192.168.62.0/24,1
> 92.168.33.0/24,192.168.63.0/24,192.168.37.0/24,192.168.67.0/24"
>
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-misc