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?
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
0
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
0
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?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy 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

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

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
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.