Page 1 of 2

permission error followed by DB error then crash

Posted: February 14th, 2014, 11:15 am
by narddawg314
I'm running sabnzbdplus as the same user that owns the folders I'm writing to and reading from. I've tried a complete reinstall as well, but still experiencing permissions issues and failure to open database errors following that. This isn't a constant permission issue which is why I'm confused. The app can run fine for several hours before running into trouble and crashing. I had to trim the log file down so I could use pastebin: http://pastebin.com/epiDqkrG

I've also noticed that the web gui will show the available Free space as 0 when this happens. Shortly after that I have to completely shutdown sabnzbdplus. A restart will not fix the issue. Any ideas? I have been having just as much trouble with couchpotato and I can only think that cherrypy could be the culprit since they both use it.

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 11:28 am
by sander
I would start with the first error:

Code: Select all

2014-02-13 11:18:36,945::ERROR::[misc:1354] Cannot change permissions of /home/user/Downloads/Applications
First of all: why is SAB going to /home/user/Downloads/Applications? Is it in your SAB folder or category settings?
Second: what are the rights for /home/user/Downloads/Applications ? Check with "ls -al /home/user/Downloads/Applications"?

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 11:53 am
by narddawg314
That is a folder I created for SAB to put software downloads. Also, since pastebin is a big world, I edited all of my environment specific names/ip's. "user" is mrblue.

Code: Select all

mrblue@Windoge:~$ ls -al /home/mrblue/Downloads/Applications
lrwxrwxrwx 1 mrblue mrblue 35 Feb 12 10:18 /home/mrblue/Downloads/Applications -> /mnt/owncloud/mrblue/files/Software
That folder is a symbolic link to my owncloud which is on a raid1 disk set. This is the output for the permissions of all folders that SAB needs to read/write from.

Code: Select all

mrblue@Windoge:~$ ls -al /mnt/owncloud/mrblue/files
total 6084
drwxrwxr--  12 www-data www-data    4096 Feb 13 11:03 .
drwxr-xr-x   8 www-data www-data    4096 Feb  4 15:50 ..
drwxrwxr-x   2 www-data www-data    4096 Feb 12 18:18 Data
drwxrwxr-x   7 www-data www-data    4096 Feb 13 14:39 Movies
drwxrwxr-x 181 www-data www-data   12288 Nov 19 19:46 MP3's
drwxrwxr--  16 www-data www-data    4096 Feb  5  2011 Shows
drwxrwxr-x   3 www-data www-data    4096 Feb 13 18:57 Software
and these are the groups my user belongs to.

Code: Select all

mrblue@Windoge:~$ groups mrblue
mrblue : mrblue adm cdrom sudo dip www-data plugdev lpadmin sambashare

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 11:58 am
by sander
Ah, the link to the mount is the problem. Solve that first.

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 12:04 pm
by narddawg314
edited my previous reply with more information. Where do you see an issue with the link? I have 777 on the sym link and 775 on the destination directory. Do they need to match?

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 12:16 pm
by sander
Working from a correctly working setup towards a wanted config is easier / more controllable than starting in a non-working config and then trying to analyze what's wrong.

So ... I would rule out the mounting stuff by using local directories in your home dir (the defaults used by SAB), then check that everything works. And only then proceed to more adventurous stuff. FWIW: mounted shares are often the cause of problems in this forum

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 12:20 pm
by narddawg314
OK, I'll mess around with that and see if I have better results. Thanks!

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 3:37 pm
by narddawg314
OK So I got this working without errors now. I am no longer using symbolic links. Instead I changed the owner of the destination folder to my SAB user. No errors now.

Hopefully that elminates the database not found issue that was following this error.

Re: permission error followed by DB error then crash

Posted: February 14th, 2014, 8:50 pm
by narddawg314
Well unfortunately the issue popped up on a local directory this time in the .sabnzbdplus directory. Below is everything from the log after the last restart.

Code: Select all

2014-02-14 16:39:28,078::ERROR::[dirscanner:297] Cannot read Watched Folder /home/user/Downloads/incoming
2014-02-14 16:39:29,606::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:39:29,606::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:40:23,583::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:40:23,584::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:41:18,491::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:41:18,491::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:42:14,183::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:42:14,184::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:43:07,296::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:43:07,297::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:44:08,800::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:44:08,801::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:45:03,379::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:45:03,379::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:45:58,350::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:45:58,351::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:46:51,156::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:46:51,157::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:47:34,126::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:47:34,127::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:48:27,951::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:48:27,953::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:49:22,786::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:49:22,787::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:50:05,635::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:50:05,635::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:51:04,419::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:51:04,419::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:51:59,448::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:51:59,448::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:52:42,099::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:52:42,099::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:53:36,334::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:53:36,335::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:54:30,344::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:54:30,344::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:55:25,416::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:55:25,416::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:56:19,818::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:56:19,818::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:57:13,586::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:57:13,588::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:58:03,115::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:58:03,116::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:58:56,029::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:58:56,029::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 16:59:50,665::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 16:59:50,666::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:00:44,743::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:00:44,744::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:01:39,720::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:01:39,721::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:02:33,363::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:02:33,364::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:03:27,420::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:03:27,421::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:03:28,618::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:03:28,620::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:04:15,173::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:04:15,173::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:05:12,522::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:05:12,522::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:06:05,645::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:06:05,646::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:06:59,501::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:06:59,501::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:07:54,087::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:07:54,088::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:08:25,641::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:08:25,641::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/queue9.sab failed
2014-02-14 17:08:25,645::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:08:25,646::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/postproc1.sab failed
2014-02-14 17:12:41,707::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:41,708::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/bookmarks.sab failed
2014-02-14 17:12:41,776::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:41,776::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/watched_data.sab failed
2014-02-14 17:12:45,701::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:45,701::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/postproc1.sab failed
2014-02-14 17:12:45,747::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:45,748::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/queue9.sab failed
2014-02-14 17:12:45,748::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:45,749::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/totals9.sab failed
2014-02-14 17:12:45,749::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:45,749::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/rss_data.sab failed
2014-02-14 17:12:45,750::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:45,750::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/bookmarks.sab failed
2014-02-14 17:12:45,751::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:45,751::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/watched_data.sab failed
2014-02-14 17:12:45,752::ERROR::[misc:372] Cannot create directory /home/user/.sabnzbd/admin
2014-02-14 17:12:45,752::ERROR::[__init__:933] Saving /home/user/.sabnzbd/admin/postproc1.sab failed
2014-02-14 17:12:45,752::INFO::[_cplogging:55] [14/Feb/2014:17:12:45] ENGINE Bus STOPPING
2014-02-14 17:12:45,759::INFO::[_cplogging:55] [14/Feb/2014:17:12:45] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 8085)) shut down
2014-02-14 17:12:45,764::INFO::[_cplogging:55] [14/Feb/2014:17:12:45] ENGINE Stopped thread '_TimeoutMonitor'.
2014-02-14 17:12:45,764::INFO::[_cplogging:55] [14/Feb/2014:17:12:45] ENGINE Bus STOPPED
2014-02-14 17:12:45,764::INFO::[_cplogging:55] [14/Feb/2014:17:12:45] ENGINE Bus EXITING
2014-02-14 17:12:45,765::INFO::[_cplogging:55] [14/Feb/2014:17:12:45] ENGINE Bus EXITED
2014-02-14 17:12:45,765::INFO::[_cplogging:55] [14/Feb/2014:17:12:45] ENGINE Re-spawning /usr/bin/sabnzbdplus --daemon --pidfile /var/run/sabnzbdplus/pid --autorestarted

Re: permission error followed by DB error then crash

Posted: February 15th, 2014, 12:20 am
by sander
Pleae read the last line of my first post, and act accordingly.

Re: permission error followed by DB error then crash

Posted: February 15th, 2014, 3:50 pm
by narddawg314

Code: Select all

mrblue@Windoge:~$ ls -al /home/mrblue/.sabnzbd/admin
total 96
drwxrwxr-x 3 mrblue mrblue 4096 Feb 14 19:46 .
drwxrwxr-x 5 mrblue mrblue 4096 Feb  9 13:16 ..
-rwxrwxr-x 1 mrblue mrblue    6 Feb 14 20:41 bookmarks.sab
drwxrwxr-x 2 mrblue mrblue 4096 Feb 12 17:28 future
-rwxrwxr-x 1 mrblue mrblue 2048 Feb 14 19:46 history1.db
-rwxrwxr-x 1 mrblue mrblue   11 Feb 14 20:41 postproc1.sab
-rwxrwxr-x 1 mrblue mrblue   12 Feb 14 20:41 queue9.sab
-rwxrwxr-x 1 mrblue mrblue    6 Feb 14 20:41 rss_data.sab
-rwxrwxr-x 1 mrblue mrblue  137 Feb 14 20:41 totals9.sab
-rwxrwxr-x 1 mrblue mrblue   47 Feb 14 20:41 watched_data.sab

