Webserver not listening on port 10080

If your (rooted) Toon doesn't do what it's supposed to, post here. Dutch allowed / Posten in 't Nederlands toegestaan.

Moderators: marcelr, TheHogNL, Toonz

Post Reply
rbak
Starting Member
Starting Member
Posts: 20
Joined: Thu Dec 27, 2018 2:35 pm

Webserver not listening on port 10080

Post by rbak »

I recently got an old Toon 1 with bootloader version U-Boot 2010.09-R8. It used to be from my sister in Law who moved to a Nest. The device itself was in a weird state when I got it and I believe that was also the reason why she got rid of it. When I connected it to a Wifi connection, upgraded it to the latest firmware 4.22.7 (Christmas 2018) and did a factory reset all seemed to be OK. Except for the fact that most options were disabled so it basiaclly was a very simple and straigh forward thermostat.

That is also why I started looking at ways to make better use of the device and found this forum with very detailed information how to root the device and add usefull additional functionality. In order to be able to root my Toon I had ordered an FTDI adapter on one of the Chinese websites and waited for that to arrive. Only recently the adapter arrived and after rooting my Toon all worked fine and I have played around a bit with the GUI to see what additional features were now unleased ;-)

In order to save memory I have disabled all the standard Toon features in the TSC menu. I have also enabled the "Afvalkalender" and "Temperatuur logger" applications. Especially the latter seemed very usefull to me. And after it was installed the logging seem to work fine. But after a few hours the logging mysteriously stopped. For more details see here: Toon app: temperature readings. As it turns out the temperature logger uses port 10080 and for some reason that no longer responded. I found out that the same information is however available on port 80 so I changed the temperature logger code to use port 80 rather than port 10080. After restarting the Toon the logger now works again.

Nevertheless I am now puzzled why this was working fine for a couple of hours but stopped working at 2am last friday night. As I am new to Toon and I classify myself as a Linux noob I would like to find out what happened here and how to resolve it (if required). I am afraid that after an update of the temperature logger app the logger will fail again. But besides that I also would like to know why the required functionality is now available on port 80 rather than 10080. What is the reason why both ports are required in the firewall (part of the rooting manual). Is that because normally port 80 would provide specific other functionality and port 10080 is reserved for this?

Who can provide me more info? Or even better provide some guidance to resolve the issue?
TheHogNL
Forum Moderator
Forum Moderator
Posts: 2125
Joined: Sun Aug 20, 2017 8:53 pm

Re: Webserver not listening on port 10080

Post by TheHogNL »

Port 10080 should still work but it is better to move to port 80 (default)

In detail: the toon uses lighttpd as a mini webserver. The config is found here: /qmf/etc/lighttpd/lighttpd.conf

That has a section:

Code: Select all

$SERVER["socket"] == ":10080" {
server.document-root = "/qmf/www"
}
Next to that, the config also opens the default port 80:

Code: Select all

## bind to port (default: 80)
server.port                = 80
So there is bascially no difference between those ports.

Now what happened? The port should be opened in the /etc/default/iptables.conf file. Recent guides only tell you to open port 80, older manuals point to 10080.
And then there is the option in the Toon 'allow local access' which also opens this port for two hours.

My guess is that your firewall is still blocking 10080 and only allows 22 (ssh) and 80. And that you temporary opened the port using the GUI button.

Then again, the app you are talking about should be changed to port 80 in my opinion. Toonz, can you fix that in a new release?
Member of the Toon Software Collective
rbak
Starting Member
Starting Member
Posts: 20
Joined: Thu Dec 27, 2018 2:35 pm

Re: Webserver not listening on port 10080

Post by rbak »

No both port 80 and port 10080 are open in the firewall. See below:

Image

However am I wrong in thinking that the firewall settings are not even relevant in this case as the connection is made on the host itself? The script is running on the Toon and using i local host ip address 127.0.0.1. Hence why I expect the firewall is not in between and thus it would not even matter what is configured in there.

I have indeed seen the code in the /qmf/etc/lighttpd/lighttpd.conf file but it does not seem to result in port 10080 to be opened as well.

Code: Select all

$SERVER["socket"] == ":10080" {
server.document-root = "/qmf/www"
However if port 80 is now used by default I expect there is no need to have port 10080 opened in the firewall anyway. And indeed it does seem to make sense in that case for Toonz to change the script in the temperature logger app to use port 80 instead of port 10080.
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Webserver not listening on port 10080

Post by Toonz »

I will change the temperature logger app to port 80 this week.
member of the Toon Software Collective
Post Reply

Return to “Toon issues and support (Nederlands toegestaan)”