Solved

one port multiple instances

Posted on 2013-12-22
2
325 Views
Last Modified: 2013-12-22
I have 3 software which listen the one port


open(my $fh, '-|', 'sflowtool -4 -p 3601  | /scripts/DoSTargets') or die $!;
open(my $fh, '-|', 'sflowtool -4 -p 3601 -l ') or die $!;
sflowtool -p 3601 -l -4 -c 127.0.0.1 -d 9991 > /dev/null

Open in new window


How should i let them all work ?


The error :

v4 bind() failed, port = 3601 : Address already in use
unable to open UDP read socket

Open in new window

0
Comment
Question by:3XLcom
2 Comments
 
LVL 10

Accepted Solution

by:
acbxyz earned 500 total points
ID: 39735077
It is not possible to open one port multiple times.
You can bind multiple ip addresses to your host and bind all programs to one specific ip address.

Another option can be to add another program which bind to your port 3601 and open the three programs at different ports. This additional program can receive incoming data and forward it three times, one to each of your instances.
0
 

Author Closing Comment

by:3XLcom
ID: 39735094
binding to multiple ips correct solution
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is there a file descriptor created for logfile using by logmsg within Perl script 4 140
Perl for loop for 2000 ms 7 109
quoting a comma separated list 20 90
create a gui in perl 3 103
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question