monotone

Issue 38: Can't start serve process: "Address family not supported by protocol"

Reported by Thomas Keller, Mar 5, 2006

(This entry was imported from the savannah tracker, original 
location: https://savannah.nongnu.org/bugs/index.php?16004)

I tried to start a monotone serve process and got the following:

$ monotone --debug --db=monotone/guitone.db serve 
'biz.thomaskeller.guitone'
monotone: started up on Linux 2.6.14-1.1637_9.rhfc4.cubbi_swsusp2 #1 
Fri Nov 25 17:06:18 CET 2005 i686
monotone: command line: 'monotone', '--debug', 
'--db=monotone/guitone.db', 'serve', 'biz.thomaskeller.guitone'
monotone: set locale: LC_ALL=C
monotone: initial abs path is: /home/tommyd
monotone: converting 8 bytes from ANSI_X3.4-1968 to UTF-8
monotone: converting 7 bytes from ANSI_X3.4-1968 to UTF-8
monotone: converting 24 bytes from ANSI_X3.4-1968 to UTF-8
monotone: converting 5 bytes from ANSI_X3.4-1968 to UTF-8
monotone: converting 24 bytes from ANSI_X3.4-1968 to UTF-8
monotone: initializing from directory /home/tommyd
monotone: searching for 'MT' directory with root '/'
monotone: 'MT' not found in '/home/tommyd' with '' removed
monotone: 'MT' not found in '/home' with 'tommyd' removed
monotone: search for 'MT' ended at '/' with 'home/tommyd' removed
monotone: '/MT' does not exist
monotone: opening rcfile '/home/tommyd/.monotone/monotonerc' ...
monotone: '/home/tommyd/.monotone/monotonerc' is ok
monotone: skipping nonexistent rcfile 'MT/monotonerc'
monotone: executing command 'serve'
monotone: read keypair data packet
monotone: Read key pair 'me@thomaskeller.biz' from key store.
monotone: loading lua hook persist_phrase_ok
monotone: lua: extracted bool = 1
monotone: loading lua hook persist_phrase_ok
monotone: lua: extracted bool = 1
monotone: loading lua hook persist_phrase_ok
monotone: lua: extracted bool = 1
monotone: loading lua hook persist_phrase_ok
monotone: lua: extracted bool = 1
monotone: base64-decoding 969-byte private key
monotone: loading lua hook persist_phrase_ok
monotone: lua: extracted bool = 1
monotone: loading lua hook get_passphrase
monotone: lua: extracted string = Dagobert
monotone: have 717-byte encrypted private key
monotone: produced 128-byte signature
monotone: loading lua hook persist_phrase_ok
monotone: lua: extracted bool = 1
monotone: building verifier for 162-byte pub key
monotone: checking 175-byte (128 decoded) signature
monotone: executing SQL 'SELECT sql FROM sqlite_master WHERE (type = 
'table' OR type = 'index') AND sql IS NOT NULL AND name not like 
'sqlite_stat%' ORDER BY name'
monotone: result: 0 (not an error)
monotone: prepared statement SELECT 1 FROM revisions LIMIT 1
monotone: binding 0 parameters for SELECT 1 FROM revisions LIMIT 1
monotone: prepared statement SELECT 1 FROM rosters LIMIT 1
monotone: binding 0 parameters for SELECT 1 FROM rosters LIMIT 1
monotone: checked_globish_to_regex: input = 
'biz.thomaskeller.guitone'
monotone: checked_globish_to_regex: output = 
'biz\.thomaskeller\.guitone'
monotone: statement cache statistics
monotone: prepared 2 statements
monotone: 1 executions of SELECT 1 FROM revisions LIMIT 1
monotone: 1 executions of SELECT 1 FROM rosters LIMIT 1
monotone: fatal: std::runtime_error: network error: failure from 
socket(2): Address family not supported by protocol
monotone:
monotone: this is almost certainly a bug in monotone.
monotone: please send this error message, the output of 'monotone 
--full-version',
monotone: and a description of what you were doing to 
monotone-devel@nongnu.org.
monotone: discarding debug log (maybe you want --debug or --dump?)