mrblue@Windoge:~$ ls -al /home/mrblue/.sabnzbd/
total 44
drwxrwxr-x  5 mrblue mrblue 4096 Feb  9 13:16 .
drwx------ 26 mrblue mrblue 4096 Feb 14 15:02 ..
drwxrwxr-x  3 mrblue mrblue 4096 Feb 14 19:46 admin
drwxrwxr-x  2 mrblue mrblue 4096 Feb 13 09:58 logs
drwxrwxr-x  2 mrblue mrblue 4096 Feb 14 16:26 nzbBackup
-rw-------  1 mrblue mrblue 4071 Feb 14 19:44 sabnzbd.ini
-rw-------  1 mrblue mrblue 4071 Feb 14 19:44 sabnzbd.ini.bak


mrblue@Windoge:~$ pwd
/home/mrblue
mrblue@Windoge:~$ ls -al 
drwxrwxr-x  5 mrblue mrblue  4096 Feb  9 13:16 .sabnzbd
(REMOVED UNRELEVANT DIRECTORIES)

Re: permission error followed by DB error then crash

Posted: February 16th, 2014, 2:07 am
by sander
What is the output of "mount"?

Why is there x-bit on the *sab files. Did you set that yourself?

Code: Select all

-rw-rw-r-- 1 sander sander 324 feb 10 00:15 totals9.sab
With the x-bit I cannot explain the error, but it makes me think strange things are going on

I expect the error message will go away if you do this: NB will loose your history and queue, but not your settings:
stop SABnzbd. Check and re-check it's not running:

Code: Select all

ps -ef | grep -i sabnzb | grep -vi grep
That should not give output
Then:

Code: Select all

cd
cd .sabnzbd
mv admin/ admin-old
cd
Then start SABnzbd; you history will be empty. I expect the error message to be gone.

Re: permission error followed by DB error then crash

Posted: February 18th, 2014, 12:22 pm
by narddawg314
popped up again, BUT I repeated these steps and sab started up without errors so far.

Re: permission error followed by DB error then crash

Posted: February 18th, 2014, 12:34 pm
by sander
narddawg314 wrote:popped up again, BUT I repeated these steps and sab started up without errors so far.
That should not be necessary. In the future, can you post the outpout of

Code: Select all

ls -al /home/mrblue/.sabnzbd/admin
before and after the clean-up?

Re: permission error followed by DB error then crash

Posted: February 19th, 2014, 12:03 am
by narddawg314
yeah I can do that. I was talking to a friend about this and it came up that my home drive is encrypted...do you think that could possibly cause this? I found a similar thread while googling and the guy said his home drive was also encrypted. To rule that out, I was going to create /home/webServices/ and move Sab and CP over there. I am wondering though if the entire /home partition is encrypted or if it's just my /home/mrblue/ stuff?

Code: Select all

$ ls -al /home/mrblue/.sabnzbd/admin
total 92
drwxrwxr-x 2 mrblue mrblue 4096 Feb 18 16:48 .
drwxrwxr-x 6 mrblue mrblue 4096 Feb 18 10:21 ..
-rw------- 1 mrblue mrblue    6 Feb 18 16:32 bookmarks.sab
-rw-r--r-- 1 mrblue mrblue 4096 Feb 18 16:48 history1.db
-rw------- 1 mrblue mrblue   11 Feb 18 16:32 postproc1.sab
-rw------- 1 mrblue mrblue   12 Feb 18 16:32 queue9.sab
-rw------- 1 mrblue mrblue    6 Feb 18 16:32 rss_data.sab
-rw------- 1 mrblue mrblue  137 Feb 18 16:32 totals9.sab
-rw------- 1 mrblue mrblue   52 Feb 18 16:32 watched_data.sab