Bind failed. Error Code : -2 Message Name or service not known

Hi

I'm trying to use a Python script from Git here

Its purpose is to respond to monitoring packets sent from PRTG Network Monitor

So I downloaded it and chmoded it and executed it (-d) on the client's Debian system :

Linux xxxxxxxxx 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux

and obtain the following error :

Bind failed. Error Code : -2 Message Name or service not known

The error apparently appears when the bind action attempts to
bind port 50000 to all devices

Is this a Debian, or system issue or a permissions issue ?

thanks
yann
Yann ShukorOwnerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gelonidaCommented:
Just a blind guess:


try to change
argparser.add_argument('-t', '--replyport', help='Provide the port the packets should be bounced to')

Open in new window

to
argparser.add_argument('-t', '--replyport', help='Provide the port the packets should be bounced to')

Open in new window



If this doesn't work, then tell me please with which exact arguments you call the script
Yann ShukorOwnerAuthor Commented:
Hi

Thanks for your reply

I may be mistaken but both lines seem identical

yann

NB
As suggested by PRTG
this is the contents of my qosreflect.conf :
host:All
port:50000
replyip:None
gelonidaCommented:
argh, my fault:


the new line should have been:
argparser.add_argument('-t', '--replyport', type=int,  help='Provide the port the packets should be bounced to')

Open in new window


"type=int" being added.


What I suggest as well is to add one print statement after line 91:
print("PORT is %r" % PORT)

What is the poutput of this  print statement?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Yann ShukorOwnerAuthor Commented:
I added a second PRINT to reveal HOST aswell:

xxxxxxxxxx:~$ ./qosreflect.py -d -p 50000 -o eth0 -r None
{'replyip': 'None', 'host': 'eth0', 'port': '50000'}
Read config done
Socket created
PORT is 50000
HOST is 'eth0'
Bind failed. Error Code : -2 Message Name or service not known

Open in new window

Yann ShukorOwnerAuthor Commented:
I figured it out : HOST is supposed to be the network interface's IP address

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Yann ShukorOwnerAuthor Commented:
solved
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.