VMware Cloud Community
hypermike
Contributor
Contributor

get error when using HQ Web Services Api java: command not found

Im not sure Im using this product correctly . I downloaded the tar file and extracted it .. It prduced all the files your HELP document says it has :

drwxr-xr-x 2 hyperic hyperic 4096 May 20 18:18 bin
-rwxr-xr-x 1 hyperic hyperic 143866 Feb 11 17:49 hqapi1-1.0.jar
drwxr-xr-x 4 hyperic hyperic 4096 May 20 18:18 javadoc
drwxr-xr-x 2 hyperic hyperic 4096 May 20 18:18 lib
drwxr-xr-x 2 hyperic hyperic 4096 May 20 18:18 xsd

Im logged in as hyperic ,and run a simple command :from the bin directory .

./hqapi.sh agent list

I get :
./hqapi.sh: line 8: java: command not found


Can anyone tell me whats wrong .. I recently upgraded from 4.1.0 to 4.1.1 Hyperic server ..
Do I have to download and extract again ir am I suppose to be able to use what I downloaded and extracted at 4.1.0 level???
0 Kudos
6 Replies
jvalkeal_hyperi

It means java is not is your system path. False configuration or java/jre is not installed. To install check this:
http://java.com/en/download/help/5000010500.xml

If you have agent on that machine installed, there might be jre already bundled. You could also use that.
hypermike
Contributor
Contributor

Thanks for replying!!... Since I issued this on the 4.1.1 Hyperic server from the Home directory
of Hyperic I thought it would jre would be in its path .. Since Im using the hyperic account and all to issue the commands . I extracted the api stuff into hyperic's home directory.. I see that the agent does have a java under the jre dir. BUT again I thought just extracting the api tar file would be enought to use it and run commands from the command line ...
0 Kudos
hypermike
Contributor
Contributor

well I did find the java in the agent directory but the command didnt work :

What Im trying to do is list all the names of remote Solaris systems agents (ruinning 3.2.1 and talking to this hyperic server . So I can get a list to upgrade them

Im running this command from the hyperic server xxxx.it.anl.gov. Since the api software is on this server but want to run a command to get answers to put in a file for upgrading .. What am I doing wrong ?

./hqapi.sh agent list -host xxxx.it.anl.gov -port 7443 -s -username xxxx -password yyyyy
Error running command: The server xxxx.it.anl.gov failed to respond with a valid HTTP response
0 Kudos
hypermike
Contributor
Contributor

I figured it out for some reason the command cant use 7443 so I changed th e port and the command came back!!!.

Thanks for your help!!!

Message was edited by: hypermike
0 Kudos
admin
Immortal
Immortal

In the future if you want to use SSL, you'll need to also pass the --secure flag to the shell.

-Ryan
hypermike
Contributor
Contributor

Can I just use -s and the same port 7080
Like:
/bin/hqapi.sh agent list -host xx.it.anl.gov -port 7080 -s

or do I have to use 7443 ??

when i substitute 7443 for 7080 I get a error:

fError running command: The server failed to respond with a valid HTTP response
0 Kudos