Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: nallar on February 11, 2017, 04:43:59 PM

Title: DSLStats Docker
Post by: nallar on February 11, 2017, 04:43:59 PM
Hi,

I've made a Docker container for running headless DSLStats.

https://github.com/nallar/DSLStatsDocker#readme

It runs xvfb (X virtual framebuffer) to set up an X session without needing any real displays, starts DSLStats inside that X session, then starts X11vnc. You can connect to it using any VNC client and then set up DSL stats as required. Once you've set it up once, future starts won't require any interaction.

I haven't been able to confirm that it fully works, as my phone line is currently non-existent due to openreach problems.

Hopefully this is useful for someone else :) If you've already got a machine at home running docker containers this makes more sense than running it on a raspberry pi.
Title: Re: DSLStats Docker
Post by: ejs on February 11, 2017, 04:51:15 PM
Why use xvfb and x11vnc instead of just running vncserver?
Title: Re: DSLStats Docker
Post by: nallar on February 11, 2017, 05:07:41 PM
Why use xvfb and x11vnc instead of just running vncserver?
Combining two things I've used previously. Never used tightvnc/vncserver. Maybe it would be more appropriate for this situation.

e: Just tried the tightvncserver package and it requires significantly more dependencies resulting in a bigger image. It was by chance that x11vnc+xvfb was more lightweight, but going to stick with it.
Title: Re: DSLStats Docker
Post by: underzone on February 11, 2017, 05:31:14 PM
Well done. Thanks  ;)
Title: Re: DSLStats Docker
Post by: roseway on February 11, 2017, 06:30:23 PM
Thank you for the information nallar.
Title: Re: DSLStats Docker
Post by: stinkyfish on February 13, 2017, 09:54:57 AM
Thanks nallar, i have a synology NAS running docker so will give this a try later.
Title: Re: DSLStats Docker
Post by: stinkyfish on February 26, 2017, 07:11:34 PM
Got it installed on my synology nas running docking, used to run dslstats in a virtual PC on the same box but docker uses less resources. Thanks again for your work on this nallar
Title: Re: DSLStats Docker
Post by: andyfitter on March 01, 2017, 12:54:30 PM
Can anybody give me a brief heads up on how to install this on Synology? Im tech literate but don't know my way around Docker.

Can I not add it via the the Synology Docker GUI? Attempted to add it as an 'image' and it fails with no obvious error.

TIA

Andy.
Title: Re: DSLStats Docker
Post by: nallar on March 01, 2017, 02:21:38 PM
I don't have a Synology machine, but Dean Wade has helpfully made a guide here: https://github.com/nallar/DSLStatsDocker/issues/1#issuecomment-279470110

You will also want to add a volume like in this comment: https://github.com/nallar/DSLStatsDocker/issues/1#issuecomment-279832855
Title: Re: DSLStats Docker
Post by: andyfitter on March 01, 2017, 02:35:28 PM
Cheers. Looked at Github but didn't realise there was a whole discussion thread under a tracked issue. Much appreciated!

Andy.
Title: Re: DSLStats Docker
Post by: tickmike on March 06, 2017, 03:06:27 PM
I had to look what it means  :-[   https://en.wikipedia.org/wiki/Docker_(software)
Title: Re: DSLStats in Synology Docker
Post by: andyfitter on April 03, 2017, 06:53:47 PM
Is anybody running this on Synology/Xpenology docker and having issues with timezones?

MyDSLStats has been complaining that my clock is wrong since BST started and to restart DSLStats. Done this multiple times but no success.

My Synology box has the correct time, but it doesn't seem to let you select UK time, Just GMT+/- etc. which I suspect is partly where the problem lies.

I tried adding setting the environment variable TZ to /usr/share/zoneinfo/GB, and now inside the Docker container, it reports the right time and timezone as BST, but still MDWS complains at my uploads.

Any suggestions gratefully received.

Andy
Title: Re: DSLStats Docker
Post by: roseway on April 03, 2017, 07:10:07 PM
DSLstats reads the system time from the OS it's running in. It doesn't know anything about timezones itself. Unfortunately I know nothing about how Docker works, so I don't know what 'system time' is in this context.
Title: Re: DSLStats Docker
Post by: andyfitter on April 03, 2017, 08:51:45 PM
Thanks. The correct time appears to be now be visible in a shell inside the Docker container when it is running, so something is going astray somewhere...
Title: Re: DSLStats Docker
Post by: nallar on April 03, 2017, 10:00:23 PM
If you haven't added the localtime volume mapping (-v /etc/localtime:/etc/localtime:ro) try adding it, or if you have, try removing it.

It's supposed to ensure that time in the container matches the host system instead of always being UTC.

On holiday just now so don't really have time to muck around, also don't have a synology NAS to test on.
Title: Re: DSLStats Docker
Post by: andyfitter on April 04, 2017, 05:28:12 PM
Thanks. Tried it both ways and still reported as wrong by MDWS

Current time here is 17:25 BST

A shell running inside the live Docker container reports it as this:
root@rossallan-dslstats1:/# date                                               
Tue Apr  4 17:25:01 BST 2017   

TZ env var in the Docker instance is set to
TZ=/usr/share/zoneinfo/GB

Yet MDWS still says this:
User andyf - Please restart DSLstats which is still reporting time in GMT! User Clock is one hour slow.

Bah.



Title: Re: DSLStats Docker
Post by: andyfitter on April 04, 2017, 05:29:17 PM
Just had a thought... Maybe the environment I'm seeing in the Bash shell fired up inside the Docker instance isn't the same as what DSLStats is seeing?

Edit: Seems that way. Looked at the stdout log being written and the timestamps are out by an hour. Time for more investigations.
Title: Re: DSLStats Docker
Post by: andyfitter on April 05, 2017, 03:51:38 PM
Have installed Docker on my Mac and am seeing exactly the same issue, so it isn't synology specific. Have tried both with and without the command line params suggested.

Time zones (and DST) inside Docker seem to be a big problem - the web seems to be riddled with people asking for help, and many proposed solutions..
Title: Re: DSLStats Docker
Post by: nallar on April 05, 2017, 06:35:52 PM
Make sure the localtime volume is not set, then run the following inside the shell in the docker image:

echo "Europe/London" > /config/etc/timezone
dpkg-reconfigure -f noninteractive tzdata

Then restart the container.

Failing that, will be able to look into this on Sunday.
Title: Re: DSLStats Docker
Post by: andyfitter on April 05, 2017, 09:40:13 PM
Thanks, much appreciated.

That seemed to lead me mostly on the right track, but it occurred to me that maybe the file being written into /config/etc/timezone wasn't being picked up within the running container.

What seems to be the last step needed it to add a file mapping from /docker/config/etc/timezone into /etc/timezone within the container

All seems OK now. Thanks for all your help.

Title: Re: DSLStats Docker
Post by: nallar on April 14, 2017, 06:51:23 PM
New version available.

Timezone should now default to Europe/London without requiring any messing around.

Lock file which might be left over in /tmp is now cleaned up fixing an issue which could cause it to fail to start.
Title: Re: DSLStats Docker
Post by: ip75 on April 14, 2017, 09:30:49 PM
Just set this up on my Synology, and it works really well, thanks! I can now retire or repurpose my Raspberry Pi.
Title: Re: DSLStats Docker
Post by: jaydub on April 14, 2017, 09:54:20 PM
I'm still struggling.

Using

docker run -d --name="dslstats" --net=bridge -p 10000:5900/tcp -p10001:8080/tcp -e "VNC_PASSWORD"="password" -v /Users/Jon/Broadband/Documents/dslstats:/config -v /Users/Jon/Documents/Broadband/dslstats/config/etc/timezone:/config/etc/timezone rossallan/dslstats

or

docker run -d --name="dslstats" --net=bridge -p 10000:5900/tcp -p10001:8080/tcp -e "VNC_PASSWORD"="password" -v /Users/Jon/Broadband/Documents/dslstats:/config -v rossallan/dslstats

I'm still getting it coming up with the wrong timezone.

I don't doubt it's me doing something stupid.  Any ideas?
Title: Re: DSLStats Docker
Post by: andyfitter on April 14, 2017, 10:02:10 PM
Hiya. Sorry I've not replied sooner, been a bit busy this week. Will rake a look in the next couple of days. My suspicion is that the timezone file hasn't been created in the right place.
Title: Re: DSLStats Docker
Post by: jaydub on April 17, 2017, 02:47:02 PM
Got it working with the correct timezone by using nallar's pre-created container and tweaking some of the parameters to suit.  Thanks, Ross.

I still can't get Andy's docker cli command line to stay on the correct timezone.

One quick question though.  Should the DSLStats configuration settings be saved in the location mapped to the config folder?

At the moment I am having to reconfigure DSLWebStats each time I start the application.
Title: Re: DSLStats Docker
Post by: jaydub on April 17, 2017, 03:29:59 PM
Now got the preferences saving as well.

I seemed to find a way of stopping Kitematic in its tracks, by changing the port allocations,.  Not sure why, but will just leave them as is.

All looks to be working well now.
Title: Re: DSLStats Docker
Post by: jaydub on April 18, 2017, 04:25:35 PM
I'm still struggling.

Using

docker run -d --name="dslstats" --net=bridge -p 10000:5900/tcp -p10001:8080/tcp -e "VNC_PASSWORD"="password" -v /Users/Jon/Broadband/Documents/dslstats:/config -v /Users/Jon/Documents/Broadband/dslstats/config/etc/timezone:/config/etc/timezone rossallan/dslstats

or

docker run -d --name="dslstats" --net=bridge -p 10000:5900/tcp -p10001:8080/tcp -e "VNC_PASSWORD"="password" -v /Users/Jon/Broadband/Documents/dslstats:/config -v rossallan/dslstats

I'm still getting it coming up with the wrong timezone.

I don't doubt it's me doing something stupid.  Any ideas?

Certainly me doing something stupid with the second command line above.

For the record the following statement works:

docker run -d --name="dslstats" --net=bridge -p 10000:5900/tcp -p 10001:8080/tcp -e "VNC_PASSWORD"="password" -v /Users/Jon/Documents/Broadband/dslstats:/config rossallan/dslstats.

The only significant difference being that I'd managed to leave an extraneous -v in there.  :-[
Title: Re: DSLStats Docker
Post by: andyfitter on April 18, 2017, 04:57:28 PM
Glad you managed to sort it out. Sorry I wasn't around to be of more assistance!

Andy.

Title: Re: DSLStats Docker
Post by: Chrysalis on April 18, 2017, 06:06:28 PM
I am struggling to understand the benefit of running this in a docker? I am not a fan of docker anyway, but whats the purpose of what you guys are doing?  I mean I assume the machine thats hosting the docker could just run dslstats directly right with less complications?
Title: Re: DSLStats Docker
Post by: andyfitter on April 18, 2017, 06:07:32 PM
Its a Mac or a Synology box. It can't run it natively unless Im missing something quite fundamental?
Title: Re: DSLStats Docker
Post by: Chrysalis on April 18, 2017, 06:16:05 PM
ahh fair enough.
I guess a VM would still work right?
Title: Re: DSLStats Docker
Post by: andyfitter on April 18, 2017, 06:17:16 PM
ahh fair enough.
I guess a VM would still work right?

Yep, a VM would work, but Docker is usually much lighter weight, and things like Synology don't often give you scope to run a full VM
Title: Re: DSLStats Docker
Post by: jaydub on April 18, 2017, 06:23:51 PM
Glad you managed to sort it out. Sorry I wasn't around to be of more assistance!

Andy.

No worries, Andy.

There was a lot of trial and error involved, but I got there in the end.

To be honest once I'd realised that you could pull down Ross' latest version of dslstats down via the Kitematic front end and configure it from within Kitematic I knew I was on the home straight.

There was a final twist in the tail as I couldn't get the app to appear in VNC.  I had been using localhost which then refused to work, but I could see within Kitematic the IP address / port combination the app was being published on, even if it took me several attempts to work out the syntax required by the VNC client(s)!!

It all seems so much simpler in hindsight now I understand the solution.

I couldn't walk away without making sure your command based solution also worked, which was very much smooth sailing in comparison.

A personal vote of thanks to both Andy and Ross for their help as I would never have got there without you and  a quick mention to my missus for not getting too peed off with me for spending several hours in 'dog with a bone' mode on a Bank Holiday.
Title: Re: DSLStats Docker
Post by: jaydub on April 18, 2017, 06:31:57 PM
I am struggling to understand the benefit of running this in a docker? I am not a fan of docker anyway, but whats the purpose of what you guys are doing?  I mean I assume the machine thats hosting the docker could just run dslstats directly right with less complications?

In my case, I'm running on an iMac and whilst I could run DSLStats under Wine the telnet connection generally failed within 3 minutes or so.  I'm guessing it is down to the simulation slowing the telnet handshaking down.

I have no programming background, so an easy to use application is the best for me.  The Kitematic front end makes running the docker container relatively simple, once someone (Ross) has done the donkey work of creating it.

Whether it was worthwhile in the end or not is questionable as I have an issue free line at the moment, but at least I know now that if I do have line issues in the future I can share my stats with you guys.
Title: Re: DSLStats Docker
Post by: Browni on May 06, 2017, 12:24:25 AM
Many thanks for this nallar.

Up and running on my QNAP TS-253A.
Title: Re: DSLStats Docker
Post by: andyfitter on May 16, 2017, 04:58:47 PM
Has anything changed recently with the Synology/Docker package?

I had it running correctly a few days ago but had to partially rebuild my Synology. Now whenever I run the Docker package, dslstats fails with a segmentation fault. No other output at all, just the error message.

Wanted to make sure that the package was OK as I can't see anything wrong at my end, and it was working fine previously.
Title: Re: DSLStats Docker
Post by: andyfitter on May 16, 2017, 05:29:24 PM
Appears that the latest automated build on Docker has some errors that aren't seen on previous builds?

https://hub.docker.com/r/rossallan/dslstats/builds/bgffbfe5tgmwdhwekqmjsmf/

Title: Re: DSLStats Docker
Post by: jaydub on May 16, 2017, 05:43:40 PM
Hi Andy,

Not been running DSLStats for a few days, but just restarted it and all seems OK.  No error messages and everything presents as normal.  There was a Docker update that installed earlier today, but it doesn't seem to have had a negative impact here.
Title: Re: DSLStats Docker
Post by: andyfitter on May 16, 2017, 07:14:00 PM
Fixed now by the developer. Was a bad build that had been published. He's also made the build more resilient to errors.

Really coincidental timing as only an hour or two earlier I'd installed Watchtower, which automatically updates docker images if the master version has been updated. If I hadn't installed that, it would have been running happily all along.

 
Title: Re: DSLStats Docker
Post by: nallar on August 03, 2017, 04:59:41 PM
Updated to use 6.0.1, see http://forum.kitz.co.uk/index.php/topic,19906.0.html
Title: Re: DSLStats Docker
Post by: jaydub on August 03, 2017, 05:56:48 PM
Thanks, Ross.

Sent from my EVA-L09 using Tapatalk

Title: Re: DSLStats Docker
Post by: Dray on August 09, 2017, 04:43:45 PM
How to install and use Docker on Windows -
Quote
Docker has created a tool that makes using their container software on Windows fairly simple.

The software in question is called Docker Toolbox. What this does is install all the necessary components that allow you to run Docker on Windows. Now, before you get too excited, don't think that Docker has actually ported their platform to Windows. They haven't. What Docker Toolbox does is install VirtualBox, Boot2Docker, and a special quick access terminal (that starts up the Boot2Docker virtual machine). Docker Toolbox does an outstanding job of this installation and making it easy for you to fire up Docker on your Windows machine
http://www.techrepublic.com/article/how-to-install-and-use-docker-on-windows/
Title: Re: DSLStats Docker
Post by: Ixel on October 01, 2017, 09:46:51 PM
Just came across this post by mistake. Never knew such a container existed until now, thanks very much for making it! I've just got it running on my Synology RS815+ NAS, no longer running on my desktop PC. Will continue to use it while I'm still using the HG612 on my connection.
Title: Re: DSLStats Docker
Post by: nallar on November 03, 2017, 11:56:53 AM
Automatic DST change worked for me. We did have some problems initially with timezones though.

Did anyone have a problem with DST?
Title: Re: DSLStats Docker
Post by: andyfitter on November 03, 2017, 12:01:11 PM
Yep, good for me on my Synology Docker.

Will you be doing an update to the latest Native App, downloaded within the docker package, when it comes out of beta?

Also, would it be possible to make the Docker instance pull new versions of the Native App if it is updated? I guess you would need some kind of support for knowing what was 'latest' from the site serving the App.

Thanks for all your work.
Title: Re: DSLStats Docker
Post by: nallar on November 03, 2017, 12:09:53 PM
I'm not sure how best to do that automatically. A link at http://dslstats.me.uk/files/dslstats64L-latest.tar.gz which permanently redirects to the newest version could exist, but there'd need to also be a way of triggering the docker to do a new build when it's updated.

It might not be worth trying to automate this too much as there aren't new stable builds of dslstats that often. I should be able to do any update within a day or so.
Title: Re: DSLStats Docker
Post by: highpriest on November 03, 2017, 01:09:31 PM
Is there any chance you could port this to ARM (Raspberry Pi, specifically)?
Title: Re: DSLStats Docker
Post by: roseway on November 03, 2017, 03:42:10 PM
Why would you want that?
Title: Re: DSLStats Docker
Post by: tbailey2 on November 03, 2017, 03:45:05 PM
Just came across this post by mistake. Never knew such a container existed until now, thanks very much for making it! I've just got it running on my Synology RS815+ NAS, no longer running on my desktop PC. Will continue to use it while I'm still using the HG612 on my connection.

You know you haven't uploaded to MDWS for two days?
Title: Re: DSLStats Docker
Post by: highpriest on November 03, 2017, 06:59:49 PM
Why would you want that?

I'm guessing this was in response to my post. It's just that I like to run my Pi headless, with no GUI at all. Docker is officially supported on the Pi so it's just a 'cleaner' way to run a server.
Title: Re: DSLStats Docker
Post by: roseway on November 03, 2017, 07:24:26 PM
Right, I see.
Title: Re: DSLStats Docker
Post by: Ixel on November 04, 2017, 12:10:02 AM
You know you haven't uploaded to MDWS for two days?

Yes, I have switched back to the DrayTek Vigor 2860 since it has historically handled the errors I was having better than any of the other modems I've used. Unfortunately it's not supported so I can't run DSLstatsw at the moment.
Title: Re: DSLStats Docker
Post by: Browni on November 04, 2017, 08:57:58 PM
I'm not sure how best to do that automatically. A link at http://dslstats.me.uk/files/dslstats64L-latest.tar.gz which permanently redirects to the newest version could exist, but there'd need to also be a way of triggering the docker to do a new build when it's updated.

It might not be worth trying to automate this too much as there aren't new stable builds of dslstats that often. I should be able to do any update within a day or so.
Would be possible to update the Docker to v6.0.6 or above for this reason?
(https://forum.kitz.co.uk/proxy.php?request=http%3A%2F%2Fi64.tinypic.com%2F4pxpa1.jpg&hash=ffa685e4271edc8a14c874e91cde68d7)
Title: Re: DSLStats Docker
Post by: nallar on November 19, 2017, 01:12:24 PM
Updated from 6.0.1 to 6.1.

See http://dslstats.me.uk/changelog.html for changes
Title: Re: DSLStats Docker
Post by: Browni on November 19, 2017, 03:56:10 PM
Cheers bud!
(https://forum.kitz.co.uk/proxy.php?request=http%3A%2F%2Fi66.tinypic.com%2F2aeqxr9.jpg&hash=0f00db6617c9c742b64fd1214ac6604a)
Title: Re: DSLStats Docker
Post by: jaydub on November 19, 2017, 06:33:37 PM
Cheers, Ross.
Title: Re: DSLStats Docker
Post by: andyfitter on November 19, 2017, 07:05:27 PM
working fine here too, updated with WatchTower app on docker.
Title: Re: DSLStats Docker
Post by: ip75 on November 19, 2017, 09:45:15 PM
Working well here on my Synology, thanks!
Title: Re: DSLStats Docker
Post by: roseway on November 19, 2017, 10:39:27 PM
Excellent work, nallar.
Title: Re: DSLStats Docker
Post by: sincx on January 03, 2018, 10:00:06 PM
I'd just like to thank the Nallar and other board members for the DSL Stats Docker and support on this site.  I've been having problems with a Pi Zero running the DLSStats program recently,  so I thought I might try to see if I could get the Docker instance to run on my Open Media Vault (OMV 3.0.8.5 Erasmus) NAS  running on a HP N54L Microserver.

It took a few hours of reading and trying but it now appears to work -  I'm really pleased I now have a Pi Zero to re-purpose !

sincx
Title: Re: DSLStats Docker
Post by: sincx on April 12, 2018, 11:28:17 AM
Dear Nallar ,

Would it be possible for you to update your Docker image to the latest DSLStats version - the additional logging duration and storage would be a great help !

Thanks sincx
Title: Re: DSLStats Docker
Post by: nallar on April 22, 2018, 01:13:28 PM
Updated to 6.5. See http://forum.kitz.co.uk/index.php/topic,21323.0.html

The webserver configuration has changed in this version. The default directory has moved from "webserver" to "Webserver", and capitalisation matters on linux.

It should automatically rename the webserver directory to have a capital 'W' when the container starts.
Title: Re: DSLStats Docker
Post by: jaydub on April 22, 2018, 08:14:06 PM
Updated to 6.5. See http://forum.kitz.co.uk/index.php/topic,21323.0.html

The webserver configuration has changed in this version. The default directory has moved from "webserver" to "Webserver", and capitalisation matters on linux.

It should automatically rename the webserver directory to have a capital 'W' when the container starts.

Up and running here, Ross.  I had a few issues because I forget about mapping the /config docker folder to a folder on my Mac hard drive.  Now done and the web files are appearing in the same folder as before: webserver.  Not sure whether that is expected or not?

i haven't seen any of the saved stats yet, but I've configured those to save once daily, so will look again tomorrow.

Thanks for updating the Docker container.
Title: Re: DSLStats Docker
Post by: jaydub on October 08, 2018, 06:27:03 PM
I've just upgrade by MAC to Mojave, seemingly without issue until I noticed that Kitematic had failed to create a VM for the DSL Stats docker to run in.

Despite having rebooted the Mac and upgraded Docker for Mac, Kitematic refuses to run

I am now unable to run DSLStats, which is a major bummer!!

Anybody any ideas on how to get around this issue, as I'm stumped?!
Title: Re: DSLStats Docker
Post by: jaydub on October 08, 2018, 10:27:23 PM
Got it working using Docker for Mac and trawling over old threads to recall how to run the docker container.  I'm not 100% sure I've got it writing to the correct folder but will have to wait until midnight to check it is writing correctly.

This would have been so much easier if I still had some screenshots of the configuration in the Kitematic container.

Just proving to myself what a technophobe I am! ;)
Title: Re: DSLStats Docker
Post by: russellhq on October 10, 2018, 07:48:58 PM
I'm new to docker so could be doing something wrong  :-[ But I can't get this to work

I'm running this on a Pi3 with Docker installed and here's what happens when I run the command:

Code: [Select]
pi@hassbian:~ $ sudo docker run -d --name=dslstats1 --net=bridge -p 5900:5900/tcp -p 8080:8080/tcp -e "VNC_PASSWORD"="123456789" -v /home/pi/dslstats:/config -v /etc/localtime:/etc/localtime:ro rossallan/dslstats
aaf537d450f8094eb57e462838530bd2b9c5f952946dd8829d4473201795ecfa
pi@hassbian:~ $

It looks like it does something but when I try to connect via VNC (Chrome extension or tightVNC) over port 5900 I get a "can't connect" error. Is there something simple I'm missing here?
Title: Re: DSLStats Docker
Post by: roseway on October 10, 2018, 10:45:27 PM
Why are you using Docker to run DSLstats on a Pi?
Title: Re: DSLStats Docker
Post by: russellhq on October 10, 2018, 10:49:46 PM
Good question.

I want to run DSLStats 24/7, the only piece of hardware I have to do that is the Pi. My Pi is set up for something else which means it does not have a display set up so I can't configure DSLStats the conventional way.

Running it in Docker will set up a display for me which I can connect to via VNC which means I don't have to mess about trying to set up a display on the Pi and connect it to the TV. It seemed like the simplest solution, unfortunately I cannot get it to work  :-X
Title: Re: DSLStats Docker
Post by: Westie on October 10, 2018, 10:53:46 PM
Lots of folk on here run DSLstats on a headless Pi, and connect using RealVNC, which is built into the latest Raspbian.

RealVNC creates a virtual desktop, and DSLstats runs on that. It's very simple!
Title: Re: DSLStats Docker
Post by: russellhq on October 10, 2018, 10:59:54 PM
Thanks, I'm running a modified version of Raspbian called Hassbian. I'm not sure if VNC is on it, nor what the package name is to install it . Even if I did get it installed, I don't think an X session is running so there would be nothing to VNC to...

nallar's docker container is supposed to sort all that out but I can't get it to work yet
Title: Re: DSLStats Docker
Post by: Westie on October 10, 2018, 11:09:15 PM
OK. In that case I'm afraid I cannot help. I know nothing about Hassbian or Docker. Sorry.
Title: Re: DSLStats Docker
Post by: Weaver on October 11, 2018, 10:23:16 AM
> Lots of folk on here run DSLstats on a headless Pi

Thatís really good to know. If I can ever get some help getting my own local Raspberry Pi going again, then I could definitely use this technique if I can speak VNC on my iPad.
Title: Re: DSLStats Docker
Post by: Westie on October 11, 2018, 12:26:15 PM
I could definitely use this technique if I can speak VNC on my iPad.

VNC Connect (a server) comes bundled with Raspbian, and can be enabled with a click. VNC Viewer (a client) is a free app on the Apple app store. I have 3 Pi's which I monitor/control from the iPad. Details are here. (https://www.realvnc.com/en/raspberrypi/)
Title: Re: DSLStats Docker
Post by: dee.jay on October 20, 2018, 02:23:28 PM
Just wanted to express my gratitude for this. I learned docker specifically so I could take advantage of this as I've heard of it a lot at my work, but my job role does not necessitate the requirement to learn docker.

However, as I was running 3 x 2GB RAM VM's for a few DSLstats VM's, I was able to bin all three and just run them in containers. Well, one of them I sacked off entirely, but now having 2 docker containers makes much more sense.
Title: Re: DSLStats Docker
Post by: nallar on October 23, 2018, 05:57:40 PM
It looks like it does something but when I try to connect via VNC (Chrome extension or tightVNC) over port 5900 I get a "can't connect" error. Is there something simple I'm missing here?

This docker container won't work for ARM devices, the raspberry pi is one.
Title: Re: DSLStats Docker
Post by: russellhq on October 24, 2018, 07:49:27 AM
This docker container won't work for ARM devices, the raspberry pi is one.

That'll be why it didn't work then  ;D
Title: Re: DSLStats Docker
Post by: Axel Foley on January 06, 2019, 03:39:35 PM
Make sure the localtime volume is not set, then run the following inside the shell in the docker image:

echo "Europe/London" > /config/etc/timezone
dpkg-reconfigure -f noninteractive tzdata

Then restart the container.

Failing that, will be able to look into this on Sunday.

I just installed your docker image on my Synology DS1812+, replacing my previous setup of DSLstats made up with LXQt and noVNC. Yours uses lots less resources.

The only problem I had was with TimeZone, I read all the thread but every solution failed. In the end, the only thing I needed to do was to start a shell in the container image, and run this command:

Code: [Select]
root@rossallan-dslstats1:/# dpkg-reconfigure tzdata
The console TZ wizard starts, you set the geo area and city, and it's done. And the configuration sticks to the restart of the container and DSLstats timestamps are now correct. :)

The only thing I'm missing about the previous setup with noVNC was the fact you didn't need a VNC client, you just pointed the browser to noVNC port and that's it. I don't know if it's possible for you to implement that one in your container.

Another thing I noticed (in the container terminal) is that in the start phase these errors are output:

Code: [Select]
/root/init.sh: line 21: [: missing `]'                                                             
TLResourceList.Sort 53 DUPLICATE RESOURCE FOUND: TBitchart:PNG                                     
TLResourceList.Sort 54 DUPLICATE RESOURCE FOUND: TBitchart:PNG                                     
TLResourceList.Sort 55 DUPLICATE RESOURCE FOUND: TBitchart:PNG                                     
TLResourceList.Sort 56 DUPLICATE RESOURCE FOUND: TBitchart:PNG                                     
TLResourceList.Sort 61 DUPLICATE RESOURCE FOUND: TLinechart:PNG                                     
TLResourceList.Sort 62 DUPLICATE RESOURCE FOUND: TLinechart:PNG                                     
TLResourceList.Sort 63 DUPLICATE RESOURCE FOUND: TLinechart:PNG                                     
TLResourceList.Sort 64 DUPLICATE RESOURCE FOUND: TLinechart:PNG                                     
TLResourceList.Sort 66 DUPLICATE RESOURCE FOUND: TLinediagchart:PNG                                 
TLResourceList.Sort 67 DUPLICATE RESOURCE FOUND: TLinediagchart:PNG                                 
TLResourceList.Sort 68 DUPLICATE RESOURCE FOUND: TLinediagchart:PNG                                 
TLResourceList.Sort 69 DUPLICATE RESOURCE FOUND: TLinediagchart:PNG                                 
TLResourceList.Sort 77 DUPLICATE RESOURCE FOUND: TSNRMperband:PNG                                   
TLResourceList.Sort 78 DUPLICATE RESOURCE FOUND: TSNRMperband:PNG                                   
TLResourceList.Sort 79 DUPLICATE RESOURCE FOUND: TSNRMperband:PNG                                   
TLResourceList.Sort 80 DUPLICATE RESOURCE FOUND: TSNRMperband:PNG                                   
TLResourceList.Sort 103 DUPLICATE RESOURCE FOUND: TTraffic:PNG                                     
TLResourceList.Sort 104 DUPLICATE RESOURCE FOUND: TTraffic:PNG                                     
TLResourceList.Sort 105 DUPLICATE RESOURCE FOUND: TTraffic:PNG                                     
TLResourceList.Sort 106 DUPLICATE RESOURCE FOUND: TTraffic:PNG                                     
Serving HTTP on 0.0.0.0 port 8080 ...               

The first line seems to be a syntax error in the init script.

Thanks a lot for your work. Very helpful. :)


Title: Re: DSLStats Docker
Post by: roseway on January 06, 2019, 06:37:12 PM
The duplicate resource messages are not related to Docker. They are a curiosity of the Linux versions of DSLstats, and are of no significance.
Title: Re: DSLStats Docker
Post by: Axel Foley on January 06, 2019, 11:25:26 PM
I was referring in particular to the first line of that log:

Code: [Select]
/root/init.sh: line 21: [: missing `]'