[one-users] Haven't authorized while using Java API

Hoàng Thái Xuân Khoa htxuankhoa at gmail.com
Mon Nov 26 01:43:34 PST 2012


On 11/25/2012 10:33 PM, Giovanni Toraldo wrote:

Hi Giovanni,

Thanks you so much for your reply.

> if you instance Client without parameters, will be assumed to be at 
> $ONE_AUTH, and the endpoint will be set to the environment variable 
> $ONE_XMLRPC. 
I set the environment variable $ONE_AUTH and $ONE_XMLRPC when i managed 
private cloud. Here is the result in the command line:
/root at cluster:~# echo $ONE_AUTH//
///var/lib/one/.one/one_auth//
//root at cluster:~# echo $ONE_XMLRPC//
//http://localhost:2633/RPC2//
/
> You may want to instance Client with: Client client = new 
> Client("oneadmin:password","http://localhost:2633/RPC2"); 
I tried your solution but i got the same error:
/Client client = new Client("oneadmin:7f44b494160f2e69fed6c21b2ce555b8", 
"http://localhost:2633/RPC2");/
/Error message: [HostPoolInfo] User couldn't be authenticated, aborting 
call./

My password is correct because i used it to log on to SunStone Server 
successfully. When i entered http://localhost:2633/RPC2 address in the 
browser, it returned a message:
Error 405
POST is the only HTTP method this server understands

I don't know where i was wrong. Can you give me a hint to solve this 
problem?

Thanks you in advance.

-- 
Hoang Thai Xuan Khoa
Ho Chi Minh city, Vietnam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20121126/b1ba8ffe/attachment-0002.htm>


More information about the Users mailing list