Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

protocol family unavailable

Thread view: 
robby - 03 Oct 2007 13:28 GMT
I am using a generic tcp connect on hpux 11i with an ipv6 address.
I am able to make the connection with an ipv4 address.

host_addr = InetAddress.getByName(host);
host_sock_addr = new InetSocketAddress(host_addr, port);
       try
       {
           socket = new Socket();
       }
       catch (SocketException e)
       {
          //error
       }

       try
       {
           socket.connect(host_sock_addr, 1000);
       }
       catch (SocketException e)
       {
          System.out.println(" err "+e.toString() + "  "
+Err.SOCKET_CONNECT_ERR );
           return retval;
       }

output:
java.net.SocketException: Protocol family unavailable  56
Gordon Beaton - 03 Oct 2007 13:45 GMT
> I am using a generic tcp connect on hpux 11i with an ipv6 address.
> I am able to make the connection with an ipv4 address.
[...]
> java.net.SocketException: Protocol family unavailable  56

Do you have a question or are you just in the sharing mood?

Is IPv6 installed and enabled on your system?

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1306AA
(http://tinyurl.com/2j8wdn)

/gordon

--
robby - 08 Oct 2007 19:05 GMT
> > I am using a generic tcp connect on hpux 11i with an ipv6 address.
> > I am able to make the connection with an ipv4 address.
[quoted text clipped - 4 lines]
>
> Is IPv6 installed and enabled on your system?

My question would have been 'why am I getting this error?'
I do have dual stack for ipv6 and ipv4, so yes ipv6 is installed.
I used the preferIPv4Stack="false" flag and it appears to have fix the
problem,
but I have not fully tested it on my ipv4 box where I don't use ipv6
at all.
Thanks.
Roedy Green - 04 Oct 2007 03:13 GMT
>host_addr = InetAddress.getByName(host);
>host_sock_addr = new InetSocketAddress(host_addr, port);

please dump out host and host_addr.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.