Hi.
It looks like you grabbed a bad state of the source. Please checkout a fresh version and try again.
Johannes
Am Donnerstag, den 01.11.2012, 14:36 +0000 schrieb 고석갑:
Hello.
I downloaded ibrdtn source code using SVN. I am using Ubuntu-10.04.4 64bit. Because of compile error, I added ‘#include “Configuration.h”’ into BundleCore.cpp. Afterthat, I got successful compile. However, When I run ibrdtn with default configuration (no touched ibrdtnd.conf from SVN), I get 'ibrcommon::socket_exception’ error.
softgear@softgear-cube02:~/dtn/ibrdtn-svn$ dtnd -c ibrdtnd.conf -d 1000 Thu Nov 1 23:07:32 2012 INFO: Configuration: ibrdtnd.conf Thu Nov 1 23:07:32 2012 INFO: IBR-DTN daemon 0.8.0 (build 59560) Thu Nov 1 23:07:32 2012 INFO: debug level set to 1000 Thu Nov 1 23:07:32 2012 INFO: use logfile for output: /var/log/ibrdtn/ibrdtn.log Thu Nov 1 23:07:32 2012 INFO: Local node name: dtn://softgear-cube02 Thu Nov 1 23:07:32 2012 INFO: using bundle storage in memory-only mode Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: DOWN -> SAFE_DOWN Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: SAFE_DOWN -> DOWN Thu Nov 1 23:07:32 2012 INFO: DiscoveryAgent: listen to [224.0.0.1]:4551 Thu Nov 1 23:07:32 2012 INFO: StandByManager: IPNDAgent adopted Thu Nov 1 23:07:32 2012 INFO: Using default routing extensions Thu Nov 1 23:07:32 2012 INFO: Forwarding of bundles enabled. Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: DOWN -> SAFE_DOWN Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: SAFE_DOWN -> DOWN Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: DOWN -> SAFE_DOWN Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: SAFE_DOWN -> DOWN Thu Nov 1 23:07:32 2012 INFO: API initialized using tcp socket: lo:4550 Thu Nov 1 23:07:32 2012 DEBUG.20: Initialize component StandByManager Thu Nov 1 23:07:32 2012 DEBUG.20: Initialize component MemoryBundleStorage Thu Nov 1 23:07:32 2012 DEBUG.20: Initialize component IPNDAgent Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: DOWN -> PENDING_UP Thu Nov 1 23:07:32 2012 DEBUG.66: SocketState transition: PENDING_UP -> DOWN terminate called after throwing an instance of 'ibrcommon::socket_exception' what(): failed to getaddrinfo with address: <any>:4551 Aborted softgear@softgear-cube02:~/dtn/ibrdtn-svn$
So, I tried to debug this as the following. softgear@softgear-cube02:~/dtn/ibrdtn-svn$ gdb daemon/src/.libs/dtnd
Reading symbols from /home/softgear/dtn/ibrdtn-svn/daemon/src/.libs/dtnd...done. (gdb) r -c ibrdtnd.conf -d 1000
terminate called after throwing an instance of 'ibrcommon::socket_exception' what(): failed to getaddrinfo with address: <any>:4551
Program received signal SIGABRT, Aborted. 0x00007ffff69e0a75 in raise () from /lib/libc.so.6 (gdb) bt #0 0x00007ffff69e0a75 in raise () from /lib/libc.so.6 #1 0x00007ffff69e45c0 in abort () from /lib/libc.so.6 #2 0x00007ffff72998c5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6 #3 0x00007ffff7297cf6 in ?? () from /usr/lib/libstdc++.so.6 #4 0x00007ffff7297d23 in std::terminate() () from /usr/lib/libstdc++.so.6 #5 0x00007ffff7297d36 in ?? () from /usr/lib/libstdc++.so.6 #6 0x00007ffff7297373 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.6 #7 0x000000000046e5f2 in dtn::net::IPNDAgent::componentUp (this=<value optimized out>) at IPNDAgent.cpp:255 #8 0x000000000041e766 in __daemon_run (conf=<value optimized out>) at Main.cpp:892 #9 0x00007ffff69cbc4d in __libc_start_main () from /lib/libc.so.6 #10 0x000000000041b749 in _start () (gdb)
So, After I traced the source code, I found that getaddrinfo(address, service, &hints, &res) returned -2 in udpsocket::bind(const vaddress &addr) throw (socket_exception) in ibrcommon/ibrcommon/net/socket.cpp . At that time, address was NULL.
Could you help me?
Thanks in advance.
- Softgear Ko.