Visit Our UNIX and Linux User Community

duplicate connection error

Thread Tools Search this Thread
Special Forums IP Networking duplicate connection error
# 1  
Old 07-25-2009
duplicate connection error

Hello All,
I have one multithreaded server program.Due to fluctuating network, my client is getting disconnected, and after some time i received the new connection from same client, which gets treated as duplicate connection for my server. I have kept my tcp keep alive timer is 10 sec.

Can some one guide me, how can i handle this case? What concept i should use from socket programming for it? I tried shutdown and then close for closing the socket, unfortunately that didn't work.


Previous Thread | Next Thread
Test Your Knowledge in Computers #333
Difficulty: Easy
Linux was first developed as an alternative to Windows XP.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

weblogic connection timeout error

i am facing an issue that the server give a connection timeout after 60 sec for any request more than that number . i tried to increase the TCP INTERVAL TIMEOUT from the default 60000 ms to more higher number. the server seems to work fine and didn't give me the massage of the timeout but the... (0 Replies)
Discussion started by: core99
0 Replies

2. Shell Programming and Scripting

Find duplicate based on 'n' fields and mark the duplicate as 'D'

Hi, In a file, I have to mark duplicate records as 'D' and the latest record alone as 'C'. In the below file, I have to identify if duplicate records are there or not based on Man_ID, Man_DT, Ship_ID and I have to mark the record with latest Ship_DT as "C" and other as "D" (I have to create... (7 Replies)
Discussion started by: machomaddy
7 Replies

3. Shell Programming and Scripting

Perl Oracle connection error

I've a Centralized Server which can connect to all Oracle Databases. When I was trying the below code it doesn't work, But tnsping was working fine. #!D:/perl5/bin/perl.exe use DBI; my $dbh = DBI->connect('dbi:Oracle:QBDIWCE', 'IDUSER', 'SECRET123#' ) || die( $DBI::errstr . "\n" ) ; ... (1 Reply)
Discussion started by: ilugopal
1 Replies

4. Shell Programming and Scripting

Connection error.

Hi All. I have a script, in which its throwing me error like /data/ds/dpr_ebicm_uat//etl/cm3_0/entities/BBME/parameters/cm_file_util.plg: line 7: export: `exist.=SQL1024N A database connection does not exist. SQLSTATE=08003': not a valid identifier whereas i have already made a... (4 Replies)
Discussion started by: vee_789
4 Replies

5. UNIX for Dummies Questions & Answers

SFTP Connection error

Hi I when I trying to SFTP a file to a server I am getting this below error: Connecting to 3.12.911.100... ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory Host key verification failed. Connection closed Can you please help me in debugging this error. ... (3 Replies)
Discussion started by: krishna87
3 Replies

6. UNIX for Dummies Questions & Answers

winscp error: Network error connection timed out

Hi all, I am trying to winscp to RHEL5 server and i am ending up with following error. Network error:connection timed out The system is up and running but not able to winscp. Tried SFTP,SCP and FTP protocols in winscp but none worked. I can ssh into this server from another server... (3 Replies)
Discussion started by: lramsb4u
3 Replies

7. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

8. Web Development

MySQL Replication Issues: Duplicate Key Error

Lately my attention has been focused on distributed MySQL database replication to other web servers. All was going well, but then I noticed the replication would stop and there were there "Duplicate Primary Key" errors in SHOW SLAVE STATUS; I started to trace these down and noticed that this... (2 Replies)
Discussion started by: Neo
2 Replies

9. UNIX for Advanced & Expert Users

ssh connection error

I am trying to get my CVS client to connect to the repository over ssh. ssh works - I can quite happily log on but when I use the client - which incidentally is eclipse 2.1.3 on Windows using plink/puTTY as an external connection method - I get the following error in /var/log/secure: error:... (2 Replies)
Discussion started by: Jdogg
2 Replies

10. UNIX for Dummies Questions & Answers

no shell connection closed error

Hi, I have created some users on my new enviroment on sun solaris in the aptempt to create a .profile which I did. I must have done something wrong because when I try to connect to one of this users it says:no shell, connection closed. The only thing I can think is that in my .profile I inserted... (2 Replies)
Discussion started by: giulianob
2 Replies
Server::Client(3pm)					User Contributed Perl Documentation				       Server::Client(3pm)

Net::SMTP::Server::Client - Client session handling for Net::SMTP::Server. SYNOPSIS
use Carp; use Net::SMTP::Server; use Net::SMTP::Server::Client; use Net::SMTP::Server::Relay; $server = new Net::SMTP::Server('localhost', 25) || croak("Unable to handle client connection: $! "); while($conn = $server->accept()) { # We can perform all sorts of checks here for spammers, ACLs, # and other useful stuff to check on a connection. # Handle the client's connection and spawn off a new parser. # This can/should be a fork() or a new thread, # but for simplicity... my $client = new Net::SMTP::Server::Client($conn) || croak("Unable to handle client connection: $! "); # Process the client. This command will block until # the connecting client completes the SMTP transaction. $client->process || next; # In this simple server, we're just relaying everything # to a server. If a real server were implemented, you # could save email to a file, or perform various other # actions on it here. my $relay = new Net::SMTP::Server::Relay($client->{FROM}, $client->{TO}, $client->{MSG}); } DESCRIPTION
The Net::SMTP::Server::Client module implements all the session handling required for a Net::SMTP::Server::Client connection. The above example demonstrates how to use Net::SMTP::Server::Client with Net::SMTP::Server to handle SMTP connections. $client = new Net::SMTP::Server::Client($conn) Net::SMTP::Server::Client accepts one argument that must be a handle to a connection that will be used for communication. Once you have a new client session, simply call: $client->process This processes an SMTP transaction. THIS MAY APPEAR TO HANG -- ESPECIALLY IF THERE IS A LARGE AMOUNT OF DATA BEING SENT. Once this method returns, the server will have processed an entire SMTP transaction, and is ready to continue. Once $client->process returns, various fields have been filled in. Those are: $client->{TO} -- This is an array containing the intended recipients for this message. There may be multiple recipients for any given message. $client->{FROM} -- This is the sender of the given message. $client->{MSG} -- The actual message data. :) AUTHOR AND COPYRIGHT Net::SMTP::Server / SMTP::Server is Copyright(C) 1999, MacGyver (aka Habeeb J. Dihu) <>. ALL RIGHTS RESERVED. You may distribute this package under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Net::SMTP::Server::Server, Net::SMTP::Server::Relay perl v5.10.1 1999-12-28 Server::Client(3pm)

Featured Tech Videos