10-03-2001
C Prog to close a socket in established state
I have a SUN environment running an WebLogic that communicates w/a 3rd party running IIS. When the IIS site goes down (frequently), I am stuck with sockets in an ESTABLISHED state, and cannot seem to figure out how to avoid this. No exceptions are thrown as I can still open connections to the IIS site, but no data is returned.
What I would like to do is to determine from lsof -i tcp@host, the file descriptors, and then determine how long they have been in ESTABLISHED state, and then close them if they are older than say 1 hour.....
Any ideas????
As always- all help and assistance is greatly appreciated.
9 More Discussions You Might Find Interesting
1. HP-UX
Hello,
I'm currently having a problem with HPUX.
The application is a C app. It's a socket server.
It runs mostly fine, but under some circumstances (I can not replicate it), the app hangs and the CPU goes to 100%.
I have use gdb to attach to the app, and it was doing a close().
the... (0 Replies)
Discussion started by: arico
0 Replies
2. HP-UX
Hi all,
I have a HP-UX 11.23 that have a Server establishing connections on port 8888 .
The problem is that when i need to stop and restart the Server, the connections mantain the same state and i need to wait about 20-30 minutes before all connections finishes.
The connections remain at... (2 Replies)
Discussion started by: Renato Gregio
2 Replies
3. UNIX and Linux Applications
I have written a socker program. I have executed that program many times without closing the socket. So I want to find which all sockets binded with which file descriptor.
Is there any way to close those socket, which have been opened in that program's execution.
please help me!.. (3 Replies)
Discussion started by: pa.chidhambaram
3 Replies
4. Programming
Interesting issue. There was some discussion on the LKML last year regarding the potential problems in concurrent applications reusing file descriptors in various scenarios. The main issue is that the reuse of a file descriptor and reception of data in a threaded application can be confused pretty... (1 Reply)
Discussion started by: ramen_noodle
1 Replies
5. IP Networking
Is the last two line necessary?
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(void)
{
struct sockaddr_in stSockAddr;
... (0 Replies)
Discussion started by: vistastar
0 Replies
6. Solaris
Hi,
I am using solaris 10.
I have opened a socket connection using java in solaris 10 operating system, the port went to LISTEN state and able to create new socket connection and the new connections went to ESTABLISHED state.
If I issue the command "netstat -an | grep <<portnumber>>", I... (10 Replies)
Discussion started by: kumar3k
10 Replies
7. Debian
HI
Can anyone provide me with codes for file transfer server to client or vice versa?
Also please explain how to compile those programs in ubuntu terminal as i am totally new to socket programming.
Thanks (0 Replies)
Discussion started by: mayhemtrigger
0 Replies
8. AIX
Hi
The clients connect to my server -using port 9130. But no client could connect to my server at this time. I've checked already and this is the result
netstat -Aan|grep -v 127.0.0.1|grep 9130|pg
f10006000abcb398 tcp4 10313 0 10.0.89.81.9130 10.158.70.24.1705 CLOSE_WAIT... (8 Replies)
Discussion started by: bobochacha29
8 Replies
9. UNIX for Advanced & Expert Users
Good morning, I need your help please
After Restarting Aps or connection, these are connections
tcp 0 0 10.80.1.26.57597 10.81.248.79.53008 ESTABLISHED
tcp 0 47 10.80.1.26.57607 10.81.248.79.53008 ESTABLISHED
tcp 0 0 ... (4 Replies)
Discussion started by: alexcol
4 Replies
vxsited(1M) vxsited(1M)
NAME
vxsited - site monitoring daemon
SYNOPSIS
/etc/vx/bin/vxsited [mail_address...]
DESCRIPTION
The vxsited daemon monitors Veritas Volume Manager (VxVM) for disks being attached, and reattaches a detached site if the disks that belong
to that site become accessible.
vxsited analyzes the output of the vxnotify command, and waits for a failed disk to attach. When a disk is attached, vxsited attempts to
online the disk, and tries to reattach the failed site. If a site is successfully reattached, vxsited starts recovery using vxrecover, and
sends mail to root (by default) or to other specified users.
Mail Notification
By default, vxsited sends mail to root with information about the disk status of any attempts to reattach the site. To send mail to other
users, add the user login name to the line that starts vxsited in the startup script, /etc/init.d/vxvm-recover, and reboot the system. For
example, if the line appears as:
nohup vxsited root &
and you want mail also to be sent to user1 and user2, change the line to read:
nohup vxsited root user1 user2 &
Alternatively, kill the vxsite process, and restart it from the command line with the required mail addresses as arguments.
The mail notification has a format that is similar to the following:
Subject : Volume Manager site reattach on host hostname
Reattached site sitename in disk-group diskgroup
Reattachment Procedure
If a disk from a detached site becomes accessible again, vxsited checks whether the relocation daemon, vxrelocd, is running. If vxrelocd
is running, vxsited attempts to reattach the site. The relocation daemon can then try to relocate the failed subdisks using space on the
available disks in the disk group. If the failed objects are successfully relocated, vxrelocd changes the state of the site to RECOVER,
and starts the recovery of volumes at the site. When all the plexes at a site have been recovered, the plexes are put into the ACTIVE
state, and the state of the site is set to ACTIVE.
If vxrelocd is not running, vxsited only reattaches a site when all the disks from that site become accessible. After successfully reat-
taching a site, vxsited changes the site state to ACTIVE, and initiates recovery using vxrecover. When all the plexes from a site have been
recovered, the plexes are put into the ACTIVE state, and the state of the site is set to ACTIVE.
vxsited does not attempt to reattach a site that has been explicitly detached by an administrator. The state OFFLINE is set for sites that
have been detached by using the following command:
vxdg -g dg_name detachsite sitename
Disabling vxsited
If you do not want a site to be recovered automatically, kill the vxsited daemon, and prevent it from restarting. To kill the daemon, run
the following command from the command line, and locate the process table entry for vxsited:
ps -ef
Execute the command:
kill -9 PID
Substitute the process ID of the vxsited process for PID. To prevent vxsited from being restarted, comment out the line that starts
vxsited in the startup script /sbin/init.d/vxvm-recover.
FILES
/sbin/init.d/vxvm-recover The startup file for vxsited.
SEE ALSO
kill(1), mailx(1), ps(1), vxdg(1M), vxrelocd(1M), vxintro(1M), vxnotify(1M), vxrecover(1M)
VxVM 5.0.31.1 24 Mar 2008 vxsited(1M)