localhost:666 connection refused error?

Bug #1699374 reported by Gareth Evans
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
darkstat (Ubuntu)
New
Undecided
Unassigned

Bug Description

After installation, localhost:666 connection refused despite port 666 open.

sudo darkstat -i --debug results in error message:

16527: error: pcap_open_live(): --debug: SIOCETHTOOL(ETHTOOL_GET_TS_INFO) ioctl failed: No such device

Not sure if this is in any way related:
https://github.com/Ettercap/ettercap/issues/408

Thanks

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: darkstat 3.0.719-1
ProcVersionSignature: Ubuntu 4.4.0-81.104-generic 4.4.67
Uname: Linux 4.4.0-81-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
CurrentDesktop: MATE
Date: Wed Jun 21 03:42:57 2017
InstallationDate: Installed on 2017-01-13 (158 days ago)
InstallationMedia: Ubuntu-MATE 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
SourcePackage: darkstat
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.darkstat.init.cfg: 2017-06-21T02:24:16.818519

Revision history for this message
Gareth Evans (garethevans-9) wrote :
Revision history for this message
Emil Mikulic (darkmoon) wrote :

Try: sudo darkstat -i eth0 --debug

The error message could be better, but it's saying there's no interface called "--debug", which was the argument to -i.

description: updated
Revision history for this message
Emil Mikulic (darkmoon) wrote : Re: connection refused due to pcap error?

The default webserver port should be 667. Try: "netstat -lntp" while darkstat is running.

Revision history for this message
Gareth Evans (garethevans-9) wrote : Re: [Bug 1699374] Re: connection refused due to pcap error?

Thank you, it's working on :667

https://unix4lyfe.org/darkstat/linuxformat.jpg
says :666 though

There are rather deep references in man darkstat to 667 but I hadn't looked because

/etc/darkstat/init.cfg says
PORT="-p 666"

...which seems to be ignored.

Oh well, thanks again.
Gareth

On Wed, 21 Jun 2017, at 05:20, Emil Mikulic wrote:
> The default webserver port should be 667. Try: "netstat -lntp" while
> darkstat is running.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1699374
>
> Title:
> connection refused due to pcap error?
>
> Status in darkstat package in Ubuntu:
> New
>
> Bug description:
> localhost:666 connection refused despite port 666 open.
>
> sudo darkstat -i --debug results in error message:
>
> 16527: error: pcap_open_live(): --debug:
> SIOCETHTOOL(ETHTOOL_GET_TS_INFO) ioctl failed: No such device
>
> Not sure if this is in any way related:
> https://github.com/Ettercap/ettercap/issues/408
>
> Thanks
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: darkstat 3.0.719-1
> ProcVersionSignature: Ubuntu 4.4.0-81.104-generic 4.4.67
> Uname: Linux 4.4.0-81-generic x86_64
> ApportVersion: 2.20.1-0ubuntu2.6
> Architecture: amd64
> CurrentDesktop: MATE
> Date: Wed Jun 21 03:42:57 2017
> InstallationDate: Installed on 2017-01-13 (158 days ago)
> InstallationMedia: Ubuntu-MATE 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
> SourcePackage: darkstat
> UpgradeStatus: No upgrade log present (probably fresh install)
> mtime.conffile..etc.darkstat.init.cfg: 2017-06-21T02:24:16.818519
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/darkstat/+bug/1699374/+subscriptions

Revision history for this message
Emil Mikulic (darkmoon) wrote : Re: connection refused due to pcap error?

Sorry about the documentation. I can't change what's in that magazine. :)

The cfg file is specific to the distro and applies to systemd(?) starting darkstat at boot time, it's not a standard part of darkstat / not something it reads at startup.

i.e. Either "service start darkstat" or whatever the Ubuntu equivalent is, or add "-p 666" to the sudo cmdline you run.

Revision history for this message
Gareth Evans (garethevans-9) wrote :

On Ubuntu 16.04.2, it starts from :666 as specified in /etc/darkstat/init.cfg after a reboot. After this, changes to the config file port value seem to be observed following service darkstat restart.
A little confusing but solved, thanks.

summary: - connection refused due to pcap error?
+ localhost:666 connection refused error?
description: updated
Revision history for this message
Emil Mikulic (darkmoon) wrote :

Great, sounds like the distro part is working correctly! What's left to do in this bug?

Revision history for this message
Gareth Evans (garethevans-9) wrote :

Not a bug as such as far is the software is concerned, but I wonder if confusion could be avoided if the port number value in the config file matched the actual default.

As well as the Linux Format article (above), http://www.debianhelp.co.uk/darkstat.htm also gives wrong information. At least the right default in the config file would give a clue :)

Just out of interest, has the default port ever been :666?

Revision history for this message
Emil Mikulic (darkmoon) wrote :

darkstat v2.x used 666
darkstat v3.x used 667

debianhelp has screenshots from v2.6

My guess is Debian overrode the port to 666 when the package was upgraded from v2 to v3 so as to not change the (Debian) default. :)

Revision history for this message
Gareth Evans (garethevans-9) wrote :

Herewith the relevant part of comment #3, which has been hidden as I neglected to remove my email footer.

***

eth0, wlan0 on Ubuntu are now named according to
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

user@tommy:~$ sudo darkstat -i wlp3s0 --debug
error: illegal argument: "--debug"
darkstat 3.0.719 (using libpcap version 1.7.4)

user@tommy:~$ sudo darkstat -i wlp3s0 (and enp4s0)
Appears to succeed, but
http://... and https://localhost:666 and :1666 and
http://<local_ip>:666 and :1666
all refuse connections from localhost, even with both ports specifically opened, or with firewall off.

Same on Debian 9 with latest updates.

Not sure if this is actually a darkstat bug - apologies if not but I can't see what's wrong otherwise.

user@tommy:~$ ifconfig
enp4s0 Link encap:Ethernet HWaddr 20:6a:8a:97:52:82
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
          Interrupt:17

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:65536 Metric:1
          RX packets:3357 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3357 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:348724 (348.7 KB) TX bytes:348724 (348.7 KB)

lxcbr0 Link encap:Ethernet HWaddr 00:16:3e:00:00:00
          inet addr:10.0.3.1 Bcast:0.0.0.0 Mask:255.255.255.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
          inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlp3s0 Link encap:Ethernet HWaddr 1c:3e:84:56:ca:75
          inet addr:192.168.1.151 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::c1e8:4ba3:b6e3:b17/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:413421 errors:0 dropped:0 overruns:0 frame:0
          TX packets:247354 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:583629884 (583.6 MB) TX bytes:30079108 (30.0 MB)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.