Can't destroy or console an iocage jail

Status
Not open for further replies.

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I messed up one of my iocage jails and now can't destroy it or enter it with the console command. Any ideas on how to fix it so I remove the jail and start over? Another thread recommended using iocage clean but that would wipe out all the working jails and I don't want to do that.

Code:
iocage destroy nextcloudMan2

This will destroy jail nextcloudMan2

Are you sure? [y/N]: y
Stopping nextcloudMan2
Destroying nextcloudMan2
Traceback (most recent call last):
  File "/usr/local/bin/iocage", line 10, in <module>
	sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
	return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
	rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
	return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
	return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
	return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/iocage/cli/destroy.py", line 128, in cli
	skip_jails=True).destroy_jail()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 703, in destroy_jail
	exit_on_error=self.exit_on_error).destroy_jail(path)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_destroy.py", line 250, in destroy_jail
	iocage.lib.ioc_stop.IOCStop(uuid, path, conf, silent=True)
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_stop.py", line 52, in __init__
	self.__stop_jail__()
  File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_stop.py", line 144, in __stop_jail__
	stdout=f, stderr=su.PIPE)
  File "/usr/local/lib/python3.6/subprocess.py", line 291, in check_call
	raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['setfib', '0', 'jexec', 'ioc-nextcloudMan2', '/bin/sh', '/etc/rc.shutdown']' returned non-zero exit status 1.

 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Restart FreeNAS and try again. The couple of threads that I found on it that seemed to have worked for a couple people.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Restart FreeNAS and try again. The couple of threads that I found on it that seemed to have worked for a couple people.
I already tried that and even upgraded to 11.1 U4 without success. Is there a way to delete it manually?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
The only way I can think of would be to delete the dataset directly but I don't know if that would break anything.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
The only way I can think of would be to delete the dataset directly but I don't know if that would break anything.
Could I move the /mnt/iocage/jail/nextcloudMan/ folder to /mnt/my pool/
and if it breaks thing could I move it back and be back to the original situation?
 

Kiskaa

Dabbler
Joined
May 3, 2018
Messages
43
HI there,

Sorry to hijack another thread, but did you every solve this?
Im getting the exact same issue when trying to delete an ombi jail I made.
I`ve restarted FreeNas several times, and I just cant "stop" the jail so i can delete it.
This is a screenshot from when I tried to stop/delete the jail, which seems to be same as yours.
https://i.imgur.com/Ai7tVlG.png
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
HI there,

Sorry to hijack another thread, but did you every solve this?
Im getting the exact same issue when trying to delete an ombi jail I made.
I`ve restarted FreeNas several times, and I just can't "stop" the jail so i can delete it.
This is a screenshot from when I tried to stop/delete the jail, which seems to be same as yours.
https://i.imgur.com/Ai7tVlG.png
Never got a solution. Posted a bug on GitHub. I hope when freenas updates its version of iocage it will be able to destroy the jail.
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
If your not able to stop the jail, then turn autoboot off for the jail and restart.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
If your not able to stop the jail, then turn autoboot off for the jail and restart.
After turning off auto boot for that jail I restarted it and then tried to destroy both of which gave traceback errors.
 

Kiskaa

Dabbler
Joined
May 3, 2018
Messages
43
After turning off auto boot for that jail I restarted it and then tried to destroy both of which gave traceback errors.
OK, fair enough, thanks for the update. Really annoying that I can't even stop it, however, being able to stop it, would solve the delete problem I guess.
 
Status
Not open for further replies.
Top