Reef Pi web interface not working

Cuxal

New Member
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
20
Location
Bondurant, IA
Rating - 0%
0   0   0
Hi all,

I recently moved my reef pi to a new tank today. Everything was working fine but after I moved the pi to a new tank, I could no longer access the web interface. I can ssh into the PI and am getting email temp alerts so it seems to be working. However, I'd like to access the web interface. I have tried restarting the service using

sudo systemctl restart reef-pi.service

My journalctl -u reef-pi.service -r contains the following:

Mar 23 21:35:24 reefPi reef-pi[2898]: Methods: [GET] Mar 23 21:35:24 reefPi reef-pi[2898]: 2022/03/23 21:35:24 ERROR: Failed to run http server. Error: listen tcp: address 0.0.0.0: missing port in address Mar 23 21:35:24 reefPi reef-pi[2898]: 2022/03/23 21:35:24 Starting http server at: 0.0.0.0 Mar 23 21:35:24 reefPi reef-pi[2898]: 2022/03/23 21:35:24 reef-pi is up and running Mar 23 21:35:24 reefPi reef-pi[2898]: 2022/03/23 21:35:24 Successfully started subsystem: timers Mar 23 21:35:24 reefPi reef-pi[2898]: 2022/03/23 21:35:24 Successfully started subsystem: macro Mar 23 21:35:24 reefPi reef-pi[2898]: 2022/03/23 21:35:24 Successfully started subsystem: doser Mar 23 21:35:24 reefPi reef-pi[2898]: 2022/03/23 21:35:24 Successfully started subsystem: lightings Mar 23 21:35:23 reefPi reef-pi[2898]: 2022/03/23 21:35:23 Successfully started subsystem: equipment

Is there any way to fix the ERROR: Failed to run http server. Error: listen tcp: address 0.0.0.0: missing port in address error without reinstalling everything?

My netstat is as follows:

pi@reefPi:~ $ sudo netstat -tulnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 532/sshd: /usr/sbin tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 517/cupsd tcp6 0 0 :::22 :::* LISTEN 532/sshd: /usr/sbin tcp6 0 0 ::1:631 :::* LISTEN 517/cupsd udp 0 0 0.0.0.0:68 0.0.0.0:* 473/dhcpcd udp 0 0 0.0.0.0:631 0.0.0.0:* 562/cups-browsed udp 0 0 0.0.0.0:5353 0.0.0.0:* 382/avahi-daemon: r udp 0 0 0.0.0.0:50571 0.0.0.0:* 382/avahi-daemon: r udp6 0 0 :::33707 :::* 382/avahi-daemon: r udp6 0 0 :::5353 :::* 382/avahi-daemon: r

Thank you!
 
Last edited:
OP
OP
C

Cuxal

New Member
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
20
Location
Bondurant, IA
Rating - 0%
0   0   0
Yes I tried that. From my net stat results, it doesn't appear that the pi is listening on port 80 so I don't think the web server even started. Thank you.
 
Upvote 0

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
You have saved the configuration with missing port that is causing this. You have to use the reef-pi db command to update the settings/web address to include port number. Like 0.0.0.0:80
 
Upvote 0
OP
OP
C

Cuxal

New Member
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
20
Location
Bondurant, IA
Rating - 0%
0   0   0
You have saved the configuration with missing port that is causing this. You have to use the reef-pi db command to update the settings/web address to include port number. Like 0.0.0.0:80
Thank you! Any idea what the syntax for the reef-pi db command might be in order to do this?

I'm guessing I could also delete the database and that might work too.
 
Upvote 0
OP
OP
C

Cuxal

New Member
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
20
Location
Bondurant, IA
Rating - 0%
0   0   0
In order to fix this, I first had to stop the reef-pi service using:

sudo systemctl stop reef-pi.service

Using the command

sudo reef-pi db show reef-pi settings

I notice that my wlan0 address was 0.0.0.0
{"name":"reef-pi","interface":"wlan0","address":"0.0.0.0","display":false,"notification":false,"capabilities":{"dev_mode":false,"dashboard":true,"health_check":true,"equipment":true,"timers":true,"lighting":true,"temperature":true,"ato":true,"camera":false,"doser":true,"ph":true,"macro":true,"configuration":true,"journal":false},"health_check":{"enable":true,"max_memory":500,"max_cpu":2},"https":false,"pprof":false,"rpi_pwm_freq":100,"prometheus":false,"cors":false}

I created a json file called settings.json on the pi in my current folder with the following. Note the changes to the ip address to add port 80.

