Sponsored Content
Full Discussion: Bind failure
Top Forums UNIX for Advanced & Expert Users Bind failure Post 302159876 by zing_foru on Saturday 19th of January 2008 03:04:34 AM
Old 01-19-2008
Bind failure

Hi all,

I am using Perl program to do socket communication. My application has to use port 40001 this is a condition I can't change the port.

The execution of this script always gave an error 'Bind failure port already in use'

netstat execution gives below line:
udp 0 0 *.40001 *.*

What this line indicates. I think due this port engagement bind fails. To fix this issue I used port reuse option as below before bind but still bind gives the same error:

setsockopt($serv_sock, IPPROTO_UDP, SO_REUSEADDR, pack("l", 1)) || die "setsockopt: $!";

How can I disengage the port binding?
Please help me in this regard...

Thanks...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how do redirect in bind

Hello all! Does anyone know how to redirect i link to a host or alias name? Here is the example: i wank to type "Bob" in my browser and be redirected to http://192.168.54.37:7001/Bob/BobMainServlet on that perticular port. Im using Redhat 6.2 with bind 9.2.3 regards... dOzY (4 Replies)
Discussion started by: dozy
4 Replies

2. Programming

GetLastError API for socket/bind failure in VxWorks 5.4

Can anyone tell what is the system API for VxWorks which is used to find GetLastError() for socket/bind failure. I need to use it in some VxWorks application and need to call GetLastError but I'm not sure about the correct API. Thanks in advance (1 Reply)
Discussion started by: anilgurwara
1 Replies

3. UNIX for Advanced & Expert Users

DNS Bind

Hello, I have a question about dns file zone. Every zone file begins like: @ 86400 IN SOA ns1.website.com. admin@website.com. ( It means that name server ns1 is responsible for this zone. At the ending I can add the records like mysite.com IN A 1.2.3.4 So it will... (2 Replies)
Discussion started by: mirusnet
2 Replies

4. Solaris

bind error

Hi, When I use the ldapadd command I get this error. ldap_simple_bind: Conidentiality required ldap_simple_bind: additional info: confidentiality required I was able to use this command and the ldapsearch command yesterday just fine. I think I may have made a change to a file, but I don't... (2 Replies)
Discussion started by: bitlord
2 Replies

5. Red Hat

BIND configuration

I have problems with a simple BIND configuration in CentOS. I have a static public IP 1.1.1.1 and I recently bought a domain name gigi.com. I just want that gigi.com points to 1.1.1.1 (Apache Web Server). This is how my named.conf file looks: options { directory "/var/named"; }; ... (0 Replies)
Discussion started by: pasadia
0 Replies

6. UNIX for Dummies Questions & Answers

boot up failure unix sco after power failure

hi power went out. next day unix sco wont boot up error code 303. any help appreciated as we are clueless. (11 Replies)
Discussion started by: fredthayer
11 Replies

7. Red Hat

Bind 9.9.2 not working

Hello friends Internet query not working anymore with bind , i am not using forwarder dns server . 1. resolv.conf file => search local.server nameserver 127.0.0.1 2. named.conf file => // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS... (8 Replies)
Discussion started by: rink
8 Replies

8. UNIX for Dummies Questions & Answers

Configure BIND

I know how to manage DNS once it's installed. I can edit named.conf and create zone files. I can sign the zones, use TSIG, etc. How do I take the BIND 9.9 tar ball from All Downloads | Internet Systems Consortium and install it and get it to work? Maybe I am not getting it. Can... (0 Replies)
Discussion started by: brianjb
0 Replies

9. UNIX for Dummies Questions & Answers

Can't bind to IP

When you get the message can't bind to ip already in use. is there a command to search to see everything that is using that IP? I've already check the host and hostname files (2 Replies)
Discussion started by: mchelle_99
2 Replies

10. UNIX for Advanced & Expert Users

Bind

Hi All I need to do bind of exiting filesystem to new storage allocated mount --bind /prod/OpenCSS /var/lib/test echo "/prod/OpenCSS /var/lib/pgsql bind bind 0 0" >> /etc/fstab will this command just work ? (2 Replies)
Discussion started by: anil529
2 Replies
Net::Daemon::Test(3)					User Contributed Perl Documentation				      Net::Daemon::Test(3)

NAME
Net::Daemon::Test - support functions for testing Net::Daemon servers SYNOPSIS
# This is the server, stored in the file "servertask". # # Create a subclass of Net::Daemon::Test, which in turn is # a subclass of Net::Daemon use Net::Daemon::Test (); package MyDaemon; @MyDaemon::ISA = qw(Net::Daemon::Test); sub Run { # Overwrite this and other methods, as you like. } my $self = Net::Daemon->new(\%attr, @options); eval { $self->Bind() }; if ($@) { die "Server cannot bind: $!"; } eval { $self->Run() }; if ($@) { die "Unexpected server termination: $@"; } # This is the client, the real test script, note we call the # "servertask" file below: # # Call the Child method to spawn a child. Don't forget to use # the timeout option. use Net::Daemon::Test (); my($handle, $port) = eval { Net::Daemon::Test->Child(5, # Number of subtests 'servertask', '--timeout', '20') }; if ($@) { print "not ok 1 $@ "; exit 0; } print "ok 1 "; # Real tests following here ... # Terminate the server $handle->Terminate(); DESCRIPTION
This module is a frame for creating test scripts of Net::Daemon based server packages, preferrably using Test::Harness, but that's your choice. A test consists of two parts: The client part and the server part. The test is executed by the child part which invokes the server part, by spawning a child process and invoking an external Perl script. (Of course we woultn't need this external file with fork(), but that's the best possibility to make the test scripts portable to Windows without requiring threads in the test script.) The server part is a usual Net::Daemon application, for example a script like dbiproxy. The only difference is that it derives from Net::Daemon::Test and not from Net::Daemon, the main difference is that the Bind method attempts to allocate a port automatically. Once a port is allocated, the number is stored in the file "ndtest.prt". After spawning the server process, the child will wait ten seconds (hopefully sufficient) for the creation of ndtest.prt. AVAILABLE METHODS
Server part Options Adds an option --timeout to Net::Daemon: The server's Run method will die after at most 20 seconds. Bind (Instance method) This is mainly the default Bind method, but it attempts to find and allocate a free port in two ways: First of all, it tries to call Bind with port 0, most systems will automatically choose a port in that case. If that seems to fail, ports 30000-30049 are tried. We hope, one of these will succeed. :-) Run (Instance method) Overwrites the Net::Daemon's method by adding a timeout. sub Run ($) { my $self = shift; $self->Run(); } Client part Child (Class method) Attempts to spawn a server process. The server process is expected to create the file 'ndtest.prt' with the port number. The method returns a process handle and a port number. The process handle offers a method Terminate that may later be used to stop the server process. AUTHOR AND COPYRIGHT
Net::Daemon is Copyright (C) 1998, Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Phone: +49 7123 14887 Email: joe@ispsoft.de All rights reserved. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. SEE ALSO
Net::Daemon(3), Test::Harness(3) perl v5.12.1 2007-05-23 Net::Daemon::Test(3)
All times are GMT -4. The time now is 05:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy