Best way to restart a service running in a jail (automated)

Status
Not open for further replies.

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Yep, you've figured it out. I forgot to include a note for creating that directory. I've updated the instructions.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Ok. I'm not quite sure how to make those dir changes. So, I just commented those steps out since they are optional.

Now, it says the daemon is "awakened" when I run the summary command you give. Sounds like it is running?

I will keep an eye on it to see if it keeps transmission healthy now.

In the meantime, is there a way to access the HTTP panel? I've tried the same 2 IP addresses/port as before and it didn't work. Seems like there is probably some additional step needed to make that accessable...
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
The email alerts are working which is nice. I got these right away. Not sure if maybe they triggered because transmission hadn't started yet. But, it looks like there could be an error in the restart code:

Code:
Does not exist Service transmission 

		Date:		Mon, 23 Jul 2018 12:08:43
		Action:	  restart
		Host:		transmission_2
		Description: process is not running

Your faithful employee,
Monit


Code:
Execution failed Service transmission 

		Date:		Mon, 23 Jul 2018 12:09:48
		Action:	  alert
		Host:		transmission_2
		Description: failed to start (exit status 0) -- '/usr/sbin/service transmission restart': usage: chown [-fhvx] [-R [-H | -L | -P]] owner[:group] file ...
	   chown [-fhvx] [-R [-H | -L | -P]] :group file ...


Your faithful employee,
Monit
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Looks like it is now restarting transmission every 3-5 minutes...

It was unstable before. But, it seemed to continue working for 3-5 hours at a time.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
It looks like monit is working fine, but it's either not finding the pidfile in the right place or transmission is legitimately not starting correctly. Then, when it tries to restart the service, there's an error with the rc task.
How do you have transmission configured? Have you been starting it via rc? Is it enabled in /etc/rc.conf? Where is transmission writing it's pidfile?
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
It looks like monit is working fine, but it's either not finding the pidfile in the right place or transmission is legitimately not starting correctly. Then, when it tries to restart the service, there's an error with the rc task.
How do you have transmission configured? Have you been starting it via rc? Is it enabled in /etc/rc.conf? Where is transmission writing it's pidfile?

Transmission configuration:

I followed this guide exactly: https://www.reddit.com/r/freenas/comments/41fhz3/configuration_guide_for_openvpn_and_ipfw_so_that/

I haven't been doing anything different from the above guide to start it. Just reboot and it's there.
I think it is enabled in rc.conf by default when installed through the plugin GUI. But, am not sure?
I don't know where the pidfile is. It would be the default location that the plugin GUI sets up.

---

I get the impression that monit is running. The errors at start-up, I think, are because its still booting up and the startup delay isn't long enough? Maybe I am mistaken about this.

It seems like monit is running because it does restart transmission. It just does so very frequently. Every few minutes.

And unfortunately, even with the frequent restarts, it still gets complete frozen like before and requires a manual jail reboot to get everything working again.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
Hmm, I didn't see anything in there about changing the pidfile location. I'm going to assume it's in the normal place.
The "failed to start" messages make it sound like Transmission isn't configured properly (except you say it does start up normally at boot). Or that monit is running the wrong start command. What does your /etc/rc.conf look like?
Transmission freezing sounds like there's some other issue going on, unrelated to monit. That's what you should address first. I saw someone on here recommending qbittorrent recently. Maybe try that instead?
 
Status
Not open for further replies.
Top