NameError: name 'collections' is not defined -- after update

isamudysan

Dabbler
Joined
Feb 25, 2015
Messages
11
just wondering if anyone else is getting this NameError issue after the update. i was attempting to add a few mounting points in the emby jail, but have not been successfull at all today. below is the error in full:

Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 128, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 88, in _run
return await self._call(f'{service_name}.{method}', serviceobj, methodobj, params=args, job=job)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/worker.py", line 81, in _call
return methodobj(*params)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/jail.py", line 684, in fstab
dump, _pass, index=index
File "/usr/local/lib/python3.6/site-packages/iocage_lib/iocage.py", line 1037, in fstab
index=index
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_fstab.py", line 67, in __init__
self.dests = self.__validate_fstab__(self.fstab, 'all')
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_fstab.py", line 194, in __validate_fstab__
exception=iocage_lib.ioc_exceptions.ValidationFailed
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 90, in logit
_callback(content, exception)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_common.py", line 64, in callback
raise callback_exception(message)
File "/usr/local/lib/python3.6/site-packages/iocage_lib/ioc_exceptions.py", line 32, in __init__
collections.Iterable
NameError: name 'collections' is not defined
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 165, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1141, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1078, in _call
return await self._call_worker(serviceobj, name, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1105, in _call_worker
job,
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1036, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1021, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
NameError: name 'collections' is not defined

thanks in advance for your replies, and greatly appreciate any assistance.

isamudysan
 

damatt2000

Cadet
Joined
Feb 22, 2019
Messages
2
Same here. Cant start any jails after boot drive failure and fresh install. I was able to import old pool and see the old jails. I cant start them though I tried creating mount points and get the same issue.

1550860729238.png
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Someone's messed up the "mount points" script so it can't handle paths with spaces in. If you happen to be in a position to rename the source, it'll work. I just came here with the same issue, setting up a Plex server with a media source folder with spaces. It no longer has spaces.

damatt2000 - that's probably a different issue, I've just done a from-scratch install and imported the old pool and jails, and I'm not having that trouble.
 

shiphtfour

Dabbler
Joined
Jan 21, 2013
Messages
26
I am having the same issue, but it does not seem to only be caused by paths with spaces in them (although that is indeed a culprit as well). I get the same error when trying to add more than one mount point, even if the path does not have any spaces in it.
 

isamudysan

Dabbler
Joined
Feb 25, 2015
Messages
11
Someone's messed up the "mount points" script so it can't handle paths with spaces in. If you happen to be in a position to rename the source, it'll work. I just came here with the same issue, setting up a Plex server with a media source folder with spaces. It no longer has spaces.

damatt2000 - that's probably a different issue, I've just done a from-scratch install and imported the old pool and jails, and I'm not having that trouble.

i only have one dataset that has a space, and that's "tv shows." i'm looking to rename it if that's a possibility. in any case, the mounting point for me is:
source: /mnt/Priv/avn​
destination: /mnt/Tulu/iocage/jails/emby/root/media/priv​
 

elcid

Cadet
Joined
Feb 16, 2018
Messages
5
@damatt2000 I too had to do a fresh install after updating to U2. Immediately after updating, I attached another USB to the boot environment, so I figured that's what went wrong. Maybe you experienced the same thing I did? I cannot remember the error messages...

But I'm here to report I cannot mount storage to my jails, either. I am also getting the "name 'collections' not defined error" with the exact error code in OP's post.
 

damatt2000

Cadet
Joined
Feb 22, 2019
Messages
2
I'm getting both errors. The one in ops post plus this one. I figured it has something to do with mounting the storage.
 

ggoldfingerd

Explorer
Joined
Dec 28, 2014
Messages
51
I have the exact same issue. You cannot use spaces from the GUI or the CLI. I just created the jail in FreeNAS 11.1 without any issues. I upgraded to FreeNAS 11.2, destroyed the jails, and could not recreate it due to the spaces. Using "\ " or "\040" does not work.
 

isamudysan

Dabbler
Joined
Feb 25, 2015
Messages
11
i guess the solution is to wait for the next update?
 

mckw99

Cadet
Joined
Feb 27, 2019
Messages
1
Same issue here - mount point works fine without spaces when creating jail - with spaces error. Freenas 11.2
 

isamudysan

Dabbler
Joined
Feb 25, 2015
Messages
11
Yes, hopefully this is addressed for U3. I went ahead and removed the spaces from my folder names.

how did you remove space, if the folder is a dataset?
 

elcid

Cadet
Joined
Feb 16, 2018
Messages
5
So... in the meantime, I cannot start my jails. I cannot remove the mount points to start my jails, either via the GUI or CLI (e.g., iocage fstab -e <jailname>).

Is there any other way I can remove these pointers or am I stuck waiting until U3 releases, whenever that is?

edit: nevermind, found the help on the link provided by @dlavigne , thanks!
 

razmspiele

Dabbler
Joined
Feb 22, 2019
Messages
17
Forgive my ignorance, but I navigated to /mnt/POOLYOUACTIVATED/iocage/jails/JAIL/fstab via SSH and I'm not sure what to do from there. I just started with FreeNAS today, so I'm a bit green still.
 

robles

Explorer
Joined
Jul 29, 2014
Messages
89
Forgive my ignorance, but I navigated to /mnt/POOLYOUACTIVATED/iocage/jails/JAIL/fstab via SSH and I'm not sure what to do from there. I just started with FreeNAS today, so I'm a bit green still.

Just edit your fstab and add/remove your desired mountpoints. If they contain spaces, I find that escaping them with \040 works. For example:

Code:
/mnt/vault/media/new\040docs     /mnt/bonnet/iocage/jails/newjail/root/mnt/new\040docs       nullfs  ro      0       0
 

razmspiele

Dabbler
Joined
Feb 22, 2019
Messages
17
Edit: I was able to get it working. Thanks a bunch!
 
Last edited:
Top