Post

5 followers Follow
0
Avatar

Unable to import templates

I've just installed my server and managed to import everything from my venter server (VMware 6.5) but the only thing that isn't working is importing templates. 

I get the following error and was wondering if anyone's seen it before:

undefined method `host' for nil:NilClass

Tom T

Please sign in to leave a comment.

4 comments

0
Avatar

Hi Tom!
welcome to the forum! 

Although vCenter 6.5 is not certified for vOneCloud I hope I can help you to know what is happening.

When do you see that error?

  • When you try to get the list of templates that you want to import after clicking on Get Templates or
  • When you try to import one of the templates on the list generated using the Import button?

If the first situation was implied (most probably), could you try to log in to the appliance as explained here and as a root try to do the following?:

  • su - oneadmin
  • Edit the /usr/lib/one/sunstone/routes/vcenter.rb file and go to to line number 103 and replace the line logger.error("[vCenter] " + e.message) with the following line logger.error("[vCenter] " + e.message + "/" + e.backtrace)
  • Save the file
  • Restart services and try to import the templates again. This time, hopefully, we would get the line number that complains about the undefined method `host'. With the line number in hand we can try to understand what may be happening and what else it's needed.

Cheers!

Miguel Angel Alvarez Cabrerizo 0 votes
Comment actions Permalink
1
Avatar

I get below error when importing templates.

It appears there was a server exception. Please check server's log.

When Check log file, I have found the following:

Fri Nov 17 09:46:42 2017 [I]: 172.18.18.82 - - [17/Nov/2017:09:46:42 +0000] "POST /vmtemplate HTTP/1.1" 201 - 0.0114
Fri Nov 17 09:46:43 2017 [E]: [vCenter] 403
Fri Nov 17 09:46:43 2017 [I]: 172.18.18.82 - - [17/Nov/2017:09:46:43 +0000] "GET /vcenter/template/undefined/12?timeout=false&use_linked_clones=&create_copy=&template_name=&csrftoken=99670882e5e04a5cefc75dfa1129c21b HTTP/1.1" 500 - 0.1985
Fri Nov 17 09:46:43 2017 [I]: 172.18.18.82 - - [17/Nov/2017:09:46:43 +0000] "POST /vcenter/template_rollback/12 HTTP/1.1" 200 - 0.0067

SanjayRSC 1 vote
Comment actions Permalink
0
Avatar

i have the same problem ,and same error as mentioned

Wed Jan 31 07:42:05 2018 [I]: 192.168.0.203 - - [31/Jan/2018:07:42:05 +0000] "GET /user/0?id=0&csrftoken=062aebe8fd6f539920cbd81fb7a4854a HTTP/1.1" 200 - 0.4347
Wed Jan 31 07:42:13 2018 [I]: 192.168.0.203 - - [31/Jan/2018:07:42:13 +0000] "GET /vmtemplate?timeout=false&pool_filter=-2&csrftoken=062aebe8fd6f539920cbd81fb7a4854a HTTP/1.1" 200 - 0.0089
Wed Jan 31 07:42:13 2018 [I]: 192.168.0.203 - - [31/Jan/2018:07:42:13 +0000] "GET /user/0?id=0&csrftoken=062aebe8fd6f539920cbd81fb7a4854a HTTP/1.1" 200 - 0.0129
Wed Jan 31 07:42:36 2018 [I]: 192.168.0.203 - - [31/Jan/2018:07:42:36 +0000] "GET /vcenter/templates?timeout=false&csrftoken=062aebe8fd6f539920cbd81fb7a4854a HTTP/1.1" 200 - 5.2353
Wed Jan 31 07:42:41 2018 [I]: 192.168.0.203 - - [31/Jan/2018:07:42:41 +0000] "POST /vmtemplate HTTP/1.1" 201 - 0.2821
Wed Jan 31 07:42:43 2018 [E]: [vCenter] 403
Wed Jan 31 07:42:43 2018 [I]: 192.168.0.203 - - [31/Jan/2018:07:42:43 +0000] "GET /vcenter/template/undefined/42?timeout=false&use_linked_clones=&create_copy=&template_name=&csrftoken=062aebe8fd6f539920cbd81fb7a4854a HTTP/1.1" 500 - 2.1786
Wed Jan 31 07:42:44 2018 [I]: 192.168.0.203 - - [31/Jan/2018:07:42:44 +0000] "POST /vcenter/template_rollback/42 HTTP/1.1" 200 - 0.1234
Xiaojin 0 votes
Comment actions Permalink