{"name":"reef-pi","interface":"wlan0","address":"0.0.0.0:80","display":false,"notification":false,"capabilities":{"dev_mode":false,"dashboard":true,"health_check":true,"equipment":true,"timers":true,"lighting":true,"temperature":true,"ato":true,"camera":false,"doser":true,"ph":true,"macro":true,"configuration":true,"journal":false},"health_check":{"enable":true,"max_memory":500,"max_cpu":2},"https":false,"pprof":false,"rpi_pwm_freq":100,"prometheus":false,"cors":false}

I ran the following command to import the json settings to the db

cat settings.json | sudo reef-pi db update reef-pi settings

Then I started up reef-pi and things were working again.

sudo systemctl start reef-pi.service

Thank you Ranjib for the help!
 
Upvote 0

vahegan

Active Member
View Badges
Joined
Sep 9, 2019
Messages
193
Reaction score
148
Rating - 0%
0   0   0
In order to fix this, I first had to stop the reef-pi service using:



Using the command



I notice that my wlan0 address was 0.0.0.0


I created a json file called settings.json on the pi in my current folder with the following. Note the changes to the ip address to add port 80.



I ran the following command to import the json settings to the db



Then I started up reef-pi and things were working again.



Thank you Ranjib for the help!
Thank you, Cuxal, you made my day. I have spent several hours trying to fix the issue, have reinstalled reefpi several times and was about to give up, when I read your post. Thanks to your detailed instructions I have the web interface up and running now!
 
Upvote 0
OP
OP
C

Cuxal

New Member
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
20
Location
Bondurant, IA
Rating - 0%
0   0   0
Thank you, Cuxal, you made my day. I have spent several hours trying to fix the issue, have reinstalled reefpi several times and was about to give up, when I read your post. Thanks to your detailed instructions I have the web interface up and running now!
Awesome! Glad it helped!
 
Upvote 0

restes

New Member
View Badges
Joined
Dec 4, 2012
Messages
2
Reaction score
1
Location
Rock Hill SC
Rating - 0%
0   0   0
I created a json file called settings.json on the pi in my current folder with the following. Note the changes to the ip address to add port 80.

How do I do that? my IP is 192.168.1.151:85 so I assume I need to get it set back to 0.0.0.0:80
 
Upvote 0

arbiter42

New Member
View Badges
Joined
Sep 21, 2020
Messages
16
Reaction score
13
Location
Washington, D.C.
Rating - 0%
0   0   0
I made a similar mistake, but for some reason I can't get the reef-pi to switch to any other port except 80. Even when the db has the value, say, "0.0.0.0:8080", the response I get from db status is:

Code:
Starting http server at: 0.0.0.0:80

Any suggestions? For a variety of reasons I don't want to run this on port 80. I'd previously been using https and port 443, but when I switch the settings to "0.0.0.0:444" and "https":true, I still get the above message.
 
Upvote 0

ColoredRock

Well-Known Member
View Badges
Joined
Aug 9, 2021
Messages
856
Reaction score
1,034
Location
Murrieta, CA (North of San Diego)
Rating - 0%
0   0   0
I made a similar mistake, but for some reason I can't get the reef-pi to switch to any other port except 80. Even when the db has the value, say, "0.0.0.0:8080", the response I get from db status is:

Code:
Starting http server at: 0.0.0.0:80

Any suggestions? For a variety of reasons I don't want to run this on port 80. I'd previously been using https and port 443, but when I switch the settings to "0.0.0.0:444" and "https":true, I still get the above message.
just change it in the configuration screen:

1678065839259.png
Update and reboot the pi
 
Upvote 0

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
978
Location
Germany
Rating - 0%
0   0   0
Duh.. reading comprehension on my part for the win... I read it as you just wanted to to change the port number.. my bad. can you get to the interface.. on 80?

Did you ever get it resolved?
Somehow I know that feeling ... :grinning-face-with-sweat:

I would add to this two questions @arbiter42 :
- Did you reboot the PI ?
(just to make sure)
- What exactly do you mean by:
db has the value, say, "0.0.0.0:8080"
? E.g. by which method did you check ?
 
Upvote 0

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,848
Reaction score
17,081
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
I made a similar mistake, but for some reason I can't get the reef-pi to switch to any other port except 80. Even when the db has the value, say, "0.0.0.0:8080", the response I get from db status is:

Code:
Starting http server at: 0.0.0.0:80

Any suggestions? For a variety of reasons I don't want to run this on port 80. I'd previously been using https and port 443, but when I switch the settings to "0.0.0.0:444" and "https":true, I still get the above message.
did you reload reef-pi after the update?
 
Upvote 0

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top