Reef Pi web interface not working

Cuxal

New Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
19
Review score
+0 /0 /-0
Location
Bondurant, IA
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:

[email protected]:~ $ 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:

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,596
Reaction score
16,600
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
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
C

Cuxal

New Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
19
Review score
+0 /0 /-0
Location
Bondurant, IA
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
C

Cuxal

New Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
19
Review score
+0 /0 /-0
Location
Bondurant, IA
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

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 9, 2019
Messages
77
Reaction score
59
Review score
+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
C

Cuxal

New Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 21, 2013
Messages
15
Reaction score
19
Review score
+0 /0 /-0
Location
Bondurant, IA
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

Is there such a thing as an "easy" acro?

  • YES (tell us about it in the thread)

    Votes: 99 44.2%
  • NO

    Votes: 50 22.3%
  • Not sure

    Votes: 72 32.1%
  • Other (please explain)

    Votes: 3 1.3%
LA
Top