If I enter a user-defined address/port via --bind everything works 
fine.

monotone version:
-----------------
monotone 0.26pre2 (base revision: 
9ca37b918cb5309d8d3b0be000dc8a1151df262f)
Running on: Linux 2.6.14-1.1637_9.rhfc4.cubbi_swsusp2 #1 Fri Nov 25 
17:06:18 CET 2005 i686
Changes since base revision: unknown

  Generated from data cached in the distribution;
  further changes may have been made.

  Generated from data cached in the distribution;
  further changes may have been made.

  Generated from data cached in the distribution;
  further changes may have been made.

  Generated from data cached in the distribution;
  further changes may have been made.

  Generated from data cached in the distribution;
  further changes may have been made.

Comment 1 by Unknown User, Mar 6, 2006

Uh-oh, this bug was supposed to be fixed in 0.26pre2.  Are you 
certain you aren't accidentally use some earlier version for this?  
(Not very likely, I know.)

Comment 2 by Unknown User, Oct 12, 2006

Today I get analogic BUG with 0.30:

[root@carbon init.d]# LC_ALL=C /usr/sbin/monotone-server 
--confdir=/etc/monotone --db=/var/db/monotone/server.mtn 
--keydir=/etc/monotone/private-keys 
--rcfile=/etc/monotone/passphrase.lua serve '*'
monotone-server: fatal: std::runtime_error: network error: failure 
from socket(2): Address family not supported by protocol
monotone-server: this is almost certainly a bug in monotone.
monotone-server: please send this error message, the output of 
'monotone-server --full-version',
monotone-server: and a description of what you were doing to 
monotone-devel@nongnu.org.
monotone-server: wrote debugging log to /etc/monotone/dump
monotone-server: if reporting a bug, please include this file
[root@carbon init.d]# monotone-server --full-version
monotone 0.30 (base revision: unknown)
Running on          : Linux 2.6.16-std26-up-alt9 #1 Mon Jul 17 
02:38:34 MSD 2006 i686
C++ compiler        : GNU C++ version 3.4.5 20051201 (ALT Linux, 
build 3.4.5-alt6)
C++ standard library: GNU libstdc++ version 20051201
Boost version       : 1_33_1
Changes since base revision:
unknown

Comment 3 by Unknown User, Oct 12, 2006

I found a problem in nrex chunk:
address.cxx (130):
void Netxx::Address::add_all_addresses (port_type port)
{
    { // new scope just for safety
        SockAddr saddr(AF_INET, port);
        sockaddr_in *sai = 
reinterpret_cast<sockaddr_in*>(saddr.get_sa());
        sai->sin_addr.s_addr = htons(INADDR_ANY);
        addrs_.push_back(Peer("localhost", port, sai, 
saddr.get_sa_size()));
    }

    port_ = port;

# ifndef NETXX_NO_INET6
    if (ipv6_) {
        SockAddr saddr(AF_INET6, port);
        sockaddr_in6 *sai6 = 
reinterpret_cast<sockaddr_in6*>(saddr.get_sa());
        sai6->sin6_addr = in6addr_any;
        addrs_.push_back(Peer("localhost", port, sai6, 
saddr.get_sa_size()));
    }
# endif
}

There a problem in my build, because use_ipv6 is not false by 
default. I don't realy understand how must work compiler with 
explicit constructor and default parameter:

address.cxx (101):
explicit Address (bool use_ipv6=false);

Comment 4 by Thomas Keller, Jan 14, 2011

We probably still have horrid (read: buggy) IPv6 support, but this 
particular issue might have been fixed in the meantime, because it 
never popped up again.
Status: Fixed
Owner: ---

Created: 18 years 8 months ago by Thomas Keller

Updated: 13 years 10 months ago

Status: Fixed

Labels:
Type:Incorrect Behavior
Component:Networking
Priority:Medium

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status