Page 1 of 2
Error Messages. **solved**
Posted: Sat Jul 23, 2022 10:30 am
by woolfg
Hi
Can anyone tell me why I am getting the following error messages
logger (21.07.2022 13:28:41): station 3 (GW1000), Radio Frequency: 868 MHz
logger (21.07.2022 13:28:41): station 2 (PurpleAir), PurpleAir-a554 HW:2.0 SW:7.00
logger (21.07.2022 13:28:47): station 3 (GW1000), FW version: GW1000A_V1.7.4
database (21.07.2022 13:30:25): database sync done (99 tables, 423/4010 writes).
logger (21.07.2022 16:01:38): DB cannot retrieve 'rain0total_day' (100 tries, 9012ms): database is locked (5)
logger (21.07.2022 16:01:47): DB cannot retrieve 'rain0total_month' (100 tries, 9012ms): database is locked (5)
logger (21.07.2022 22:00:13): DB cannot retrieve 'rain0total_day' (100 tries, 9012ms): database is locked (5)
export (22.07.2022 00:00:01): cannot open template file: /tmp/mnt/data/templates/NOAA-daily-iso.exp
logger (22.07.2022 00:00:26): DB cannot retrieve 'rain0total_day' (100 tries, 9012ms): database is locked (5)
logger (22.07.2022 00:00:35): DB cannot retrieve 'rain0total_month' (100 tries, 9013ms): database is locked (5)
logger (22.07.2022 04:00:39): DB cannot retrieve 'rain0total_day' (100 tries, 9013ms): database is locked (5)
logger (22.07.2022 04:00:48): DB cannot retrieve 'rain0total_month' (100 tries, 9013ms): database is locked (5)
logger (22.07.2022 08:00:27): DB cannot retrieve 'rain0total_day' (100 tries, 9012ms): database is locked (5)
logger (22.07.2022 13:00:22): message above repeats 1 time.
logger (22.07.2022 13:00:31): DB cannot retrieve 'th0temp_day' (100 tries, 9012ms): database is locked (5)
logger (22.07.2022 13:00:43): DB cannot retrieve 'th0temp_year' (100 tries, 9012ms): database is locked (5)
logger (22.07.2022 13:00:52): DB cannot retrieve 'wind0wind_day' (100 tries, 9012ms): database is locked (5)
logger (22.07.2022 17:00:27): DB cannot retrieve 'rain0total_day' (100 tries, 9012ms): database is locked (5)
logger (22.07.2022 18:00:50): message above repeats 1 time.
logger (22.07.2022 21:00:25): DB cannot retrieve 'rain0total_day' (100 tries, 9013ms): database is locked (5)
logger (22.07.2022 23:01:07): DB cannot retrieve 'rain0total_day' (100 tries, 9012ms): database is locked (5)
logger (22.07.2022 23:01:16): DB cannot retrieve 'rain0total_month' (100 tries, 9012ms): database is locked (5)
export (23.07.2022 00:00:02): cannot open template file: /tmp/mnt/data/templates/NOAA-daily-iso.exp
logger (23.07.2022 01:00:15): DB cannot retrieve 'rain0total_day' (100 tries, 9013ms): database is locked (5)
logger (23.07.2022 06:00:23): DB cannot retrieve 'thb0seapress_year' (100 tries, 9012ms): database is locked (5)
Has the SD card failed
Kind Regards
Graham
Re: Error Messages
Posted: Sat Jul 23, 2022 10:51 pm
by Gyvate
did you have a graph request (template) running while a backup was running ?
Or while an import was running ...
looks like a concurrent access to the database while one process had the database locked ...
Do these messages continue non-stop ? If so, a reboot might get things straight again.
I don't think that's a SD card issue
Re: Error Messages
Posted: Mon Jul 25, 2022 3:15 pm
by woolfg
Hi Gyvate
Thanks for the reply
I dont have any graph requests running
If I select Database Media to be internal USB storage then my Meteobridge Pro Red just stays offline with the errors shown below
logger (25.07.2022 14:04:23): connect station 9 (System Data via Plug-in).
logger (25.07.2022 14:04:24): waiting for sensors (wind0, rain0, th0, thb0) to provide data.
logger (25.07.2022 14:04:24): services paused.
logger (25.07.2022 14:04:24): sensors are now providing data.
logger (25.07.2022 14:04:24): services started.
database (25.07.2022 14:04:28): cannot prepare select on read tables (after 100 tries in 9485ms): database disk image is malformed
database (25.07.2022 14:04:28): process received signal (11) in functions sigcrash < **getdiffms < read_tables_db < sync_db < *send_db_msg < *send_db_msg < *file_copy <
logger (25.07.2022 14:04:33): DB cannot prepare select on 'th0temp_day' (after 100 tries in 9525ms): attempt to write a readonly database (8)
logger (25.07.2022 14:04:43): DB cannot prepare select on 'th0temp_day' (after 100 tries in 9126ms): attempt to write a readonly database (8)
logger (25.07.2022 14:04:52): DB cannot prepare select on 'th0temp_day' (after 100 tries in 9129ms): attempt to write a readonly database (8)
logger (25.07.2022 14:05:01): DB cannot prepare select on 'th0temp_day' (after 100 tries in 9146ms): attempt to write a readonly database (8)
test5m (25.07.2022 14:05:05): database daemon stalled, will be restarted now.
database (25.07.2022 14:05:05): process started.
logger (25.07.2022 14:05:10): DB cannot prepare select on 'wind0avgwind_day' (after 100 tries in 9140ms): attempt to write a readonly database (8)
database (25.07.2022 14:05:14): cannot prepare select on read tables (after 100 tries in 9128ms): database disk image is malformed
logger (25.07.2022 14:05:19): DB cannot prepare select on 'wind0wind_day' (after 100 tries in 9179ms): attempt to write a readonly database (8)
logger (25.07.2022 14:05:28): DB cannot prepare select on 'wind0wind_day' (after 100 tries in 9142ms): attempt to write a readonly database (8)
logger (25.07.2022 14:05:38): DB cannot prepare select on 'wind0wind_day' (after 100 tries in 9239ms): attempt to write a readonly database (8)
logger (25.07.2022 14:05:47): DB cannot prepare select on 'thb0seapress_day' (after 100 tries in 9124ms): attempt to write a readonly database (8)
logger (25.07.2022 14:05:56): DB cannot prepare select on 'thb0seapress_day' (after 100 tries in 9125ms): attempt to write a readonly database (8)
logger (25.07.2022 14:06:05): DB cannot prepare select on 'thb0seapress_day' (after 100 tries in 9136ms): attempt to write a readonly database (8)
logger (25.07.2022 14:06:14): DB cannot prepare select on 'thb0seapress_day' (after 100 tries in 9124ms): attempt to write a readonly database (8)
logger (25.07.2022 14:06:23): DB cannot prepare select on 'th0dew_day' (after 100 tries in 9164ms): attempt to write a readonly database (8)
logger (25.07.2022 14:06:32): DB cannot prepare select on 'th0dew_month' (after 100 tries in 9134ms): attempt to write a readonly database (8)
logger (25.07.2022 14:06:42): DB cannot prepare select on 'th0dew_month' (after 100 tries in 9123ms): attempt to write a readonly database (8)
logger (25.07.2022 14:06:51): DB cannot prepare select on 'th0dew_month' (after 100 tries in 9124ms): attempt to write a readonly database (8)
logger (25.07.2022 14:07:00): DB cannot prepare select on 'th0dew_month' (after 100 tries in 9125ms): attempt to write a readonly database (8)
logger (25.07.2022 14:07:09): DB cannot prepare select on 'th0dew_day' (after 100 tries in 9146ms): attempt to write a readonly database (8)
logger (25.07.2022 14:07:18): DB cannot prepare select on 'th0dew_day' (after 100 tries in 9140ms): attempt to write a readonly database (8)
logger (25.07.2022 14:07:27): DB cannot prepare select on 'th0dew_year' (after 100 tries in 9131ms): attempt to write a readonly database (8)
logger (25.07.2022 14:07:36): DB cannot prepare select on 'th0dew_year' (after 100 tries in 9152ms): attempt to write a readonly database (8)
logger (25.07.2022 14:07:45): DB cannot prepare select on 'th0dew_year' (after 100 tries in 9126ms): attempt to write a readonly database (8)
logger (25.07.2022 14:07:55): DB cannot prepare select on 'th0dew_year' (after 100 tries in 9124ms): attempt to write a readonly database (8)
logger (25.07.2022 14:08:04): DB cannot prepare select on 'th0hum_day' (after 100 tries in 9427ms): attempt to write a readonly database (8)
logger (25.07.2022 14:08:13): DB cannot prepare select on 'th0hum_day' (after 100 tries in 9123ms): attempt to write a readonly database (8)
database (25.07.2022 14:08:17): process terminated normally.
I have to select my USB stick on front panel to get it to go back online after a reboot
I have attached a screenshot showing my running events
Regards
Graham
Re: Error Messages
Posted: Mon Jul 25, 2022 6:35 pm
by Gyvate
I would try a database rebuild - option: forced rebuild on reboot in System --> Administration
and see what it gives - depending on your DB size this can take (even many) hours.
Are you running a MB Pro or a MB on RPi - rebuild on RPi should be faster.
(but from your text I guess it's rather a MB Pro or a NANO)
Maybe one way or the other your database has got messed up.
You could also make some (radical) cleanup:
- make a backup
- connect via SSH to your MB Pro and issue the below commands
#cd /tmp/mnt
#rm dbase*
#reboot
then MB will create a new, empty database
then make a restore from your backup and reboot with the "forced check on reboot" option
Another question:
what's the size of your database ?
If it's bigger than 800 MB on a MB Pro, it won't work anymore as there is not enough space on the internal USB (1 GB for system and database - and everything you have saved/exported into the \\METEOBRIDGE\data directory (and subdirectories)
If the size of the internal USB is an/the issue, you should replace it by a bigger SLC type one - I use a 8 GB SLC microSD card with a real flat thumbnail-size microSD-USB adapter in my MB Pro - works like a charm.
A normal USB stick can wear out very fast due to the high database activity - and may be a reason for a corrupted database.
Re: Error Messages
Posted: Tue Jul 26, 2022 8:07 pm
by woolfg
Hi Gyvate
Thanks for the info
I have just ordered a bigger card
I dont think I have ever done a backup
How to I do a regular backup for example every day
Regards
Graham
Re: Error Messages
Posted: Tue Jul 26, 2022 8:21 pm
by Gyvate
in a MB Pro or MB RPi:
- insert a USB device to the front or back panel (MB Pro) or to a USB port (RPi)
- create an event under services -->events:
- choose a backup interval e.g. every hour, every day (every day is a good choice)
- save
- press test to see if it works
to see the backup you can
a) check the log file (System--> Logging)
b) take off the USB device and connect to a PC
c) mount the USB device (while stick inserted) into the exported file system and look it up with your PC
example:
connect via SSH (e.g. with the PuTTY program) to your MB Pro/RPi (username/password like for the WebUI)
execute the following demands (# is the root prompt)
#mkdir /tmp/mnt/data/USB-Backup (only required once)
# ls /dev/sd* -l (look for special devices e.g. USB devices - pick the one with a trailing 1, e.g. sda1)
#mount /dev/sda1 /tmp/mnt/data/USB-Backup (assuming your USB device is sda1, could also be sdb1 or sdc1)
now the content of the USB stick will be visible at \\METEOBRIDGE\data\USB-Backup
note: at the end of a backup the backup script will unmount the backup USB device so its content will disappear from the ....\data\USB-Backup directory => you'll have to mount the USB device again as shown before in order to see the content
a USB device can be a USB stick, USB disk (HDD or SSD - if the disk is a bigger one, it might need its own power supply)
I have e.g. repurposed an old 2.5" laptop HDD 500 GB size with a USB enclosure.

- backup-event.JPG (69.87 KiB) Viewed 9143 times
Re: Error Messages
Posted: Tue Jul 26, 2022 8:47 pm
by woolfg
Hi Gyvate
I have created the event as shown in your screenshot (I had already created an event like that)
When I press Test I get a message to say the event has been triggered manually.
I dont see anything in System -> Logging
When I log in to my Meteobridge Pro using SSH I get the following
root@MeteoBridge:~# mkdir /tmp/mnt/data/USB-Backup
mkdir: can't create directory '/tmp/mnt/data/USB-Backup': No such file or directory
root@MeteoBridge:~# ls /dev/sd* -l
brw-r--r-- 1 root root 8, 0 Jul 25 14:07 /dev/sda
brw-r--r-- 1 root root 8, 16 Jul 26 19:40 /dev/sdb
root@MeteoBridge:~# mount /dev/sda1 /tmp/mnt/data/USB-Backup
mount: mounting /dev/sda1 on /tmp/mnt/data/USB-Backup failed: No such file or directory
root@MeteoBridge:~#
I have a front mounted USB stick
I have attached some screenshots of my system
Re: Error Messages
Posted: Tue Jul 26, 2022 8:52 pm
by woolfg
I should also add my Meteobridge Data folder is completely empty which Im sure never used to be the case
I thought I should have a Template and Scripts folder at least but they have disappeared
How can I get them back
Regards
Graham
Re: Error Messages
Posted: Tue Jul 26, 2022 9:03 pm
by Gyvate
it looks like your storage is corrupted as it doesn't show on the System --> Information page.
No storage, no file system - nothing to export
under normal circumstances the database files should be under /tmp/mnt
the data subdirectory should be under /tmp/mnt
under /tmp/mnt/data the export, import, scripts, templates directories should appear
however, if the internal USB storage couldn't be mounted, that directory tree doesn't exist.
If you have a properly working internal storage (device), it will be shown on the information page.
But you can check - you'll probably not find the directories
they are rebuilt at each software update - provided the storage is available.
The latter doesn't seem to be the case.
I'm not sure how old your internal SLC USB stick (size 1 GB) is (same age as your MB Pro), but it should hold for many years.
You might want to ask Boris for a replacement ....
Send a mail to
info@smartbedded.com
what does df -h show ?
Re: Error Messages
Posted: Tue Jul 26, 2022 9:08 pm
by woolfg
Hi Gyvate
Thanks for the help
Does that mean I have also lost all my data or is there some way to recover it
I will email Boris
Regards
Graham
Re: Error Messages
Posted: Tue Jul 26, 2022 9:12 pm
by Gyvate
your last database should still be on your external USB stick as you have put the database there.
Personal scripts and charts and exports however might be lost.
The default ones will come back once proper storage is there and the application is loaded again from the meteobridge server.
your system-->Information should look like

- MB-Red-int-storage.JPG (46.74 KiB) Viewed 9117 times
in your picture the storage line is missing
Re: Error Messages
Posted: Tue Jul 26, 2022 9:18 pm
by woolfg
Hi Gyvate
This is what I get with df -h
root@MeteoBridge:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 9.1M 3.3M 5.8M 37% /
/dev/root 5.5M 5.5M 0 100% /rom
tmpfs 25.0M 23.7M 1.3M 95% /tmp
/dev/mtdblock5 9.1M 3.3M 5.8M 37% /overlay
overlayfs:/overlay 9.1M 3.3M 5.8M 37% /
tmpfs 512.0K 4.0K 508.0K 1% /dev
/dev/sda 927.9M 546.7M 317.2M 63% /tmp/mnt
root@MeteoBridge:~#
I cant access the front mounted USB stick on my PC either as I get a message File System not rcognised so it looks like I have lost my data
Regards
Graham
Re: Error Messages
Posted: Wed Jul 27, 2022 10:21 am
by woolfg
Hi Gyvate
Boris has got me up and running again but I am still getting the following messages
logger (27.07.2022 04:01:15): DB cannot retrieve 'uv0index_year' (100 tries, 9013ms): database is locked (5)
logger (27.07.2022 08:01:09): DB cannot retrieve 'rain0total_month' (100 tries, 9012ms): database is locked (5)
I dont know why
Also I have just received my 8Gb SLC micro SD card - what do I need to do to replace the original
Is it just a case of removing the old one or do I need to format the new first and do I need to copy anything from the old to the new card
Kind Regards
Graham
Re: Error Messages
Posted: Wed Jul 27, 2022 12:38 pm
by Gyvate
Hi Graham
I recall that you are located in the UK ...
Hence a piece like
https://www.amazon.co.uk/Integral-micro ... s9dHJ1ZQ== would be the right thing to accomodate your 8 GB SLC microSD
you will have to open your MB Pro (video by Boris available on youtube:
https://www.youtube.com/watch?v=Wn0_tM_jjZI) and replace the stick (which is by the way shown in the df -h result as /dev/sda) by the adapter with the SD inserted. It's not too difficult to do.
Regarding the database, I think you should start from scratch again with the new storage - the database locks should disappear - I assume they come from the stick ... And do regular daily database backups

To know more I would have to be able to log into your MB Pro ...
Before you replace the storage you should save your configuration file to your PC (System-->Administration "Configuration Data" "Backup").
With the new storage MB will load the OS and the latest application stack again - you will need to redo the configuration (by loading/restore the earlier backed-up config file and probably confirming your license). Use internal USB as option for the database location (System-->Administration). You may need to save and reboot on the Adminisration page after the reload of the configuration. Then it should be up and running normally.
Re: Error Messages
Posted: Wed Jul 27, 2022 12:57 pm
by woolfg
Hi Gyvate
Thanks for the reply
The amazon link you sent doesnt seem to open
Am i right in thinking then that the micro SD card is inside the USB stick
So I need a micro SD to USB adapter
Regards
Graham