[Pkg-ace-devel] Bug#656040: ace-netsvcs broken or mis-configured

Ken Gregson ken.gregson at gmail.com
Mon Jan 16 05:02:30 UTC 2012


Package: ace-netsvcs
Version: 6.0.1-1
Severity: grave

I am an ACE newb and while working through the examples in the BlueBook 
(ACE Programmer's Guide), I was unable to get the simple logging client 
(section 3.6, page 67) but seem to have discovered a build configuration 
issue using strace.

No indication of successful communication between the application and 
client, nor client and server, nor output logged by the server (to the 
file "foobar") was obtained with the below.
--------------------------------
logger.cpp (builds successfully with >LDFLAGS=-lACE make logger):
#define ACE_TRACEN 0
#include "ace/Log_Msg.h"

int ACE_TMAIN( int argc, char *argv[] )
{
   ACE_LOG_MSG->open( argv[0], ACE_Log_Msg::LOGGER, 
ACE_DEFAULT_LOGGER_KEY );
   ACE_TRACE( "main" );

   ACE_DEBUG( (LM_DEBUG, "%IHi Mom\n") );
   ACE_DEBUG( (LM_INFO, "%IGoodnight\n") );

   return 0;
}

server.conf (instantiated via >ace_netsvcs -f server.conf):
dynamic Logger Service_Object * ACE:_make_ACE_Logging_Strategy() "-s 
foobar -f STDERR|OSTREAM|VERBOSE"
dynamic Server_Logging_Service Service_Object * 
netsvcs:_make_ACE_Server_Logging_Acceptor() active "-p 20009"

client.conf (instantiated via >ace_netsvcs -f client.conf):
dynamic Client_Logging_Service Service_Object * 
netsvcs:_make_ACE_Client_Logging_Acceptor() active "-h localhost -p 20009"
--------------------------------

Using strace allowed me to determine a search for "netsvcs" was failing 
and required changing "netsvcs:" to "/usr/bin/ace_netsvcs:" in both 
server.conf and client.conf.  This isn't documented anywhere in the 
README or changelogs in /usr/share/doc/ace-netsvcs that I could find.

ace_netsvcs made it further with the following updated configuration files
--------------------------------
server.conf (instantiated via >ace_netsvcs -f server.conf):
dynamic Logger Service_Object * ACE:_make_ACE_Logging_Strategy() "-s 
foobar -f STDERR|OSTREAM|VERBOSE"
dynamic Server_Logging_Service Service_Object * 
/usr/bin/ace_netsvcs:_make_ACE_Server_Logging_Acceptor() active "-p 20009"

client.conf (instantiated via >ace_netsvcs -f client.conf):
dynamic Client_Logging_Service Service_Object * 
/usr/bin/ace_netsvcs:_make_ACE_Client_Logging_Acceptor() active "-h 
localhost -p 20009"
--------------------------------

However, strace still showed that a search for the netsvcs library 
(libace_netsvcs.so or ace_netsvcs.so) was failing (on path /usr/bin that 
is coincidentally specified as the fully qualified path for ace_netsvcs 
in the {server|client}.conf files).  That was resolved with a very ugly 
hack:

ln -s /usr/lib/libnetsvcs-6.0.1.so /usr/bin/libace_netsvcs.so

After that things worked as expected (with localhost replaced by my true 
local host name or 127.0.1.1 where the server was actually listening 
rather than on 127.0.0.1 associated with localhost as normally 
configured by debian).  I tried all of the above with ACE_ROOT set to 
/usr/lib/ace and unset as well with no apparent difference.  I may be 
missing something obvious to others.

Regards,
-Ken Gregson





More information about the Pkg-ace-devel mailing list