General
cancel
Showing results for 
Search instead for 
Did you mean: 

unable to spawn jvm 1.5 from C executable(with HPUX privilege)

RSSrenivasan
Occasional Contributor

unable to spawn jvm 1.5 from C executable(with HPUX privilege)

Hi All,

I am trying to spawn a java(1.5) process from a C executable. The purpose of java process is to bind to a port which is less than 1023. I am running the C executable with NETPRIVPORT privilege as an ordinary user.
But, I am getting the error, "No owner" as shown in the attachment and unable to spawn the jvm. Later, I changed the owner of the C executable to root. Then, also, I am getting the same error.

secondly, I added the C executable as a privileged application using cmdprivadm. Then, also, I am getting autorization error.

I have included other relevant details in the attachment.

Can you please let me know the reason why we are not able to spawn the jvm when HPUX privileges are applied?

I am using HPUX B.11.31 U.

Thanks,

R Srinivasan
5 REPLIES
Steven E. Protter
Exalted Contributor

Re: unable to spawn jvm 1.5 from C executable(with HPUX privilege)

Shalom,

Please provide version number of jvm.

I would suspect this is a bug with jvm, nothing to do with HP-UX.

Standard practice:
Install a recent bi-annual HP-UX patch set.

Go to http://www.hp.com/go/java

Install the latest version of JVM.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
RSSrenivasan
Occasional Contributor

Re: unable to spawn jvm 1.5 from C executable(with HPUX privilege)

Steven,

The jvm version is 1.5

Thanks,

R Srinivasan
Dennis Handly
Acclaimed Contributor

Re: unable to spawn jvm 1.5 from C executable(with HPUX privilege)

Any reason you are invoking ksh instead of java directly?

You also need to repeat the executable twice for execl(2):
execl("/usr/bin/ksh", "/usr/bin/ksh", "-v" "-c", "java com.abc.def", NULL);
RSSrenivasan
Occasional Contributor

Re: unable to spawn jvm 1.5 from C executable(with HPUX privilege)

Dennis,

Thanks for the your information.

As of now, I am not sourcing any classpath setting. In future, I may need to do the same.

still, I am not able to spawn the java process and bind to port less than 1023.

Thanks,

R Srinivasan
Dennis Handly
Acclaimed Contributor

Re: unable to spawn jvm 1.5 from C executable(with HPUX privilege)

>I am not able to spawn the java process

Your tusc output says you aren't able to exec ksh, not java.