Sponsored Content
Full Discussion: rexec() function problem
Top Forums Programming rexec() function problem Post 12857 by lcmoreno on Tuesday 8th of January 2002 08:19:06 AM
Old 01-08-2002
MySQL

Hi Shaik,

Thanks for testing the code... I found out what is going wrong, but I didn't understand why.

When you said it worked there I tought "he must be kidding" Smilie, because the server I wrote in SERVER_NAME parameter was right and it was in /etc/hosts file. But to make sure I was doing the right think, I added a line in the code to print the servername before calling rexec and then for my surprise I discovered what was happening.

In the first time the server was right, the one in SERVER_NAME constant, the second time the server was diferent, it was another alias name for the same IP in the /etc/hosts, but at the third time and from there on, the servername was an alias for a different IP, so that's why it never connected again, even after I changed the password.

But I didn't understand why it is getting this servername for another IP address.

Here is a piece of my /etc/hosts.

xxx.xxx.0.1 localhost
xxx.xxx.2.20 vicunha1
xxx.xxx.72.21 sscxwin1
xxx.xxx.72.22 sscsp02
xxx.xxx.72.9 sscsp11
xxx.xxx.2.24 bscs
xxx.xxx.16.34 uatr1dfr
xxx.xxx.2.56 sdrdig14
xxx.xxx.2.56 vicunha14
xxx.xxx.72.25 sscsp05.ac.com sscsp05 #System name
xxx.xxx.72.92 AC7932CY570122


I was trying to connnect to the server "sscsp05", so at the first time it pszInitiatorIpAddress was pointing to this string, the second time it has "sscsp05.ac.com" and at a third time it has "sscxwin1", a different IP address.

I tested it trying to connect to server "sscsp02", and the same thing happened, but at the second time it already got "sscsxwin1".

So, to solve this, everytime I set pszInitiatorIpAddress to point to szInititatorIpAddress again. I also tested using 10 threads, and all of them connected successfully.

Do you have any idea why rexec is getting other server names in /etc/hosts?? I looked at the man page and it doesn't say anything about getting other servernames dinamically.



Thank you.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

expect (re: rexec)

In http://forums.unix.com/showthread.php?threadid=391 there is one statement called expect. but when I issue command whereis expect, respond from o/s only EXPECT: (only one world). I try to find it at /usr/bin, no expect statement there ? is it default unix o/s command ? I am using AIX on... (1 Reply)
Discussion started by: yatno
1 Replies

2. UNIX for Dummies Questions & Answers

Enabling Rexec ????

Can someone tell me how I would enable Rexec on a UNIX machine? And is the procedure different on the different systems - Solaris, HP-UX -etc. Thanks~!! mike (1 Reply)
Discussion started by: raichuu
1 Replies

3. Solaris

Rexec

How is rexec enabled on a Solaris 8? How can I check if rexec is installed? (1 Reply)
Discussion started by: pmj1970
1 Replies

4. UNIX for Advanced & Expert Users

reagrding REXEC command

Hi UNIX gurus..... have a doubt..can i run a script in a remote machine by using something like rexec add.corp.afg.com /aa/ss/remtescript I dont want to use the rsh command due to some security issues. thanx, rahul26 :) (2 Replies)
Discussion started by: rahul26
2 Replies

5. Shell Programming and Scripting

How can I do a rexec to execute un C exe ?

Hello, I would like to do a rexec to execute a C exe (prog.e) : rexec -l user -p password host prog.e When I execute this command, I have this error : prog.e : can not find lib.o But, When I execute prog.e directly in the remote machine : well done ! No error output. Thks for your... (4 Replies)
Discussion started by: Lika
4 Replies

6. UNIX for Advanced & Expert Users

Remote commands problem using RSH & Rexec

I have enabled the RSH and Rexec command in my HP-UX server but when i try to send any command to the server it returns Execute Permission Denied except commands like ls-l C:\rsh xxx.xxx.xxx.xxx -l mpac mxpkill 12 the mxpkill command work when I log to the server using telnet with the same... (0 Replies)
Discussion started by: fhuwaidy
0 Replies

7. UNIX for Dummies Questions & Answers

exit codes from rexec?

how do i/is there a way to return the exit code from the remote host? echo $? from the local host only gives 0, if the rexec command itself executes successfully. But what if in the case of the remote command failiing? echo $? on the localhost still gives 0, but I'm interested in the exit code... (4 Replies)
Discussion started by: diego_sapphire
4 Replies

8. AIX

rexec - other options?

Rexec executes commands one at a time on a remote host. The rexec command provides an automatic login feature by checking for a $HOME/.netrc file. User and password are stored in $HOME/.netrc. I would like to log on to another host and execute a script/command but not using $HOME/.netrc file,... (4 Replies)
Discussion started by: ioniCoder
4 Replies

9. UNIX for Advanced & Expert Users

Rexec Issue

Hi Team, I am executing some ksh scripts which inturn calls java files in AIX Environment. We have installed java6_64 which is in .profile. But when we execute from rexec its taking path from some different place that does not have java in $PATH variable. Can you please help me find out which... (2 Replies)
Discussion started by: balasubramani04
2 Replies

10. Red Hat

Slow login with rexec.

Hi all, I´m replacing an old linux enterprise redhat 4.5 by a new one linux enterprise redhat 6. In both I use rexec as a communication between the front end and the user. In the old one, when the user connects, the communication establishes quickly (less than 3 sec). But in the new one, the... (1 Reply)
Discussion started by: mig28mx
1 Replies
face(1) 							   User Commands							   face(1)

NAME
face - executable for the Framed Access Command Environment Interface SYNOPSIS
face [-i init_file] [-c command_file] [-a alias_file] [filename...] DESCRIPTION
The Framed Access Command Environment Interface (FACE) presents your files and file folders on the screen through a system of menus and forms if you are properly set up as a FACE user. filename must follow the naming convention Menu.xxx for a menu, Form.xxx for a form, and Text.xxx for a text file, where xxx is any string that conforms to the UNIX system file naming conventions. The Form and Menu Language Interpreter (FMLI) descriptor lifetime will be ignored for all frames opened by argument to face. These frames have a lifetime of immortal by default. If filename is not specified on the command line, the FACE Menu will be opened along with those objects specified by the LOGINWIN environment variables. These variables are found in the user's .environ file. OPTIONS
The following options are supported: -a alias_file Alias file -c command_file Command file -i init_file Initial file OPERANDS
The following operand is supported: filename The full pathname of the file describing the object to be opened initially. EXIT STATUS
The face command will return a non-zero exit value if the user is not properly set up as a FACE user. FILES
$HOME/pref/.environ ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWfac | +-----------------------------+-----------------------------+ SEE ALSO
env(1), attributes(5) SunOS 5.10 5 Jul 1990 face(1)
All times are GMT -4. The time now is 10:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy