Debugging write problems

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Debugging write problems

Post by zmeggyesi » Mon Dec 10, 2018 7:39 am

Hi,

After a recent upgrade to 1.32.2 (built from source, via packpack, on Raspbian), I've found that ZoneMinder is no longer storing detected images to an external drive.

Previously, on 1.31.1, storing worked perfectly well, and I can see the diagnostic images updating in real time, but event directories are not being created. Log shows no errors, nor any relevant warning.

Can anyone help me on how I can debug the issue?

security_dude
Posts: 16
Joined: Sun Oct 07, 2018 6:55 pm

Re: Debugging write problems

Post by security_dude » Tue Dec 11, 2018 5:52 am

Try updating to 1.32.3

zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Debugging write problems

Post by zmeggyesi » Tue Dec 11, 2018 2:23 pm

Well, kind of the obvious thing to do, though not sure why writing would be broken in the first place...
Running the build will take some time, but once the server is back up, I'll see if it works.

If it doesn't, any ideas on how I could try to get to the bottom of it? It doesn't look like a *nix permissions issue, as the various directories on the external drive are all owned by the www-data user.

User avatar
iconnor
Posts: 663
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Debugging write problems

Post by iconnor » Tue Dec 11, 2018 2:35 pm

Turn on debug and see what is happening?

zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Debugging write problems

Post by zmeggyesi » Tue Dec 11, 2018 2:41 pm

Tried that - at debug level 9, with no module restrictions, nothing mentioned any failures. The external drive itself was only referenced when the analysis daemon launched, and never again.

zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Debugging write problems

Post by zmeggyesi » Wed Dec 12, 2018 8:24 am

I've updated to 1.32.3, but writes were not fixed, although new log files now appeared. In particular, one of the analysis daemon logs had this line:

Code: Select all

12/12/18 07:10:03.278685 zma_m6[1224].ERR-zm_event.cpp/180 [Can't mkdir /8127: Permission denied]
which is both surprising and not: on the one hand, it's hardly surprising that a write to the root file system would be denied; but it is surprising that ZM tries to write to the root FS in the first place.

In the storage configurations, I'm looking at a scheme of SHALLOW, a fully specified path of /mnt/external, so I'm guessing this is intended to be concatenated?

zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Debugging write problems

Post by zmeggyesi » Fri Dec 14, 2018 7:43 am

Does anyone have any ideas on how I could debug this further? I'm kind of at a loss as to why ZM would be attempting to write to the root dir...

User avatar
iconnor
Posts: 663
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Debugging write problems

Post by iconnor » Fri Dec 14, 2018 1:51 pm

First off, don't use shallow, it is there for legacy reasons,or some weird special case. Switch to medium which is what most people are using, and hence has the most testing.

I will go take a look at the shallow code and see if I can see a bug.

User avatar
iconnor
Posts: 663
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Debugging write problems

Post by iconnor » Fri Dec 14, 2018 1:56 pm

Dang it yeah. Shallow is no good. Fixed in master now. Switch to Either Medium or Deep and you will be ok.

zmeggyesi
Posts: 19
Joined: Mon Mar 05, 2018 12:10 pm

Re: Debugging write problems

Post by zmeggyesi » Sat Dec 15, 2018 1:42 pm

Just ran the build with your fix from master, and it seems to have worked, I'm seeing images come up in the right place.

There still seems to be something off in how filters handle paths during compression-upload, but I don't have anything specific on that front yet.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests