Meshlium stopped syncing with external database

Development questions: create new plugins, add new features...
libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Meshlium stopped syncing with external database

Post by libelium-dev » Wed Apr 05, 2017 10:24 am

Hi JeffreyArts,

It appears your external MySQL database is not accesible:

Code: Select all

[ERROR] Failed to get DB handle: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '10.1.6.6' (110)
Also, you must to connect to external database through Meshlium LAN connection, in your case 192.168.1.21. Is your external database (10.1.6.6) accesible from eth0 Meshlium interfaz?

Please, check this connection or use ping tool from Manager System > Tools > Ping.

Check too External Database configuration in Manager System > Tools > Wifi Scan > External Database. Ensure your connection information is correct and press Check Connection (below Save button).


Best regards,

JeffreyArts
Posts: 35
Joined: Thu Sep 01, 2016 4:39 pm

Re: Meshlium stopped syncing with external database

Post by JeffreyArts » Wed Apr 05, 2017 11:14 am

Hey libelium-dev,

The IP-adress (10.1.6.6) is an old IP-adress and no longer in use. An new IP-adress is being used. The new IP-adress is saved and shown in both the 'sensor capturer' and 'wifi scanner'. When testing the connection to this IP-adress, it successfully connects.

My guess is that, somehow, the new IP-adress is not being saved correctly?

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Meshlium stopped syncing with external database

Post by libelium-dev » Thu Apr 06, 2017 9:00 am

Hi JeffreyArts,

Yes, may be that your configuration is not updated properly,

Please, connect via SSH to meshlium and check this file:

Code: Select all

nano /mnt/lib/cfg/DBsync/setup.ini
Go to [Wifiscan] and check that your user / password is correct. It shows like this:

Code: Select all

[Wifiscan]
name = "MeshliumDBexport"
table = "wifiScan"
host = "192.168.1....."
port = 3306
user = "root"
pass = "***"
limit = 100
active = 1
You can edit this file with caution if is neccesary, change only IP, user or pass.

Tell us the result,

Best regards!

JeffreyArts
Posts: 35
Joined: Thu Sep 01, 2016 4:39 pm

Re: Meshlium stopped syncing with external database

Post by JeffreyArts » Fri Apr 07, 2017 9:37 am

Hey libelium-dev,

The information in the above mentioned file is not being changed by the Meshlium dashboard when saved. The old information remains in this file. However, the new information is saved/shown on the dashboard itself.

I manually edited the file with correct username, password and host. But the database still won't synchronise.

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Meshlium stopped syncing with external database

Post by libelium-dev » Fri Apr 07, 2017 11:06 am

Hi JeffreyArts,

Please, can you tell us what your Meshlium Manager System version is?

Please, go to Help> About, and paste here your version.

Anyway, please ensure your Meshlium is full updated, go to: Update Manager> Install updates> Check for updates, and install to last version.

This bug is located in obsolete System Manager versions. If you update your Meshlium, please reboot it and try again,

Please tell us the results!

Best regads.

JeffreyArts
Posts: 35
Joined: Thu Sep 01, 2016 4:39 pm

Re: Meshlium stopped syncing with external database

Post by JeffreyArts » Fri Apr 07, 2017 1:33 pm

Hi libelium-dev,

When the problem occurred, one of my actions to attempt to resolve the issues was updating the Meshlium.

Code: Select all

Meshlium Manager System v.3.2.7

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Meshlium stopped syncing with external database

Post by libelium-dev » Mon Apr 10, 2017 9:24 am

Hi JeffreyArts,

Let's check some points in your configuration:

1. The configuration you save in the Manager System form is saved in /mnt/lib/cfg/DBsync/setup.ini. Please, note that there are some sections, you have to pay attention to the lines under "[Wifiscan]".

2. The configuration in Manager System is loaded well if you modify "[Wifiscan]" section manually in /mnt/lib/cfg/DBsync/setup.ini. If you change it manually, you can ensure what you saved showing the file with "cat /mnt/lib/cfg/DBsync/setup.ini".

3. If you have problems in any previous advice, ensure that the system does not require you to mount the partition in read-write mode (use "remountrw" before executing a command) and your partitions have free space on disk, typing "df -h".

4. You are able to connect to the external database from Meshlium. You can type

Code: Select all

mysql -h <ip> -u <user> -p
.

Let us know your results.

Best regards,

JeffreyArts
Posts: 35
Joined: Thu Sep 01, 2016 4:39 pm

Re: Meshlium stopped syncing with external database

Post by JeffreyArts » Fri Apr 14, 2017 9:42 am

Dear libelium-dev,

Sorry for the wait, It has been a bit since I was able to look at the Meshlium problems again.

After opening up the Meshlium I was suddenly given the following error:

Code: Select all

