Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlnet: EAFNOSUPPORT on Max OSX
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: ocamlnet: EAFNOSUPPORT on Max OSX
Gerd,

Netplex reports EAFNOSUPPORT when starting up on Mac OSX which means  
"Address family not supported by protocol family".

The issue is that in netplex_controller.ml/start_containers you are  
doing

       let (fd_clnt, fd_srv) =
	Unix.socketpair Unix.PF_UNIX Unix.SOCK_STREAM 0 in
       let (sys_fd_clnt, sys_fd_srv) =
	Unix.socketpair Unix.PF_UNIX Unix.SOCK_STREAM 0 in

i.e. creating Unix Domain sockets.

Later on in rpc_transport.ml/stream_rpc_multiplex_controller you are  
doing

     `Sockaddr(Unix.getsockname fd)

which passes, and

     `Sockaddr(Unix.getpeername fd)

which fails with EAFNOSUPPORT.

A Ruby test, on the other hand, ran without a hitch:

irb(main):001:0> require 'socket'
=> true

irb(main):002:0> x = Socket.pair Socket::PF_UNIX, Socket::SOCK_STREAM, 0
=> [#<Socket:0x7daa4>, #<Socket:0x7dab8>]

irb(main):003:0> x.each { |sock| sock.getpeername }
=> [#<Socket:0x7daa4>, #<Socket:0x7dab8>]

	Thanks, Joel

--
http://wagerlabs.com/