Having issues with my CouchPotato Jail

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
I did an update to my jail and now I have the following error when CP is starting


root@CouchPotato:~ # service couchpotato restart /usr/local/etc/rc.d/couchpotato: WARNING: $command_interpreter /usr/local/bin/python != python2 /usr/local/etc/rc.d/couchpotato: WARNING: $command_interpreter /usr/local/bin/python != python2 couchpotato not running? /usr/local/etc/rc.d/couchpotato: WARNING: $command_interpreter /usr/local/bin/python != python2 Starting couchpotato env: python2: No such file or directory /usr/local/etc/rc.d/couchpotato: WARNING failed to start couchpotato

How can I fix this or how can I migrate my settings and database over to a fresh install?
 

msbxa

Contributor
Joined
Sep 21, 2014
Messages
151
Its looking for python2 to start. Find the location of python2.7 or 3.6 and python2 and do symlink and run command:

iocage exec couchpotato ln -s /usr/local/bin/python2.7 /usr/bin/python2

If it doesn't exists then pkg install python2
 

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
Python2 is installed, I also tried the command and it made no difference.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
I'm having the same issue with Headphones in a 11.3 jail. I've done all the python2.7 linking. I've tried setting the path in the rc.d file to the python2.7 directory. Nothing seems to allow running python2.7 through the rc.d file. I can, however, run Headphones manually python /usr/local/headphones/Headphones.py. I'm betting you can do the same with CP.
 

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
You'd probably be right, but now I'm getting other errors when I try to run it that way probably from trying different things to fix this. I just rebuilt it from the plugin and copied over my settings from my old install. Now I'm having permission issues but I think I figured it out, I think the plugin uses a different user than what I had from a manually built jail.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
Check id media (or whatever user you're using) to make sure the uid is the same as the user outside the jail. Also ls -l the /usr/local/couchpotato folder to see who owns it
 

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
Joined
Jan 7, 2015
Messages
1,150
Ive had this error make /usr/local/etc/rc.d/couchpotato

command_interpreter="/usr/local/bin/python2"
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
So, I have been working with @John Digital and he solved it for me!
Does the file /config/headphones/config.ini exist? Whats in it? Is it a previous config and db?

log_dir = /usr/local/headphones/logs

Is what mine has for log location and to my knowledge is default.
My config.ini had log_dir = /var/db/headphones/logs and changing it to log_dir = /usr/local/headphones/logs fixed it and I'm able to run Headphones. I have no idea how that could have changed and why it's now working.
 
Joined
Jan 7, 2015
Messages
1,150
Its because user media did not have access to /var/db/headphones/logs or it simply didnt exist.
 
Joined
Jan 7, 2015
Messages
1,150
Glad its sorted for you man, try my fix for CP i think that will get it for you too.
 

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
Thanks, I trashed what I had and started from the plugin, now I'm having issues updating, but I tried some things to we'll see once a new update gets pushed. Glad diedrichg was able to get his headphones started and hopefully this helps someone in the future that stumbles upon this thread.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
I was hopping our issues were related, didn't mean to takeover your thread
 
Joined
Jan 7, 2015
Messages
1,150
Yes if memory serves the fix for the CP issue when it squawks about python is to specify the command_interpreter="/usr/local/bin/python2" value in the rc.d/couchpotato file. Good luck, @diedrichg I thought that this was your OP too.
 

tstorm

Explorer
Joined
Jan 5, 2015
Messages
69
No worries @diedrichg, I'm happy something got resolved here.
 
Joined
Jan 7, 2015
Messages
1,150
Hey for all of you that stumble across this and especially you @tstorm the real fix for this is editing your CouchPotato.py file. I restarted mine manually tonight and got the same error but I changed the shebang line in /usr/local/CouchPotatoServer/CouchPotato.py (very first line) From,
#!/usr/bin/env python
to,

#!/usr/local/bin/python2
So I dont know now if it still needs to be set in the rc.d/couchpotato file, because it was running the whole time, I was just updating some jails to 11.3 tonight and discovered it. This allows CP to start and run clean.
 

rumbeard

Dabbler
Joined
Sep 10, 2018
Messages
17
I have this same issue and none of the above fixes work for me. I am currently just manually executing the rc script line after changing the shell for media user from no login to csh. and su 'ing to the user.

I don't have any such file /usr/local/CouchPotatoServer/CouchPotato.py. My file is in /usr/local/share/couchpotato. I did notice the logs moved from the previous location /var/db/couchpotato/logs to /usr/local/couchpotato/logs with tonight's launch.
 

MrRusch

Cadet
Joined
Jul 30, 2018
Messages
6
Hey for all of you that stumble across this and especially you @tstorm the real fix for this is editing your CouchPotato.py file. I restarted mine manually tonight and got the same error but I changed the shebang line in /usr/local/CouchPotatoServer/CouchPotato.py (very first line) From,
#!/usr/bin/env python
to,

#!/usr/local/bin/python2
So I dont know now if it still needs to be set in the rc.d/couchpotato file, because it was running the whole time, I was just updating some jails to 11.3 tonight and discovered it. This allows CP to start and run clean.

Yes, you need to make both changes. Just confirmed this myself resolving the issue..
 
Top