Log Error Message

Hi

Not being the most competent on Linux, I can see the following in the logs for Datamine, which explains why it is no longer logging anything.

50 01/29/13 19:13:01.592 luup_log:67: dataMine: Logging error logging variable 63::urn:upnp-org:serviceId:TemperatureSensor1::CurrentTemperature <0x2f88c680> 50 01/29/13 19:13:01.593 luup_log:67: dataMine: Unable to open file for write /dataMine/9 Emma's Temperature Sensor - CurrentTemperature [R2247].txt <0x2f88c680> 50 01/29/13 19:13:01.593 luup_log:67: dataMine: Error: '/dataMine/9 Emma's Temperature Sensor - CurrentTemperature [R2247].txt: Input/output error' <0x2f88c680>

Using SSH i can log onto Vera and I think I can see that the Datamine directory is blank/empty ?

Please can someone walk me through how I can check the permissions as it seems to be something like that ?

Take the apostrophe out of “Emma’s Temperature Sensor” by renaming the device. That may help? The apostrophe is allowed but can cause issues depending on how the file names are handled. It’s worth a try but may not be the answer.

I just tried this - Linux allows an apostrophe… In theory, dataMine should remove the reserved characters from filenames…

I’m not sure what’s up here - permissions should be ok - I guess it’s been working previously? You can see the permissions in WinSCP. Just right click on the file and click properties.

I assume everything else is ok and it’s just a problem with this channel?

Chris

Hi

It is not showing anything, looking at it today all the sensors I re-added to the plugin have gone again - it is showing 0 (zero) monitored on the UI

I’m wondering if it is the USB Drive? SSH onto my Vera and typing ‘mount’, shows the following…

/dev/sda1 on /dataMine type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso88591,shortname=mixed,errors=remount-ro)

I’m not the best in the Terminal /SSH world… I can see a dataMine and mount directory on Vera, but moving to either and entering ‘ls’ does not return anything?

Any advice ? Could the USB key have packed up?
How do I check if there is data on there?

Can you take a look in the log for anything from dataMine with the command “cat /var/log/cmh/LuaUPnP.log | grep dataMine”. This is the most useful feedback to debug this.

It’s certainly possible that the USB has packed up, but more likely (I think) that there’s another explanation and the logs may help there…

Cheers
Chris

Did you actually try to remove the ’ ?
It’s a legal character … but it does pose a problem is some layer trying to escape the spaces in the string decide to wrap the string in single quotes.

[quote=“RichardTSchaefer, post:6, topic:174133”]Did you actually try to remove the ’ ?
It’s a legal character … but it does pose a problem is some layer trying to escape the spaces in the string decide to wrap the string in single quotes.[/quote]
Yes, but that’s a programatic issue. In the code, it just references a variable name, so there’s no escaping issue (I hope!).

That’s why I said it’s a legal character … a “Slash” is not … it’s a directory separator.
It’s best if you removed ALL non word characters and or replaced then with an underscore.
Or just use the device ID as the storage file name.

Various shell tools (i.e. scripts) may have problems with the file names. Shell tools might split a single file name into multiple tokens when they see white space.

[quote=“RichardTSchaefer, post:8, topic:174133”]It’s best if you removed ALL non word characters and or replaced then with an underscore.
Or just use the device ID as the storage file name.[/quote]
Currently, I use the device ID and the name, and I remove all reserved characters. I can easily extend this to a few more characters - that’s not a problem. The big question is if this is the problem here…

Unfortunately editing the device name won’t change the filename - once logging is started, the filename remains fixed (otherwise it would be a mess trying to find all the data). You would need to remove the device and add it in with a different name…

I’ll have a play here to see if it is causing the problem…

Chris

I’ve run a test here by putting an apostrophe into the filename, and it works fine, so I don’t think this is the issue here.

@parkerc - if you can get the log entries as per my message earlier, I’ll take a look and see if I can find anything…

Cheers
Chris

Hi Chris

Here you go, entering cat /var/log/cmh/LuaUPnP.log | grep dataMine returns the following.

