softlayer - Error while capturing flex image -


i running following code.

` restapiclient client = new restapiclient(baseurl).withcredentials(username, apikey); account.service service = account.service(client); service.withmask().hardware(); service.withmask().hardware().fullyqualifieddomainname(); service.withmask().hardware().id(); account account = service.getobject(); string hwname="bmtest.domain.com"; hardware hw1=null;  for(hardware h : account.gethardware()){ if(h.getfullyqualifieddomainname().equalsignorecase(hwname)) {        hw1 = h; }    }    hardware.service svc= hardware.service(client);    svc=hw1.asservice(client);    try{ template template = new template();         template.setname(hw1.getfullyqualifieddomainname()+"-hwimg-1");    template.setdescription("image of "+hw1.getfullyqualifieddomainname());    system.out.println("starting image capture");     svc.captureimage(template);` 

but following error:

`starting image capture com.softlayer.api.apiexception$internal: failed determine version of operating system running on bmtest3rhel6.domain.com via ssh. please ensure firewall not restricting access port 22, ssh server's configuration allows root login, , root credentials have on file valid. can verify , update these credentials in <i>software</i> section of <a href="/hardware/view/385236">your server's page</a>.(code: softlayer_exception_public, status: 500)     @ com.softlayer.api.apiexception.fromerror(apiexception.java:16)     @ com.softlayer.api.restapiclient$serviceproxy.logandhandleresponse(restapiclient.java:258)     @ com.softlayer.api.restapiclient$serviceproxy.invokeservice(restapiclient.java:300)     @ com.softlayer.api.restapiclient$serviceproxy.invoke(restapiclient.java:466)     @ com.sun.proxy.$proxy7.captureimage(unknown source)     @ com.ibm.adn.servlet.testbmsuspend.test(testbmsuspend.java:91)     @ com.ibm.adn.servlet.testbmsuspend.main(testbmsuspend.java:103) ` 

this particular baremetal , running. , can log inside using root, opened ports 22 ssh. still same error repeats.

the baremetal has rhel 6.7 , mentioned on sl site, eligible flex image capture.

please let me know additional things should make work.

i reviewed code , it's working fine.

one thing review check if you're using username , api key has access hardware.

check if you're allowed take flex image user in control portal, , if it's possible, run script same user credentials (i.e. username , api key).

if of these advises doesn't work, suggest open ticket on softlayer further assistance.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -