Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

one port multiple instances

Posted on 2013-12-22
2
Medium Priority
?
328 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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

661 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