New jail creation: Unable to find template!

Status
Not open for further replies.

Trapizomba

Dabbler
Joined
Mar 23, 2015
Messages
24
Hi!

I'm trying to create a simple new jail from the web interface, but I'm receiving the "Unable to find template!" error message.

I'm running the new FreeNAS-9.3-STABLE-201506292130.

I do not want to use the VirtualBox template but it is the only template available at my "template list".

Anyone with the same problem?

Any workaround to create a new jail?

Thank you!
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Creating a new jail downloads the template it needs on its own. Do you have your FreeNAS configured properly for network access?
 

Trapizomba

Dabbler
Joined
Mar 23, 2015
Messages
24
Creating a new jail downloads the template it needs on its own. Do you have your FreeNAS configured properly for network access?

Yes. I upgraded my FreeNAS to version FreeNAS-9.3-STABLE-201506292130 about 30 minutes before I tried to add the new jail...

[root@freenas ~]# ping www.google.com
PING www.google.com (186.215.92.99): 56 data bytes
64 bytes from 186.215.92.99: icmp_seq=0 ttl=57 time=6.132 ms
64 bytes from 186.215.92.99: icmp_seq=1 ttl=57 time=6.037 ms
64 bytes from 186.215.92.99: icmp_seq=2 ttl=57 time=5.977 ms
64 bytes from 186.215.92.99: icmp_seq=3 ttl=57 time=5.667 ms
64 bytes from 186.215.92.99: icmp_seq=4 ttl=57 time=5.909 ms
64 bytes from 186.215.92.99: icmp_seq=5 ttl=57 time=6.113 ms
64 bytes from 186.215.92.99: icmp_seq=6 ttl=57 time=5.805 ms
64 bytes from 186.215.92.99: icmp_seq=7 ttl=57 time=6.033 ms
64 bytes from 186.215.92.99: icmp_seq=8 ttl=57 time=5.983 ms
^C
--- www.google.com ping statistics ---
9 packets transmitted, 9 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 5.667/5.962/6.132/0.140 ms
[root@freenas ~]#
 

Trapizomba

Dabbler
Joined
Mar 23, 2015
Messages
24
Now the error changed to:

Jun 30 10:13:36 freenas warden: zfs clone cardosoNAS/jails/.warden-template-standard@clean cardosoNAS/jails/ubooquity
Jun 30 10:13:36 freenas warden: ERROR: Failed creating clean ZFS base clone
 

nanopete

Dabbler
Joined
Nov 20, 2014
Messages
47
I have the same problem.
If I instead use the address I have in Jails/Configuration/Collection URL and go use wget on the tgz file from that address from a ssh session I can aquire the tgz file.
I can then make a new template from that local tgz file and I can also make a new template directly from http URL. (http://download.freenas.org/latest/RELEASE/x64/jails/)
Both of those new templates can be used to create a new jail.
But if the "template" field in the jail creation guide is left at "-----" I get unable to create template.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Is there a fix for this yet?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Hi CJ,

I figure since I'm still a mostly elementary user, I hate to barge in and make bug reports and demands etc without assuming someone more knowledgeable than I have already done so.
I actually got around the problem with some fiddling (although there continues to be issues with the qBittorrent tutorial)

I just added a new jail template, called it "Pluginjail" and set the URL to:
http://download.freenas.org/jails/9.3/x64/freenas-pluginjail-9.3-RELEASE.tgz

I hope this helps someone. I'm going to (blindly assume....!) that on a fresh install of 9.3 this bug doesn't exist and the templates are fine as default. I (continue to assume) this just somehow broke, /once/ for existing users? (hence the lack of posts of new users having trouble and it being a bigger issue?)
Anyone got a "fresh" VM to fire up and confirm?

Thanks
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
I have the same problem.
If I instead use the address I have in Jails/Configuration/Collection URL and go use wget on the tgz file from that address from a ssh session I can aquire the tgz file.
I can then make a new template from that local tgz file and I can also make a new template directly from http URL. (http://download.freenas.org/latest/RELEASE/x64/jails/)
Both of those new templates can be used to create a new jail.
But if the "template" field in the jail creation guide is left at "-----" I get unable to create template.
seeing the URL you gave, that seems wrong, instead of
http://download.freenas.org/latest/RELEASE/x64/jails shouldn't it be
http://download.freenas.org/jails/9.3/x64/ ?


Apart from that, I have most probably the same problem as the original poster.
I try to create a jail from the GUI I get: unable to find template and in the logs I see
Code:
Sep 10 22:39:39 freenas warden: Building new Jail... Please wait...
Sep 10 22:39:39 freenas warden: zfs clone fiver/jails/.warden-template-standard@clean fiver/jails/gmvaulty
Sep 10 22:39:39 freenas warden: ERROR: Failed creating clean ZFS base clone


But the templates are there:
Code:
freenas# warden template list
Jail Templates:
------------------------------
VirtualBox-4.3.12 - FreeBSD  (amd64)
pluginjail--x64 - FreeBSD  (amd64)
standard - FreeBSD  (amd64)
standard--x64 - FreeBSD  (amd64)


So what now?

Running FreeNAS-9.3-STABLE-201509022158
 

nanopete

Dabbler
Joined
Nov 20, 2014
Messages
47
seeing the URL you gave, that seems wrong, instead of
http://download.freenas.org/latest/RELEASE/x64/jails shouldn't it be
http://download.freenas.org/jails/9.3/x64/ ?


Apart from that, I have most probably the same problem as the original poster.
I try to create a jail from the GUI I get: unable to find template and in the logs I see
Code:
Sep 10 22:39:39 freenas warden: Building new Jail... Please wait...
Sep 10 22:39:39 freenas warden: zfs clone fiver/jails/.warden-template-standard@clean fiver/jails/gmvaulty
Sep 10 22:39:39 freenas warden: ERROR: Failed creating clean ZFS base clone


But the templates are there:
Code:
freenas# warden template list
Jail Templates:
------------------------------
VirtualBox-4.3.12 - FreeBSD  (amd64)
pluginjail--x64 - FreeBSD  (amd64)
standard - FreeBSD  (amd64)
standard--x64 - FreeBSD  (amd64)


So what now?

Running FreeNAS-9.3-STABLE-201509022158
You are correct about the link, I don't know why I used that link back then, but it worked at that time.
I am not able to help any more on this problem, I cannot recreate it any more.
I am on new hardware and a fresh install of FreeNAS-9.3-STABLE-201509022158 since then.
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
@nanopete thx for the feedback. I also had the same link in my config as you. I clicked it and it was wrong so I manually navigated to the new one I gave but doign that didn't solve the problem.

I've solved my problem by adding the x64 template manually, then simply creating a new jail which works flawlessly now that the template exists...
 

neatfreak

Dabbler
Joined
Sep 5, 2015
Messages
35
@ovizii
do you mind sharing the settings, since im a noob i dont know what mtree is.
each time i add a the url and the name i get a error message. do you mind sharing.
i used this url http://download.freenas.org/jails/9.2/x64/freenas-pluginjail-9.2-RELEASE.tgz because i couldnt find anything in the 9.3 folder, but this gives me a long error and i cant add it.

Code:
Environment:

Software Version: FreeNAS-9.3-STABLE-201509022158
Request Method: POST
Request URL: https://192.168.140.77/jails/template/create/


Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  105.                     response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/middleware.py" in process_view
  157.         return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  22.                 return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/../freenasUI/jails/views.py" in jail_template_create
  542.             form.save()
File "/usr/local/lib/python2.7/site-packages/django/forms/models.py" in save
  446.                              construct=False)
File "/usr/local/lib/python2.7/site-packages/django/forms/models.py" in save_instance
  99.         instance.save()
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py" in save
  545.                        force_update=force_update, update_fields=update_fields)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  573.             updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py" in _save_table
  654.             result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py" in _do_insert
  687.                                using=using, raw=raw)
