Server not found

Three times today the Base Unit has gone down, or is not contactable, ai am not sure which. Nothing has been or was done prior to this. It has been working fine. Checking the CMS logs the same error is reported on all three occasions …

2023-06-17 05:17:27.044|WARN|emoncms_mqtt.php|Not connected, retrying connection
2023-06-17 05:17:27.083|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2023-06-17 11:38:07.-51|WARN|emoncms_mqtt.php|Not connected, retrying connection
2023-06-17 11:38:07.-13|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2023-06-17 15:47:59.092|WARN|emoncms_mqtt.php|Not connected, retrying connection
2023-06-17 15:47:59.129|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0

I do not know what …mqtt.php does. The card is standard as issued when purchased. Another observation is that the Tx would seem to be OK as the Admin entry says some 300 odd lines were waiting to be written.

How can this be stopped ? Is there an auto-reboot facility if that’s what it needs. After cycling the power, normal service is resumed.

[edited by MOD] Please format code/logs etc with Ctl-E

That happens all the time, not an issue. It was disconnected from the MQTT Broker for less than a tenth of a second.

By Base Unit do you mean an emonBase (i.e. an RPi)?

Is it connected by Wi-Fi? If so I’d start there particularly if using an ISPs router and runing in Dual Band mode (shared SSID for both frequencies). Have you reserved the IP Address?

So I think you are confusing different things. The emonBase, by default, stores the data in memory, then writes it to disk as a batch - that is those 300 readings.

How did you access the Admin, if it was ‘down’?

Ok, coincidence that the timing was identical to when inaccessible, no other entries were there?


Yes. Ok will try. No

Cycled the power.

What happens if I use my Mac, then my iPhone then my iPad to check dashboards when logged.

shouldn’t make any difference.

Is this a new install?

Was there much data loss? There will be a bit because you cycle the power.

Can you Ping the emonBase or connect by SSH and not just by the web UI?

Yes. Well I’ve had the equipment about a month now. All has been well until the last few days when the problem as described started. In the last couple of days it has continued. However I have refrained from rebooting and waited. Literally refreshed after a timeout in Safari. Refreshed again and then magically the log in screen comes back and it works fine …… for a while. Even more oddly, while waiting for Safari on my iPad to timeout, I went to my Mac where I found it was working fine !!! Then going back to my iPad, it also had started working fine !!!

It feels like sessions/web server or networking. Need to find logs to analyse more.

No so I’d notice.

I haven’t tried SSH but Fing on my Mac would ping it fine when it was not responding on Safari.

I would suggest it is very likely to be a network issue. Do you use the IP address as the URL or try and resolve the local name?

Ordinarily just emonpi. If that fails then the assigned IP address. Failure to contact has occurred using both so that rules out DNS. Are the web server logs usual Apache on a Pi ?

Yes but logging pretty much turned off. If it was an issue at that point I’d expect more reports of it. I’d still bet on your network as the issue.

Check free space (df -h) and memory load.

Will do. This last couple of days I notice that if I am patient and wait for the timeout in the browser, then refresh and wait for the timeout again, then refresh again the log in screen will appear … normal service is resumed. I’m starting to notice this is repeatable, so am counting and will investigate further.

Previously, I was always using ‘emonpi’ in the Safari browser. Most times it would connect ok. Some times it would pass the term emonpi to google as a search term, so likely a DNS problem in this instance. Occasionally, there would be no response at all. For several days now I have been using ‘emonpi.local’ without any failures. If I don’t post again, then this was the solution. Thx @borpin