Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am running server on one machine and client on another machine, when I execute the code then it shows "connect retuned rc= -1". With the same code when I runc client and server on same machine then it does not give wny problem.
Now that you said that... No... I think I'll waste my time else where thank you very much. All help here is volunteed, so don't tell us to address this problem as soon as possible, because it's not a problem that effects us.
P.S. you haven't actually said what your using, what scripts or whatever your using. You have given us no real information what so ever so what you think we can do to fix this for you, I have no frigging idea. In future be more careful with what you say and think about what we actually need to know to help you out.
Last edited by r3sistance; 11-15-2009 at 03:42 AM.
I am actually using Ubuntu to run the Linux client-server program.
I tried giving 192.168.1.144 as an IP telnet address to the client but it is still not getting connected.
Do you want me to put the code client server code here?
how to use perror instead of errno?
Last edited by hiteshshahk; 11-15-2009 at 05:01 PM.
OK, by specifying the ip-adderss we can rule out dns issues.
No need to post your code, it will be more or less OK as it works on a local machine.
Assuming your server is listening on port 5678, you should use telnet 192.168.1.144 5678. I guess that this (exact) command works on the server itself and does not work when used on a remote machine. Please post the error message that telnet gives.
I don't think that this is a code issue; check your firewall settings.
And you should modify your client code so it will give more detailed information (as said earlier by using errno, perror and similar functions) just like telnet does.
Last edited by Wim Sturkenboom; 11-15-2009 at 11:11 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.