Freenas 11.3-u3.2

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Last night i was trying to install and learn how to use the Transmission plugin. In itself it went fairly smoothly until i got to a point where when giving a torrent to Transmission in it's web interface i didn't have permissions (even though i had looked it up and fixed that after, still no succes). So i figured you know i may aswell start over from scratch to avoid any faults lingering in there. Here's where things went wrong.

So i went to plugins to uninstall Transmission, have to put in the jailname so it can delete everything, click confirm. And then i went to do something else because why wait for an uninstall of a plugin that i had done a few times already with other plugins. But when i came back i had lost connection to my Nas. The other machine that was hooked on the same power socket & switch was still reachable. So i went to look and sure enough the freenas box had shutdown for some reason. I don't know how to look for a reason on how that happened so any help on that would be amazing (I see an alert that there was an unplanned reboot but nothing else). But also when i finally logged back in, the plugin was gone but the jail now showed CORRUPT in the state section, when i try to delete that jail i get an error and the following info.

Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 1509, in json_load
    with open(self.location + "/config.json", "r") as conf:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/ssd/iocage/jails/Transmission/config.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 1525, in json_load
    jail_dataset.properties["org.freebsd.iocage:host_hostuuid"]
KeyError: 'org.freebsd.iocage:host_hostuuid'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 130, in call_method
    io_thread=False)
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1084, in _call
    return await methodobj(*args)
  File "/usr/local/lib/python3.7/site-packages/middlewared/service.py", line 409, in delete
    f'{self._config.namespace}.delete', self, self.do_delete, [id] + list(args)
  File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1098, in _call
    return await run_method(methodobj, *args)
  File "/usr/local/lib/python3.7/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
    return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.7/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 965, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/jail.py", line 888, in do_delete
    iocage.destroy_jail(force=options.get('force'))
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py", line 721, in destroy_jail
    ioc_destroy.IOCDestroy().destroy_jail(path)
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_destroy.py", line 272, in destroy_jail
    iocage_lib.ioc_stop.IOCStop(uuid, path, silent=True)
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_stop.py", line 62, in __init__
    raise e
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_stop.py", line 55, in __init__
    path, suppress_log=True).json_get_value('all')
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 1717, in json_get_value
    return self.get_full_config()
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 1366, in get_full_config
    conf, write = self.json_load()
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 1541, in json_load
    exception=ioc_exceptions.JailMissingConfiguration)
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 103, in logit
    callback(content, exception)
  File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 76, in callback
    raise callback_exception(message)
iocage_lib.ioc_exceptions.JailMissingConfiguration: Transmission is missing it's configuration, please destroy this jail and recreate it.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
To force-delete the corrupt jail, try zfs destroy -fr ssd/iocage/jails/Transmission. Also, verify that your jail dataset is designated correctly: zfs get org.freebsd.iocage:active ssd should result in yes.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Thanks alot again! After that command i no longer see the corrupt jail in the jail listing.

When running the "zfs get org.freebsd.iocage:active ssd " command i get the response below.


Code:
root@Brisingr[~]# zfs get org.freebsd.iocage:active ssd
NAME  PROPERTY                   VALUE                      SOURCE
ssd   org.freebsd.iocage:active  -                          -
root@Brisingr[~]# zfs get org.freebsd.iocage:active ssd


So does that mean my jails are not working properly? So far with my stuff i've use the plugin installer each time when i want to try one out and only the first time i installed a plugin did it ask me to assign a pool location. Haven't had an issue like this in about 10+ in-&uninstalls from plugins with it so far...
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
You don't have a jail pool set. Go to Jails, and click the gear:

1595463150907.png


In the dialog that follows, pull down to your ssd pool, and click Choose. This will properly set the org.bsd.iocage:active property to yes on your pool.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Oh wauw, i thought when selecting a pool during plugin installation that it would either do it for you or tell you to do that.

Did it now and "ssd" was already selected so i just clicked choose.

To be sure it worked, i ran the "zfs get org.freebsd.iocage:active ssd" command after it and i got the same result as before.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
Correction, it should be org.freebsd.ioc:active, not org.freebsd.iocage:active.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Aah nice, thank you for knowing and sharing all this knowledge by the way, i really appreciate it.

Code:
root@Brisingr[~]# zfs get org.freebsd.iocage:active ssd
NAME  PROPERTY                   VALUE                      SOURCE
ssd   org.freebsd.iocage:active  yes                          local


That seems to have been correct and the fix worked! Thank you very much!
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
1 small note i do want to make, not sure if it's important, i decided to install the Transmission plugin again to do another attempt at setting it up and i got an error on the plugin install: "Error: Jail: Transmission has a missing configuration, please check that the dataset is mounted."

I did for jail name pick Transmission again so maybe that's why it happened? Something still lingering? I tried installing the plugin again, this time just naming the jail transmission and appearantly not using a capital t was good enough to let the install happen.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
Yes, this is because the plugin definition uses a lower-case t on the back-end.
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Oh? But it has not given me errors in the past whenever i used a capital letter on any jail i named for a plugin. Does this mean other plugins might be at risk? At this point in time only Emby is one i really want to keep running, the rest are not important and can be remade with lower case letters if needed.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
https://github.com/freenas/iocage-ix-plugins.git lists all the plugins on the back-end:

1595527295702.png


They're all defined as lower-case. For your emby plugin, check iocage get plugin_name <name of emby plugin>. This should have value emby (all lower-case).
 

Jerren

Explorer
Joined
Apr 15, 2020
Messages
84
Nice it does give the value emby.
So i guess it doesn't matter for the Emby plugin that i named it's jail Emby.
Where as with the Transmission plugin, naming the jail Transmission is a problem.

Thanks for giving me piece of mind that that jail will work fine or atleast as intended going forward
 
Top