synchronisation with Flukso server failed

Just installed my new Flukso v2.

Sensors are connected correctly (+ and - are in the correct order).
Still, on the dashboard I see two things that are not OK:
1/ time does not sync
2/ sync with Fluksoserver is not OK
This is what I see:
---
System Time [UTC] Thu Jan 1 02:45:25 1970
Flukso server ping test succeeded
Last synchronisation time [UTC] Thu Jan 1 02:44:45 1970
Last synchronisation status
synchronisation with Flukso server failed
---
On the Fluksowebsite I see the device, heartbeats & uptime, but no sensors...

What can I do? Thanks

icarus75's picture

Hello Johan,

1/ Networking seems to be set up correctly as the Flukso server ping test succeeded.
2/ The Fluksometer uses NTP for configuring its local system time. This seems to fail in your case. For NTP to work correctly, your firewall (if applicable) should allow the use of UDP port 123. Are you installing the Fluksometer in a residential setting? Or is this in an office/factory environment?
3/ Synchronisation with the Flukso server failed: We don't see the API calls arriving on the server, so we'll have to dig a bit deeper on the Fluksometer side.

UPDATE: Since the time setting is not correct, ssl certificate validation fails when trying to synchronize the sensor configuration. So fixing the time issue will fix the synchronisation issue as well.

UPDATE2: Don't forget to synchronize once you've got a correct system time on the Fluksometer (which you seem to have right now).

Cheers,
Bart.

johan's picture

It seems that it just took a 'long' time. Nothing's changed and now it is indeed syncing.
First data is in - waiting for the rest - exiting! :)

johan's picture

Bart,
Again, the box does not get it's time. Yesterday, I had to shut down power for awhile - since then, the box did not sync with NTP.
The firewall does not block this - see att:
http://hofmans.be/111003_Flukso-outgoing.jpg
So it is connecting, but the time isn't set...
What can be done?
Thanks.

icarus75's picture

Hi Johan

I can't seem to find any dhcp leases in your Fluksometer's syslog. Could you tell me how your Fluksometer's network settings are configured?

Cheers,
Bart.

icarus75's picture

I put one of our test Fluksometers into manual networking config as well. No problem obtaining a correct time setting through NTP. I could connect via a reverse shell to the Fluksometer to see what's going on, but you'd have to grant permission to do this first.

icarus75's picture

Running these shell commands:

  1. root@flukso-073d12:~$ tcpdump -i ath0 udp port 123 &
  2. root@flukso-073d12:~$ /etc/init.d/network restart

Returns following tcpdump trace for the reference Fluksometer:

  1. 13:44:48.880722 IP 192.168.1.12.ntp > leela.isw.student.khleuven.be.ntp: NTPv3, Client, length 48
  2. 13:44:48.895938 IP leela.isw.student.khleuven.be.ntp > 192.168.1.12.ntp: NTPv3, Server, length 48
  3. 13:44:49.224150 IP 192.168.1.12.ntp > netshark2.cnp.be.ntp: NTPv3, Client, length 48
  4. 13:44:49.294071 IP netshark2.cnp.be.ntp > 192.168.1.12.ntp: NTPv3, Server, length 48

And for your Fluksometer:

  1. 13:45:54.413400 IP 10.32.251.243.ntp > netshark2.cnp.be.ntp: NTPv3, Client, length 48
  2. 13:45:56.631000 IP 10.32.251.243.ntp > ip41.03ber0-1.cityconnect.schedom-europe.net.ntp: NTPv3, Client, length 48

There seems to be something wrong in the NTP reply path, so inbound into your LAN as both calls to distinct NTP servers do not result in a proper answer. You might just try to disable your firewall for a short while and launch the above commands yourself. You can ssh into the Fluksometer's ethernet port with root/root.

johan's picture

strange - all other devices in the LAN get their time also from NTP - I'll check the FW and wifiAP.
Is it possible to change the NTP server?

limpens's picture

ymmv, but in /etc/config/ntpclient several ntp servers are declared (@Bart: correct me if i'm wrong!) perhaps you could change one of them.

Could your setup (firewall/router/ISP) intercept/change ntp requests and redirect them? And not to nitpick, but are you sure NTP is used and not some MSFT time protocol?

@Bart: waar komt die tcpdump vandaan?? Want die mis ik op m'n Flukso :-P

icarus75's picture

1/ The entries in /etc/config/ntpclient are indeed parsed during ntpclient startup. However, they all point to NTP server pools. The fact that you're not getting any response from different NTP servers should mean that the (outbound or inbound) UDP packet is being dropped somewhere. You might try sniffing with wireshark on the LAN segment between the FW and gateway (if they're two devices).

2/ The Fluksometer firmware is OpenWRT-Backfire-based and can be augmented with additional packages. They should however fit into the FLM's 8MB flash footprint. For more info, see the opkg command. For downloading tcpdump specifically, ssh into the FLM and issue these commands:

  1. opkg install 'http://downloads.openwrt.org/backfire/10.03.1-rc5/atheros/packages/libpcap_1.0.0-2_atheros.ipk'
  2. opkg install 'http://downloads.openwrt.org/backfire/10.03.1-rc5/atheros/packages/tcpdump_4.1.1-1_atheros.ipk'

johan's picture

After far too long, I came to realize that for some reason I can only sync with ntp.telenet.be - f**ing Telenet !!!
So I changed the /etc/config/ntpclient to include only this server - works like a charm!
Another strange thing now is that the Flukso sais it syncing with the server, but I'm not getting any readings... :-(
I have no problem connecting to the local JSON interface to get the reatime readings...
Bart, any clue as to why?

icarus75's picture

1/ Could you tell me which Telenet plan you're on? I'm with Telenet as well, never experienced anything similar wrt NTP ports being blocked (for SMTP yes). Did you open a ticket for this?

2/ Strange indeed. I ran some checks and all seems to be configured and working fine. You're not getting anything on the hour and day charts, but you are on the month chart. This might be a consequence of the NTP issue. I could flush all your sensors' data so that you get a clean start.

johan's picture

1/ Fibernet 40 - i will for sure open a ticket for this

2/ whatever it takes please - I'm not getting any readings now

icarus75's picture

2/ Done. Seems to be charting correctly now.