09 01/31/13 21:48:39.031 JobHandler_LuaUPnP::Run device 67 dataMine graphing and logging plugin room 0 type urn:schemas-cd-jackson-com:device:DataMine:1 id parent 0/0xc50c90 upnp: 0 <0x2b534000> 50 01/31/13 21:48:45.866 luup_log:67: dataMine: Initialising dataMine System (0.965) <0x2be67680> 50 01/31/13 21:48:45.939 luup_log:67: dataMine: /dataMine <0x2be67680> 50 01/31/13 21:48:45.968 luup_log:67: dataMine: Mounted: /dev/sda1 on /dataMine type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) <0x2be67680> 50 01/31/13 21:48:46.000 luup_log:67: dataMine: ERROR: Unable to open config file for read :: /dataMine/dataMineConfig.json <0x2be67680> 50 01/31/13 21:48:46.002 luup_log:67: dataMine: Reinitialising configuration structure <0x2be67680> 50 01/31/13 21:48:46.002 luup_log:67: dataMine: ERROR: Renaming '/dataMine/dataMineConfig.json' to '/dataMine/dataMineConfig.json.Thu Jan 31 21-48-45 2013.backup' --> Error '/dataMine/dataMineConfig.json: No such file or directory <0x2be67680> 50 01/31/13 21:48:46.535 luup_log:67: dataMine: ERROR: Unable to open config file for write /dataMine/dataMineConfig.json <0x2be67680> 50 01/31/13 21:48:46.536 luup_log:67: dataMine: Startup complete <0x2be67680>

Hmm - lots of errors ???

I’m not sure what’s up here - it does look like something fundamental since neither reading or writing to the USB is working. Apparently the USB is mounting correctly, but that seems to be about all.

I’d take the USB out and plug it into a PC to see what it looks like. Maybe try new/different USB stick (?) or reformat this one (?). Sorry - not so useful I know :frowning:

Chris

First of all ? Datamine ? a fantastic plug-in, should be a compulsory add-on to Vera. Thank you Chris!

No sure if the following will help but I had noticed several days ago that it had apparently stopped logging ? it was still showing the latest update times on the graph tab but all the graph produced was a straight line of the current value. This was on a test unit so I didn?t investigate until today when I noticed that the channel log count had dropped to zero. Initially I thought the upgrade to 0.966 which came out today might have failed or broken it but on the installed Apps tab 0.965 was still listed. When I logged on (planning to install System Monitor) that seemed to kick start the datamine upgrade. However when the upgrade was completed I was still left with the flatline charts.

The USB mounting seemed correct but I was getting similar errors to parkerc except the final error message was for ?no space left on the device?. The 2GB USB stick opened fine on a PC and was 99% free but I decided to reformat it anyway and power cycled Vera when I plugged it back in. That seems to have cleared the issue for me at least…

Thanks Frasier & Chris

Tried removing it, checked it in the PC, it was fine, (full of loverly historical text files), so I took them off and reformated it again and put the USB key back in. I then added a few test devices for dataMine to track and I checked the log again - and it is telling me the following…

50 02/06/13 13:34:14.635 luup_log:67: dataMine: Saving: D[63] S[urn:upnp-org:serviceId:TemperatureSensor1] V[CurrentTemperature] <0x3092a680> 50 02/06/13 13:34:14.637 luup_log:67: dataMine: Graph Type = 0 <0x3092a680> 50 02/06/13 13:34:14.638 luup_log:67: dataMine: Watching: D[63] S[urn:upnp-org:serviceId:TemperatureSensor1] V[CurrentTemperature] <0x3092a680> 50 02/06/13 13:34:14.639 luup_log:67: dataMine: ERROR: Renaming '/dataMine/dataMineConfig.json' to '/dataMine/dataMineConfig.json.Wed Feb 6 13-34-14 2013.backup' --> Error '/dataMine/dataMineConfig.json: No such file or directory <0x3092a680> 50 02/06/13 13:34:15.103 luup_log:67: dataMine: ERROR: Unable to open config file for write /dataMine/dataMineConfig.json <0x3092a680>

Using WinSCP I went into the /dataMine/ folder on Vera and tried to create a text file but it would not even allow me to do that - it returned an error. I even tried doing that via SSH and got the same

/dataMine# mkdir test mkdir: can't create directory 'test': Input/output error

The permissions on the /dataMine/ folder on Vera are ’ rwxr-xr-x ’ if that helps. and using ‘df -kh’ on the command line it shows me the following.

Filesystem Size Used Available Use% Mounted on /dev/root 4.3M 4.3M 0 100% /rom tmpfs 30.5M 3.3M 27.2M 11% /tmp tmpfs 512.0K 0 512.0K 0% /dev /dev/mtdblock7 11.0M 7.0M 4.0M 63% /overlay overlayfs:/overlay 11.0M 7.0M 4.0M 63% / /dev/mtdblock8 4.3M 4.3M 0 100% /mios /dev/sda1 3.7G 14.4M 3.7G 0% /dataMine

Very strange - it seems it is there, so why can I not access it ?

I’m not sure what’s up - it seems something fundimental. Either the USB stick isn’t working “well” :wink: anymore, or there’s something going on with the mounting, and it’s being unmounted…

Yes - there are a few things you can do to see what’s up… Use the TERMINAL button in WinSCP (the little black box with what appears to be “HOM” in it) you an use the following commands -:

