1836413 Members
2301 Online
110100 Solutions
New Discussion

RPC bind fails

 
Seetha Lakshmi
Frequent Advisor

RPC bind fails

When i try to create a string binding to RPC with the following command

rpc_string_binding_compose(
(unsigned_char_t *)ObjectUUID,
(unsigned_char_t *)"ncacn_ip_tcp",
(unsigned_char_t *)HostName,
NULL,
NULL,
&binding_info,
&status);
the application hangs without any error messages. Any idea what could be the problem.
27 REPLIES 27
Ivajlo Yanakiev
Respected Contributor

Re: RPC bind fails

what is output from
#rpcinfo
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

iam sorry iam not able to give the output from rpcinfo. But the function was working when the OS was HP-UX 11.00 but failed when OS was upgraded to HP-UX 11.11.

Any where are we missing anything.
Ivajlo Yanakiev
Respected Contributor

Re: RPC bind fails

are there any error in your system log
or dmesg ?
or application log ?
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

when i say dmesg i get the following error message.

"Can't read kernel memory"

Where will the system log and application log be written. I don't see any error messages in our application's logfile.
Ivajlo Yanakiev
Respected Contributor

Re: RPC bind fails

dmesg problem is that you must be root ot read kernel.
log as root and try dmesg again

What is your last patch bundle ?
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

I dont have root permission.

What is a patch bundle
Ivajlo Yanakiev
Respected Contributor

Re: RPC bind fails

HP-UX patch bundles is collection of
OS fixes.

go ot that link:
http://www4.itrc.hp.com/service/patch/releaseIndexPage.do?BC=patch.breadcrumb.main|patch.breadcrumb.bundle|
and download lastest bundle for your HPUX OS
and install it.
Ivajlo Yanakiev
Respected Contributor

Re: RPC bind fails

ask your system admin to install patches
you need root for that :)
Ivajlo Yanakiev
Respected Contributor

Re: RPC bind fails

Do you use NFS ?
If NFS work RPC problably work fine
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

OOps what is NFS? How do i check that.
Ivajlo Yanakiev
Respected Contributor
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

I read that if any application references 64 bit library libdcekt then I should include the header file /usr/include/dce/dce64.h.

I checked my application it refers to libdcekt. But the header file /usr/include/dce/dce64.h is not included while making the executable. Is this creating the problem. Will the problem be rectified if I include the library /usr/include/dce/dce64.h. Is there any other solution to this problem.

Ivajlo Yanakiev
Respected Contributor

Re: RPC bind fails

You do not need to recompile your code.
HPUX 11.11 is same like 11.00 and all program runing over hpux 11.00 will run on 11.11.
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

But my application is not starting on HP-UX 11.11 while it is working fine on HP-UX 11.00
Andrew Cowan
Honored Contributor

Re: RPC bind fails

This looks to me to be a straight forward permissions problem. Try getting your administrator to run your commands as root and see what happens. Special files like "/dev/mem" and "/dev/kmem" can be made world-readable, the only problem then is that it allows users to examine other users data, and hence is a big security loophole.
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

I recently found using rpcinfo that the following two services are not available in the upgraded machine.

rstatd 100001
ypserv 100004

Does it indicate any problem with RPC
The output is as follows.

rpcinfo: RPC: Program not registered
program 100001 is not available

rpcinfo: RPC: Program not registered
program 100004 is not available
Andrew Cowan
Honored Contributor

Re: RPC bind fails

Have these deamons been enabled at boot time? Try looking in "/etc/inetd.conf" and "/etc/sysconfig.d". If their entries are commented-out or the variables set to 0, then they won't be enabled.

Remember to run: "inetd -c" to recycle inetd after making any changes.
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

Will the call to the function rpc_string_binding_compose fail if these deamons are not up.
Andrew Cowan
Honored Contributor

Re: RPC bind fails

I'm not a programmer but at the command-line level all processes will fail that attempt to bind to a socket that does not have a process attached, so I suppose the answer to your question is yes.
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

I checked for NFS it says
rpcinfo: RPC: Program not registered
program 100003 is not available

does it mean that RPC is not working fine
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

which program number do i have to check in rpcinfo to check if rpc is working fine
Andrew Cowan
Honored Contributor

Re: RPC bind fails

Sorry for the delay in replying but basically you don't seem to have NFS running at all, and likely therefore any RPC services. NFS is normally started at boot time by setting the NFS variables to 1 in "/etc/rc.config.d/nfsconf":

NFS_SERVER=1
NFS_CLIENT=1

and rebooting.
Seetha Lakshmi
Frequent Advisor

Re: RPC bind fails

thanks for your reply then which program number under rpcinfo should i check to make sure that rpc works fine.
Andrew Cowan
Honored Contributor

Re: RPC bind fails

Rpcinfo is normally an all or nothing type program. It either responds or it doesn't. If you get a response when issuing the command rpcinfo such as a list of programs and port-numbers, then its working. If you get "RPC Program not registered", then the service is unavailable.

A list of ports served by the portmapper daemon can be obtained from "/etc/rpc" and by grepping for rpc in /etc/inetd.conf.

I hope this answers your Seetha, however its a bit ambiguous?