Reef Pi web interface not working

  • Thread starter Thread starter Cuxal
  • Start date Start date
  • Tagged users Tagged users None

Cuxal

New Member
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
20
Location
Bondurant, IA
What state or country do you live in
Iowa
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:
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
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
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
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
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
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
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
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
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
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
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

TOP 10 Trending Threads

WHICH KIND OF INVERT HAS CAUSED THE MOST MISCHIEF IN YOUR TANK?

  • Sea urchins

    Votes: 18 25.0%
  • Hermit crabs

    Votes: 12 16.7%
  • Other crabs

    Votes: 5 6.9%
  • Shrimp

    Votes: 6 8.3%
  • Snails or conchs

    Votes: 3 4.2%
  • Sea stars

    Votes: 0 0.0%
  • Anemones

    Votes: 12 16.7%
  • None! My inverts are model citizens. :-)

    Votes: 12 16.7%
  • Something else (tell us in the comments)

    Votes: 4 5.6%
Back
Top
Home
Post thread…
Market
What's new