[ul][li]fdisk - this will list all the drives, inluding unmounted drives[/li]
[li]mount - this will list all the drives that have been mounted to the file system[/li]
[li]blkid - this will list all the “block devices” mounted to Vera - this probably just means USB sticks that are plugged in.[/li][/ul]

I’m not sure if you’ve been following the other posts about the UUID, but the Universally Unique ID comes from the blkid command, and you an now use this in dataMine to automount a drive. This is useful if the mount point keeps changing, as it seems to do on VeraLite, and/or if you have a USB hub (I’ve not noticed any problems with my Vera3). If you have a USB hub, I’d seriously look at this option.

Cheers
Chris

Hi Chris - sorry I was updating my earlier post and did not see you had reply.

Doing an #mesg, i can see a very long list of the following (and they are recurring)

FAT: Directory bread(block 8205) failed FAT: Directory bread(block 8206) failed FAT: Directory bread(block 8207) failed FAT: FAT read failed (blocknr 570) FAT: FAT read failed (blocknr 570) FAT: Directory bread(block 8192) failed FAT: Directory bread(block 8193) failed FAT: Directory bread(block 8194) failed FAT: Directory bread(block 8195) failed FAT: Directory bread(block 8196) failed FAT: Directory bread(block 8197) failed FAT: Directory bread(block 8198) failed FAT: Directory bread(block 8199) failed FAT: Directory bread(block 8200) failed FAT: Directory bread(block 8201) failed FAT: Directory bread(block 8202) failed FAT: Directory bread(block 8203) failed FAT: Directory bread(block 8204) failed FAT: Directory bread(block 8205) failed FAT: Directory bread(block 8206) failed FAT: Directory bread(block 8207) failed FAT: FAT read failed (blocknr 570) FAT: FAT read failed (blocknr 584)

Sorry - but you’re way past my area of Linux knowledge now :frowning:

A quick search came up with the following link [url=http://lime-technology.com/wiki/index.php?title=The_Analysis_of_Drive_Issues#Unexpected_loss_of_removable_drive]http://lime-technology.com/wiki/index.php?title=The_Analysis_of_Drive_Issues#Unexpected_loss_of_removable_drive[/url]

[code]“I get a lot of messages like the following in the syslog…
What are they and should I be concerned?”

Mar 10 14:59:10 Tower kernel: FAT: Directory bread(block 510) failed
Mar 10 14:59:10 Tower kernel: FAT: Directory bread(block 511) failed[/code]

Usually when those errors appear, the system has lost contact with the flash drive.
It could be the USB port (loose or faulty)

[ul][li]Try re-seating the flash drive[/li]
[li]Try connecting to a different USB port[/li][/ul]

It could be the flash drive is going bad

[ul][li]Test it on another machine[/li][/ul]

It could be a shared IRQ has been disabled, one that serviced this USB port

[ul][li]Check the syslog for evidence related to its IRQ[/li][/ul]

more to be added, as discovered

You will have to power off to get the system back, and most likely, unRAID will want to start a parity check, because it cannot update the flash drive with a proper shutdown. Any settings changes won’t be saved either, until the flash drive is accessible again.

You and me both - so the “blind leading the blind” is fine with me :slight_smile:

Should i be concerned? Will this have effected all of the setting changes I have made on Vera ?

FYI - I’m using a USB hub and I have aready tried to use different port on that unit. I’ve just found another (old) USB key so I will give that a go.

Should i be concerned? Will this have effected all of the setting changes I have made on Vera ?[/quote]
I think I’d ignore this part, and just read it as “power down and restart”. There’s no RAID on Vera - this came from a more general Linux forum.

I’d definitely run the blkid command to get the UUID and try and mount the drive in this way. Remove the SetMountPoint (ie clear the text from this variable in the Advanced tab) and set the SetMountUUID to exactly what’s between the quotes in the UUID=“xxx-xxx-xxx” part of the blkid response. I wouldn’t be too surprised if this resolves the problem… The issue others have seen is that every time you start Vera, the USB drives end up in a different place /dev/sda1, or /dev/sde1… who knows… This method of mounting uses the USB identifier to ensure the correct mount is made…

It’s worth a try at least…

Cheers
Chris

Hi

I updated to the latest verion which gave me the ability to use the UUID and i have installed a new USB key - so far so good - I have added a number of devices and it looks to be working again

Chris - As I now have a new config file, Is it possible to merge the old data (historical records) from the old key onto the new key?

Or do I need to select the previously logged devices again and just copy their logs files over ?
As a number of the device names have changed - do I assume I will have to updated them to reflect the new device names ?

Example
Old device and log is _motionsensor [12345].txt
New device and log is Ben’s motion sensor[12346].tx