Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

one port multiple instances

Posted on 2013-12-22
2
Medium Priority
?
329 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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.…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Six Sigma Control Plans

916 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