File "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py" in _insert
  232.         return insert_query(self.model, objs, fields, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in insert_query
  1514.     return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  903.             cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
  53.                 return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/utils.py" in __exit__
  99.                 six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
  53.                 return self.cursor.execute(sql, params)
File "/usr/local/www/freenasUI/../freenasUI/freeadmin/sqlite3_ha/base.py" in execute
  386.         return Database.Cursor.execute(self, query, params)

Exception Type: IntegrityError at /jails/template/create/
Exception Value: UNIQUE constraint failed: jails_jailtemplate.jt_name
 
Last edited:

neatfreak

Dabbler
Joined
Sep 5, 2015
Messages
35
@ovizii
ya i found the link after i wrote that, but thats the message is get when i add both links into the add template.

Code:
Request Method:     POST
Request URL:     https://192.168.140.77/jails/template/create/
Software Version:     FreeNAS-9.3-STABLE-201509022158
Exception Type:     IntegrityError
Exception Value:    

UNIQUE constraint failed: jails_jailtemplate.jt_name

Exception Location:     /usr/local/www/freenasUI/../freenasUI/freeadmin/sqlite3_ha/base.py in execute, line 386
Server time:     Wed, 16 Sep 2015 08:51:22 +0200


plus the code above that i posted already.
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
sorry, can't help you here, it just worked for me and those errors don't tell me anything :-(
 

neatfreak

Dabbler
Joined
Sep 5, 2015
Messages
35
@ovizii

thanks for the help. I started this freenas sever yesterday, and i dont have any data on it, so i guess ill start from scratch again.
=)
it seems the server are very slow at the moment because i cant download the latest freenas iso it says eta 12 hrs to download.
 

dasti

Explorer
Joined
Jun 11, 2014
Messages
71
same kind of problem here when I upgrated from 9.2.17 to current at this date (9.3.1), there's no template anymore
I solved my problem by creating a template with the UI and pointing to the "tgz" and "mtree" files here http://download.freenas.org/jails/9.3/x64/
 

ovizii

Patron
Joined
Jun 30, 2014
Messages
435
@dasti: thanks for confirming. I'm wondering why I still see snapshots for those missing templates though and if I can safely delete the snapshots?
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319
same kind of problem here when I upgrated from 9.2.17 to current at this date (9.3.1), there's no template anymore
I solved my problem by creating a template with the UI and pointing to the "tgz" and "mtree" files here http://download.freenas.org/jails/9.3/x64/
Because I spent waaaaaay too much time trying to figure this out and the docs assume way too much of the user, here is what you do:
  • In the URL box put
    • Code:
      http://download.freenas.org/jails/9.3/x64/freenas-pluginjail-9.3-RELEASE.tgz
  • In the Mtree box put
    • Code:
      http://download.freenas.org/jails/9.3/x64/freenas-pluginjail-9.3-RELEASE.mtree
I hope this saves someone time and frustration! I was pulling my hair out.
 

Smarley

Explorer
Joined
Apr 11, 2016
Messages
64
Sorry, wrong post.
 
Status
Not open for further replies.
Top