Warning: session_write_close() [function.session-write-close]: write failed: No space left on device (28) in /mnt/lib/var/www/ManagerSystem/login.php on line 42

Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/mnt/user/php5) in /mnt/lib/var/www/ManagerSystem/login.php on line 42

Warning: Cannot modify header information - headers already sent by (output started at /mnt/lib/var/www/ManagerSystem/login.php:42) in /mnt/lib/var/www/ManagerSystem/login.php on line 43
I decided to run 'df -h' after this, which gave the following result:

Code: Select all

Filesystem            Size  Used Avail Use% Mounted on
rootfs                1.5G  932M  469M  67% /
udev                   10M  2.6M  7.5M  26% /dev
/dev/disk/by-label/ROOT_FS
                      1.5G  932M  469M  67% /
tmpfs                 125M  4.5M  121M   4% /lib/init/rw
varrun                125M   76K  125M   1% /var/run
varlock               125M  4.0K  125M   1% /var/lock
tmpfs                 125M  4.0K  125M   1% /dev/shm
/dev/hda3             4.9G  4.9G     0 100% /mnt/user
tmpfs                 125M  2.8M  123M   3% /tmp
tmpfs                 125M  4.5M  121M   4% /var/log
tmpfs                 125M  4.5M  121M   4% /var/tmp
/dev/mapper/lib       887M   43M  800M   6% /mnt/lib
It seems like /dev/hda3 is full?

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Meshlium stopped syncing with external database

Post by libelium-dev » Mon Apr 17, 2017 8:00 am

Hi

Please perform this commands, both command will list the size of the given directory:

Code: Select all

du -ah --max-depth=1 /mnt/user/logs/

Code: Select all

du -ah --max-depth=1 /mnt/user
Show us the output of both commands please.

Regards

JeffreyArts
Posts: 35
Joined: Thu Sep 01, 2016 4:39 pm

Re: Meshlium stopped syncing with external database

Post by JeffreyArts » Tue Apr 18, 2017 9:23 am

Hey libelium-dev,

Here are the results for the given commands:

du -ah --max-depth=1 /mnt/user/logs/

Code: Select all

0	/mnt/user/logs/wifiscan.log
37M	/mnt/user/logs/frame.log
4.0K	/mnt/user/logs/http_parser.log
2.6G	/mnt/user/logs/syncDB.log
897M	/mnt/user/logs/db_sync.log
0	/mnt/user/logs/get_gps.log
4.0K	/mnt/user/logs/db_purge.log
384M	/mnt/user/logs/sensorParser.log
12K	/mnt/user/logs/updates.log
38M	/mnt/user/logs/sensor.log
3.9G	/mnt/user/logs/
du -ah --max-depth=1 /mnt/user

Code: Select all

28K	/mnt/user/azurehub
54M	/mnt/user/solvview
980K	/mnt/user/MicroServer_meshlium.zip
2.2M	/mnt/user/IoTSens
700M	/mnt/user/mysql
1.5M	/mnt/user/redtone
16K	/mnt/user/ota
3.9M	/mnt/user/hcp
4.5M	/mnt/user/devicelynk
7.9M	/mnt/user/amazon
0	/mnt/user/sentilo_sync.log
16K	/mnt/user/sensorup
6.9M	/mnt/user/iotticket
4.6M	/mnt/user/thingworx
8.0M	/mnt/user/smartplants
16K	/mnt/user/extunda
1.2M	/mnt/user/Cloud_bscada
17M	/mnt/user/eagleio
9.9M	/mnt/user/sofia2
16K	/mnt/user/NSR
16K	/mnt/user/nexmachina
5.2M	/mnt/user/AzureServiceBus
3.9G	/mnt/user/logs
5.8M	/mnt/user/azurebus
2.3M	/mnt/user/iotsens
16K	/mnt/user/telefonica
460K	/mnt/user/BaseN
48M	/mnt/user/thingplus
1.2M	/mnt/user/bscada
740K	/mnt/user/php5
20K	/mnt/user/SmartCityPlatform
11M	/mnt/user/Sofia2
20K	/mnt/user/telit
5.2M	/mnt/user/azure.v3.2.4
32K	/mnt/user/kii
16K	/mnt/user/orchestra
2.5M	/mnt/user/sentilo
4.0K	/mnt/user/wifi_data
100K	/mnt/user/esri
16K	/mnt/user/mqtt
36K	/mnt/user/bluemix
4.0K	/mnt/user/bluetooth_data
0	/mnt/user/.ethGateway
8.0K	/mnt/user/zigbee_data
3.3M	/mnt/user/ElementBlue
19M	/mnt/user/OpenGate
4.0K	/mnt/user/camera
16K	/mnt/user/cumulocity
16K	/mnt/user/lost+found
4.0K	/mnt/user/gps_data
2.2M	/mnt/user/Simfony
6.8M	/mnt/user/devicify
4.8G	/mnt/user
I suppose the unsynced data is stacking up and creating a huge backlog?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest