I am currently using Scribe on a FreeBSD 7.1 amd64 system. I am
running it with the following config:
port=1463
max_msg_per_second=2000000
max_queue_size=10000000
check_interval=3
new_thread_per_category=yes
num_thrift_server_threads=25
<store>
category=web-*
type=file
file_path=/var/scribelogs/apache
max_size=10000000000
add_newlines=1
rotate_period=daily
rotate_hour=0
rotate_minute=0
</store>
I am able to successfully start the service by running it as root:
# scribed /usr/local/bin/scribed -c /usr/local/etc/scribed.conf
[Thu Jan 28 18:13:45 2010] "STATUS: STARTING"
[Thu Jan 28 18:13:45 2010] "STATUS: configuring"
[Thu Jan 28 18:13:45 2010] "got configuration data from file </usr/
local/etc/scribed.conf>"
[Thu Jan 28 18:13:45 2010] "CATEGORY : web-*"
[Thu Jan 28 18:13:45 2010] "[web-] WARNING: Bad config - no
base_filename specified for file store"
[Thu Jan 28 18:13:45 2010] "configured <1> stores"
[Thu Jan 28 18:13:45 2010] "STATUS: "
[Thu Jan 28 18:13:45 2010] "STATUS: ALIVE"
[Thu Jan 28 18:13:45 2010] "Starting scribe server on port 1463"
Thrift: Thu Jan 28 18:13:45 2010 libevent 1.4.13-stable method kqueue
However, when I try and run the program as a non-root user, it seems
to hang just before starting scribe on port 1463:
sudo -u scribed scribed /usr/local/bin/scribed -c /usr/local/etc/
scribed.conf
[Thu Jan 28 18:14:28 2010] "STATUS: STARTING"
[Thu Jan 28 18:14:28 2010] "STATUS: configuring"
[Thu Jan 28 18:14:28 2010] "got configuration data from file </usr/
local/etc/scribed.conf>"
[Thu Jan 28 18:14:28 2010] "CATEGORY : web-*"
[Thu Jan 28 18:14:28 2010] "[web-] WARNING: Bad config - no
base_filename specified for file store"
[Thu Jan 28 18:14:28 2010] "configured <1> stores"
[Thu Jan 28 18:14:28 2010] "STATUS: "
[Thu Jan 28 18:14:28 2010] "STATUS: ALIVE"
HOWEVER, if I change my scribe config to only use 1 thread, it seems
to run ok as a non-root user:
new_thread_per_category=no
num_thrift_server_threads=1
sudo -u scribed scribed /usr/local/bin/scribed -c /usr/local/etc/
scribed.conf
[Thu Jan 28 18:15:26 2010] "STATUS: STARTING"
[Thu Jan 28 18:15:26 2010] "STATUS: configuring"
[Thu Jan 28 18:15:26 2010] "got configuration data from file </usr/
local/etc/scribed.conf>"
[Thu Jan 28 18:15:26 2010] "CATEGORY : web-*"
[Thu Jan 28 18:15:26 2010] "store thread starting"
[Thu Jan 28 18:15:26 2010] "configured <1> stores"
[Thu Jan 28 18:15:26 2010] "STATUS: "
[Thu Jan 28 18:15:26 2010] "STATUS: ALIVE"
[Thu Jan 28 18:15:26 2010] "[web-] WARNING: Bad config - no
base_filename specified for file store"
[Thu Jan 28 18:15:26 2010] "Starting scribe server on port 1463"
Thrift: Thu Jan 28 18:15:26 2010 libevent 1.4.13-stable method kqueue
Is this a bug in Scribe?
This is not repro ing for me. Seems like the code is getting stuck after
the initialize() somewhere.
Can you put some LOG_OPERs in between 94 and 115, so that we can isolate
which line is causing the problem? Also can you point out between
> new_thread_per_category=no
> num_thrift_server_threads=1
which is the one which causes it to work for non-root access.
Best,
Gautam
94 g_Handler->initialize();
95
96 shared_ptr<TProcessor> processor(new scribeProcessor(g_Handler));
97 /* This factory is for binary compatibility. */
98 shared_ptr<TProtocolFactory>
99 binaryProtocolFactory(new TBinaryProtocolFactory(0, 0, false,
false));
100 shared_ptr<ThreadManager> thread_manager;
101
102 if (g_Handler->numThriftServerThreads > 1) {
103 // create a ThreadManager to process incoming calls
104 thread_manager = ThreadManager::
105 newSimpleThreadManager(g_Handler->numThriftServerThreads);
106
107 shared_ptr<PosixThreadFactory> thread_factory(new
PosixThreadFactory());
108 thread_manager->threadFactory(thread_factory);
109 thread_manager->start();
110 }
111
112 TNonblockingServer server(processor, binaryProtocolFactory,
113 g_Handler->port, thread_manager);
114
115 LOG_OPER("Starting scribe server on port %lu", g_Handler->port);
116 fflush(stderr);
117
On 1/28/10 5:17 PM, nanook wrote: