1833420 Members
3039 Online
110052 Solutions
New Discussion

Re: problem with NIS

 
Satya_6
Frequent Advisor

problem with NIS

Hi,

Got an application (compiled and linked using aCC B3910B A.03.30). The application uses flexlm to handle the licensing. (flexlm libs are linked with the application). The application is based on X-windows and motif, and on invoking it comes with a GUI, but on client's machines we are facing a strange problem. The GUI doesn't come up at all. it just hangs. It works fine if we disable the NIS option in the system.

Please suggest a way out

TIA
satya
3 REPLIES 3
Zeev Schultz
Honored Contributor

Re: problem with NIS

Get a copy of tusc (trace utility) from
hpux.cs.utah.edu , run it on your application
in both cases with -vpf flags.See what system
call has the error (can be gethostbyname() for
example or else).By disabling NIS option you mean "hosts: NIS" line in /etc/nsswitch.conf or
stopping NIS (ypbind) client?If nsswitch.conf, just add "hosts: files nis".Can also be that you application is trying to contact localhost
which is defined in the /etc/hosts but obviously not in NIS hosts map?

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Satya_6
Frequent Advisor

Re: problem with NIS

I have used the tusc utility and am not able to make much out of it. It looks like it is failing on a bind on some socket. It just fails with an error saying EADDRINUSE, for the address given as
sin_family: AF_INET
sin_port: 49381
sin_addr.s_addr: 127.0.0.1

socket is opened using socket(AF_INET, SOCK_DGRAM, 0) and bind on that is failing as said above. this scoket and bind calls repeat all the way.

Also I find the command open("/var/yp/binding/Corn.2", O_RDONLY, 01) and lockf on the descriptor a couple of times in the logfile (the lockf fails with an error EBADF). I don't find this on a machine with no NIS.
Also on a m/c with no NIS enabled, I find the socket opened with "socket(AF_UNIX, SOCK_DGRAM, 0) and bind goes through fine on that socket.

hope this would help you in suggesting a solution.

Also the NIS client is disabled from SAM.

In the SAM window, "Networking and Communications" -> "NIS" -> "Disable Client"

Looks like the XtOpenDisplay is causing the problem. (NULL is sent for the display name)

TIA
satya
Elmar P. Kolkman
Honored Contributor

Re: problem with NIS

The message it gives with tusc mentions it cannot open a socket to localhost.

Are the users able to start other X-applications with NIS enabled? If they are, then your problem is indeed with the application. Also, do you get more info out of tusc at the moment of the failure, like the routine that is calling the socket system call? That might give some info on what it is trying to do. For instance, is the socket call used to connect to NIS or to another service?

Hope your answer can help solve your issue.
Every problem has at least one solution. Only some solutions are harder to find.