You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(24) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(11) |
Aug
(8) |
Sep
|
Oct
(5) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sasverde> <sas...@gm...> - 2009-07-17 20:09:46
|
I have problem for install scribe, the error when I run the command make, this launch the following message. Please, somebody help me. Thanks. [root@my trunk]# make make all-recursive make[1]: Entering directory `/tmp/scribeserver/trunk' Making all in . make[2]: Entering directory `/tmp/scribeserver/trunk' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/tmp/scribeserver/trunk' Making all in src make[2]: Entering directory `/tmp/scribeserver/trunk/src' make all-am make[3]: Entering directory `/tmp/scribeserver/trunk/src' g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOOST= -DHAVE_BOOST_SYSTEM= -DHAVE_BOOST_FILESYSTEM= -I. -I.. -I/opt/thrift/include -I/opt/thrift/include/thrift -I/opt/fb303/include/thrift -I/opt/fb303/include/thrift/ > > fb303 -I/usr/local/include -I/usr/local/include/boost-1_36 -Wall -O3 > -MT store.o -MD -MP -MF .deps/store.Tpo -c -o store.o store.cpp > store.cpp: In member function 'bool > FileStore::writeMessages(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, > std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, > boost::shared_ptr<FileInterface>)': > store.cpp:713: warning: format '%lu' expects type 'long unsigned int', but > argument 5 has type 'size_t' > store.cpp: In member function 'virtual bool > FileStore::readOldest(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, > std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, tm*)': > store.cpp:845: warning: format '%lu' expects type 'long unsigned int', but > argument 5 has type 'size_t' > store.cpp: In member function 'virtual void BufferStore::periodicCheck()': > store.cpp:1341: warning: format '%lu' expects type 'long unsigned int', but > argument 5 has type 'size_t' > store.cpp: In member function 'long unsigned int > BucketStore::bucketize(const std::string&)': > store.cpp:2077: error: jump to case label > store.cpp:2074: error: crosses initialization of 'double key_mod' > store.cpp:2078: error: jump to case label > store.cpp:2074: error: crosses initialization of 'double key_mod' > store.cpp:2062: warning: enumeration value 'context_log' not handled in > switch > store.cpp:2062: warning: enumeration value 'random' not handled in switch > store.cpp:2062: warning: enumeration value 'key_hash' not handled in switch > /usr/local/include/boost-1_36/boost/system/error_code.hpp: At global scope: > /usr/local/include/boost-1_36/boost/system/error_code.hpp:205: warning: > 'boost::system::system_category' defined but not used > /usr/local/include/boost-1_36/boost/system/error_code.hpp:206: warning: > 'boost::system::generic_category' defined but not used > /usr/local/include/boost-1_36/boost/system/error_code.hpp:210: warning: > 'boost::system::posix_category' defined but not used > /usr/local/include/boost-1_36/boost/system/error_code.hpp:211: warning: > 'boost::system::errno_ecat' defined but not used > /usr/local/include/boost-1_36/boost/system/error_code.hpp:212: warning: > 'boost::system::native_ecat' defined but not used > make[3]: *** [store.o] Error 1 > make[3]: Leaving directory `/tmp/scribeserver/trunk/src' > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/tmp/scribeserver/trunk/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/tmp/scribeserver/trunk' > make: *** [all] Error 2 |
From: Sebastian S. <s.s...@gm...> - 2009-07-17 20:07:47
|
I have problem for install scribe, the error when I run the command make, this launch the following message. Please, somebody help me. Thanks. [root@my trunk]# make make all-recursive make[1]: Entering directory `/tmp/scribeserver/trunk' Making all in . make[2]: Entering directory `/tmp/scribeserver/trunk' make[2]: Nothing to be done for `all-am'. make[2]: Leaving directory `/tmp/scribeserver/trunk' Making all in src make[2]: Entering directory `/tmp/scribeserver/trunk/src' make all-am make[3]: Entering directory `/tmp/scribeserver/trunk/src' g++ -DPACKAGE_NAME=\"scribe\" -DPACKAGE_TARNAME=\"scribe\" -DPACKAGE_VERSION=\"1.5.0\" -DPACKAGE_STRING=\"scribe\ 1.5.0\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_BOOST= -DHAVE_BOOST_SYSTEM= -DHAVE_BOOST_FILESYSTEM= -I. -I.. -I/opt/thrift/include -I/opt/thrift/include/thrift -I/opt/fb303/include/thrift -I/opt/fb303/include/thrift/fb303 -I/usr/local/include -I/usr/local/include/boost-1_36 -Wall -O3 -MT store.o -MD -MP -MF .deps/store.Tpo -c -o store.o store.cpp store.cpp: In member function 'bool FileStore::writeMessages(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, boost::shared_ptr<FileInterface>)': store.cpp:713: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'size_t' store.cpp: In member function 'virtual bool FileStore::readOldest(boost::shared_ptr<std::vector<boost::shared_ptr<scribe::thrift::LogEntry>, std::allocator<boost::shared_ptr<scribe::thrift::LogEntry> > > >, tm*)': store.cpp:845: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'size_t' store.cpp: In member function 'virtual void BufferStore::periodicCheck()': store.cpp:1341: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'size_t' store.cpp: In member function 'long unsigned int BucketStore::bucketize(const std::string&)': store.cpp:2077: error: jump to case label store.cpp:2074: error: crosses initialization of 'double key_mod' store.cpp:2078: error: jump to case label store.cpp:2074: error: crosses initialization of 'double key_mod' store.cpp:2062: warning: enumeration value 'context_log' not handled in switch store.cpp:2062: warning: enumeration value 'random' not handled in switch store.cpp:2062: warning: enumeration value 'key_hash' not handled in switch /usr/local/include/boost-1_36/boost/system/error_code.hpp: At global scope: /usr/local/include/boost-1_36/boost/system/error_code.hpp:205: warning: 'boost::system::system_category' defined but not used /usr/local/include/boost-1_36/boost/system/error_code.hpp:206: warning: 'boost::system::generic_category' defined but not used /usr/local/include/boost-1_36/boost/system/error_code.hpp:210: warning: 'boost::system::posix_category' defined but not used /usr/local/include/boost-1_36/boost/system/error_code.hpp:211: warning: 'boost::system::errno_ecat' defined but not used /usr/local/include/boost-1_36/boost/system/error_code.hpp:212: warning: 'boost::system::native_ecat' defined but not used make[3]: *** [store.o] Error 1 make[3]: Leaving directory `/tmp/scribeserver/trunk/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/tmp/scribeserver/trunk/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/scribeserver/trunk' make: *** [all] Error 2 |
From: Trevor A. <as...@ta...> - 2009-04-10 01:11:27
|
--with-boost-system=boost_system-mt and --with-boost-filesystem=boost_filesystem-mt did the trick. Thanks! On Thu, 9 Apr 2009, Anthony Giardullo wrote: > Can you try explicitly setting the following configure options: > --with-boost > --with-boost-system > --with-boost-filesystem > > See README.BUILD or "configure --help" for an example. Let me know if this helps. > > -Anthony > > On 4/9/09 7:47 AM, "Trevor Astrope" <> wrote: > > I'm trying to compile scribeserver 2.01. I have thrift and fb303 > installed as well as boost 1.37, but I am getting this error when running > configure: > > checking for boostlib >= 1.36... yes > checking build system type... x86_64-unknown-linux-gnu > checking whether the Boost::System library is available... yes > checking whether the Boost::Filesystem library is available... yes > configure: error: Could not link against ! > > If I comment out AX_BOOST_FILESYSTEM on line 63 of configure.ac and rerun > bootstrap.sh, configure completes, but I get this error: > > g++ -Wall -O3 -L/usr/lib -o scribed store.o store_queue.o conf.o > file.o conn_pool.o scribe_server.o -L/usr/lib -L/usr/lib -lfb303 -lthrift > -lthriftnb -levent -lpthread libscribe.a > store.o: In function `__static_initialization_and_destruction_0(int, > int)': > store.cpp:(.text+0x934): undefined reference to > `boost::system::get_system_category()' > store.cpp:(.text+0x940): undefined reference to > `boost::system::get_generic_category()' > store.cpp:(.text+0x94c): undefined reference to > `boost::system::get_generic_category()' > store.cpp:(.text+0x958): undefined reference to > `boost::system::get_generic_category()' > store.cpp:(.text+0x964): undefined reference to > `boost::system::get_system_category()' > store.o: In function > `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::create_directory<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)': > store.cpp:(.text._ZN5boost10filesystem16create_directoryINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::create_directory<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x73): undefined reference to > `boost::filesystem::detail::create_directory_api(std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&)' > store_queue.o: In function `__static_initialization_and_destruction_0(int, > int)': > store_queue.cpp:(.text+0x54): undefined reference to > `boost::system::get_system_category()' > store_queue.cpp:(.text+0x60): undefined reference to > `boost::system::get_generic_category()' > store_queue.cpp:(.text+0x6c): undefined reference to > `boost::system::get_generic_category()' > store_queue.cpp:(.text+0x78): undefined reference to > `boost::system::get_generic_category()' > store_queue.cpp:(.text+0x84): undefined reference to > `boost::system::get_system_category()' > conf.o: In function `__static_initialization_and_destruction_0(int, int)': > conf.cpp:(.text+0x34): undefined reference to > `boost::system::get_system_category()' > conf.cpp:(.text+0x40): undefined reference to > `boost::system::get_generic_category()' > conf.cpp:(.text+0x4c): undefined reference to > `boost::system::get_generic_category()' > conf.cpp:(.text+0x58): undefined reference to > `boost::system::get_generic_category()' > conf.cpp:(.text+0x64): undefined reference to > `boost::system::get_system_category()' > file.o: In function `__static_initialization_and_destruction_0(int, int)': > file.cpp:(.text+0xb4): undefined reference to > `boost::system::get_system_category()' > file.cpp:(.text+0xc0): undefined reference to > `boost::system::get_generic_category()' > file.cpp:(.text+0xcc): undefined reference to > `boost::system::get_generic_category()' > file.cpp:(.text+0xd8): undefined reference to > `boost::system::get_generic_category()' > file.cpp:(.text+0xe4): undefined reference to > `boost::system::get_system_category()' > file.o: In function > `boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> > >::dispose()': > file.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impINS2_10basic_pathISsNS2_11path_traitsEEEEEE7disposeEv[boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> > >::dispose()]+0x20): undefined reference > to `boost::filesystem::detail::dir_itr_close(void*&, void*&)' > file.o: In function > `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >::increment()': > file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >::increment()]+0x51): undefined reference > to `boost::system::get_system_category()' > file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >::increment()]+0x83): undefined reference > to `boost::filesystem::detail::dir_itr_increment(void*&, void*&, > std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, > boost::filesystem::file_status&, boost::filesystem::file_status&)' > file.o: In function > `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> ::m_init(boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)': > file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> ::m_init(boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x67): undefined reference to > `boost::filesystem::detail::not_found_error()' > file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> ::m_init(boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x147): undefined reference to > `boost::filesystem::detail::dir_itr_first(void*&, void*&, > std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, std::basic_string<char, std::char_traits<char>, > std::allocator<char> >&, boost::filesystem::file_status&, > boost::filesystem::file_status&)' > file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> ::m_init(boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x29c): undefined reference to > `boost::system::get_system_category()' > file.o: In function `bool > boost::filesystem::detail::remove_aux<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&, boost::filesystem::file_status)': > file.cpp:(.text._ZN5boost10filesystem6detail10remove_auxINS0_10basic_pathISsNS0_11path_traitsEEEEEbRKT_NS0_11file_statusE[bool > boost::filesystem::detail::remove_aux<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&, > boost::filesystem::file_status)]+0x5e): undefined reference to > `boost::filesystem::detail::remove_api(std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&)' > file.o: In function > `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> ::basic_directory_iterator(boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)': > file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEEC1ERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> ::basic_directory_iterator(boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x1c0): undefined reference to > `boost::filesystem::detail::dir_itr_close(void*&, void*&)' > file.o: In function > `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)': > file.cpp:(.text._ZN5boost10filesystem6removeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x36): undefined reference to > `boost::system::get_system_category()' > file.cpp:(.text._ZN5boost10filesystem6removeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x66): undefined reference to > `boost::filesystem::detail::symlink_status_api(std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > boost::system::error_code&)' > file.o: In function > `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, unsigned long>::type > boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)': > file.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, unsigned long>::type > boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x52): undefined reference to > `boost::filesystem::detail::file_size_api(std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&)' > file.o: In function > `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)': > file.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x36): undefined reference to > `boost::system::get_system_category()' > file.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >, bool>::type > boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> >> (boost::filesystem::basic_path<std::basic_string<char, > std::char_traits<char>, std::allocator<char> >, > boost::filesystem::path_traits> const&)]+0x76): undefined reference to > `boost::filesystem::detail::status_api(std::basic_string<char, > std::char_traits<char>, std::allocator<char> > const&, > boost::system::error_code&)' > conn_pool.o: In function `__static_initialization_and_destruction_0(int, > int)': > conn_pool.cpp:(.text+0x64): undefined reference to > `boost::system::get_system_category()' > conn_pool.cpp:(.text+0x70): undefined reference to > `boost::system::get_generic_category()' > conn_pool.cpp:(.text+0x7c): undefined reference to > `boost::system::get_generic_category()' > conn_pool.cpp:(.text+0x88): undefined reference to > `boost::system::get_generic_category()' > conn_pool.cpp:(.text+0x94): undefined reference to > `boost::system::get_system_category()' > scribe_server.o: In function > `__static_initialization_and_destruction_0(int, int)': > scribe_server.cpp:(.text+0xa4): undefined reference to > `boost::system::get_system_category()' > scribe_server.cpp:(.text+0xb0): undefined reference to > `boost::system::get_generic_category()' > scribe_server.cpp:(.text+0xbc): undefined reference to > `boost::system::get_generic_category()' > scribe_server.cpp:(.text+0xc8): undefined reference to > `boost::system::get_generic_category()' > scribe_server.cpp:(.text+0xd4): undefined reference to > `boost::system::get_system_category()' > collect2: ld returned 1 exit status > make[3]: *** [scribed] Error 1 > make[3]: Leaving directory `/home/astrope/scribe-version-2.01/src' > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/home/astrope/scribe-version-2.01/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/astrope/scribe-version-2.01' > make: *** [all] Error 2 > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > High Quality Requirements in a Collaborative Environment. > Download a free trial of Rational Requirements Composer Now! > http://p.sf.net/sfu/www-ibm-com > _______________________________________________ > Scribeserver-users mailing list > Scr...@li... > https://lists.sourceforge.net/lists/listinfo/scribeserver-users > > |
From: Anthony G. <agi...@fa...> - 2009-04-09 23:56:51
|
Can you try explicitly setting the following configure options: --with-boost --with-boost-system --with-boost-filesystem See README.BUILD or "configure --help" for an example. Let me know if this helps. -Anthony On 4/9/09 7:47 AM, "Trevor Astrope" <> wrote: I'm trying to compile scribeserver 2.01. I have thrift and fb303 installed as well as boost 1.37, but I am getting this error when running configure: checking for boostlib >= 1.36... yes checking build system type... x86_64-unknown-linux-gnu checking whether the Boost::System library is available... yes checking whether the Boost::Filesystem library is available... yes configure: error: Could not link against ! If I comment out AX_BOOST_FILESYSTEM on line 63 of configure.ac and rerun bootstrap.sh, configure completes, but I get this error: g++ -Wall -O3 -L/usr/lib -o scribed store.o store_queue.o conf.o file.o conn_pool.o scribe_server.o -L/usr/lib -L/usr/lib -lfb303 -lthrift -lthriftnb -levent -lpthread libscribe.a store.o: In function `__static_initialization_and_destruction_0(int, int)': store.cpp:(.text+0x934): undefined reference to `boost::system::get_system_category()' store.cpp:(.text+0x940): undefined reference to `boost::system::get_generic_category()' store.cpp:(.text+0x94c): undefined reference to `boost::system::get_generic_category()' store.cpp:(.text+0x958): undefined reference to `boost::system::get_generic_category()' store.cpp:(.text+0x964): undefined reference to `boost::system::get_system_category()' store.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::create_directory<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': store.cpp:(.text._ZN5boost10filesystem16create_directoryINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::create_directory<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x73): undefined reference to `boost::filesystem::detail::create_directory_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' store_queue.o: In function `__static_initialization_and_destruction_0(int, int)': store_queue.cpp:(.text+0x54): undefined reference to `boost::system::get_system_category()' store_queue.cpp:(.text+0x60): undefined reference to `boost::system::get_generic_category()' store_queue.cpp:(.text+0x6c): undefined reference to `boost::system::get_generic_category()' store_queue.cpp:(.text+0x78): undefined reference to `boost::system::get_generic_category()' store_queue.cpp:(.text+0x84): undefined reference to `boost::system::get_system_category()' conf.o: In function `__static_initialization_and_destruction_0(int, int)': conf.cpp:(.text+0x34): undefined reference to `boost::system::get_system_category()' conf.cpp:(.text+0x40): undefined reference to `boost::system::get_generic_category()' conf.cpp:(.text+0x4c): undefined reference to `boost::system::get_generic_category()' conf.cpp:(.text+0x58): undefined reference to `boost::system::get_generic_category()' conf.cpp:(.text+0x64): undefined reference to `boost::system::get_system_category()' file.o: In function `__static_initialization_and_destruction_0(int, int)': file.cpp:(.text+0xb4): undefined reference to `boost::system::get_system_category()' file.cpp:(.text+0xc0): undefined reference to `boost::system::get_generic_category()' file.cpp:(.text+0xcc): undefined reference to `boost::system::get_generic_category()' file.cpp:(.text+0xd8): undefined reference to `boost::system::get_generic_category()' file.cpp:(.text+0xe4): undefined reference to `boost::system::get_system_category()' file.o: In function `boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> > >::dispose()': file.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impINS2_10basic_pathISsNS2_11path_traitsEEEEEE7disposeEv[boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> > >::dispose()]+0x20): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)' file.o: In function `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::increment()': file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::increment()]+0x51): undefined reference to `boost::system::get_system_category()' file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::increment()]+0x83): undefined reference to `boost::filesystem::detail::dir_itr_increment(void*&, void*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::filesystem::file_status&, boost::filesystem::file_status&)' file.o: In function `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x67): undefined reference to `boost::filesystem::detail::not_found_error()' file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x147): undefined reference to `boost::filesystem::detail::dir_itr_first(void*&, void*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::filesystem::file_status&, boost::filesystem::file_status&)' file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x29c): undefined reference to `boost::system::get_system_category()' file.o: In function `bool boost::filesystem::detail::remove_aux<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&, boost::filesystem::file_status)': file.cpp:(.text._ZN5boost10filesystem6detail10remove_auxINS0_10basic_pathISsNS0_11path_traitsEEEEEbRKT_NS0_11file_statusE[bool boost::filesystem::detail::remove_aux<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&, boost::filesystem::file_status)]+0x5e): undefined reference to `boost::filesystem::detail::remove_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' file.o: In function `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::basic_directory_iterator(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEEC1ERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::basic_directory_iterator(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x1c0): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)' file.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem6removeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x36): undefined reference to `boost::system::get_system_category()' file.cpp:(.text._ZN5boost10filesystem6removeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x66): undefined reference to `boost::filesystem::detail::symlink_status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)' file.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x52): undefined reference to `boost::filesystem::detail::file_size_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' file.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x36): undefined reference to `boost::system::get_system_category()' file.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x76): undefined reference to `boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)' conn_pool.o: In function `__static_initialization_and_destruction_0(int, int)': conn_pool.cpp:(.text+0x64): undefined reference to `boost::system::get_system_category()' conn_pool.cpp:(.text+0x70): undefined reference to `boost::system::get_generic_category()' conn_pool.cpp:(.text+0x7c): undefined reference to `boost::system::get_generic_category()' conn_pool.cpp:(.text+0x88): undefined reference to `boost::system::get_generic_category()' conn_pool.cpp:(.text+0x94): undefined reference to `boost::system::get_system_category()' scribe_server.o: In function `__static_initialization_and_destruction_0(int, int)': scribe_server.cpp:(.text+0xa4): undefined reference to `boost::system::get_system_category()' scribe_server.cpp:(.text+0xb0): undefined reference to `boost::system::get_generic_category()' scribe_server.cpp:(.text+0xbc): undefined reference to `boost::system::get_generic_category()' scribe_server.cpp:(.text+0xc8): undefined reference to `boost::system::get_generic_category()' scribe_server.cpp:(.text+0xd4): undefined reference to `boost::system::get_system_category()' collect2: ld returned 1 exit status make[3]: *** [scribed] Error 1 make[3]: Leaving directory `/home/astrope/scribe-version-2.01/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/astrope/scribe-version-2.01/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/astrope/scribe-version-2.01' make: *** [all] Error 2 ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Scribeserver-users mailing list Scr...@li... https://lists.sourceforge.net/lists/listinfo/scribeserver-users |
From: Trevor A. <as...@ta...> - 2009-04-09 14:48:06
|
I'm trying to compile scribeserver 2.01. I have thrift and fb303 installed as well as boost 1.37, but I am getting this error when running configure: checking for boostlib >= 1.36... yes checking build system type... x86_64-unknown-linux-gnu checking whether the Boost::System library is available... yes checking whether the Boost::Filesystem library is available... yes configure: error: Could not link against ! If I comment out AX_BOOST_FILESYSTEM on line 63 of configure.ac and rerun bootstrap.sh, configure completes, but I get this error: g++ -Wall -O3 -L/usr/lib -o scribed store.o store_queue.o conf.o file.o conn_pool.o scribe_server.o -L/usr/lib -L/usr/lib -lfb303 -lthrift -lthriftnb -levent -lpthread libscribe.a store.o: In function `__static_initialization_and_destruction_0(int, int)': store.cpp:(.text+0x934): undefined reference to `boost::system::get_system_category()' store.cpp:(.text+0x940): undefined reference to `boost::system::get_generic_category()' store.cpp:(.text+0x94c): undefined reference to `boost::system::get_generic_category()' store.cpp:(.text+0x958): undefined reference to `boost::system::get_generic_category()' store.cpp:(.text+0x964): undefined reference to `boost::system::get_system_category()' store.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::create_directory<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': store.cpp:(.text._ZN5boost10filesystem16create_directoryINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::create_directory<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x73): undefined reference to `boost::filesystem::detail::create_directory_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' store_queue.o: In function `__static_initialization_and_destruction_0(int, int)': store_queue.cpp:(.text+0x54): undefined reference to `boost::system::get_system_category()' store_queue.cpp:(.text+0x60): undefined reference to `boost::system::get_generic_category()' store_queue.cpp:(.text+0x6c): undefined reference to `boost::system::get_generic_category()' store_queue.cpp:(.text+0x78): undefined reference to `boost::system::get_generic_category()' store_queue.cpp:(.text+0x84): undefined reference to `boost::system::get_system_category()' conf.o: In function `__static_initialization_and_destruction_0(int, int)': conf.cpp:(.text+0x34): undefined reference to `boost::system::get_system_category()' conf.cpp:(.text+0x40): undefined reference to `boost::system::get_generic_category()' conf.cpp:(.text+0x4c): undefined reference to `boost::system::get_generic_category()' conf.cpp:(.text+0x58): undefined reference to `boost::system::get_generic_category()' conf.cpp:(.text+0x64): undefined reference to `boost::system::get_system_category()' file.o: In function `__static_initialization_and_destruction_0(int, int)': file.cpp:(.text+0xb4): undefined reference to `boost::system::get_system_category()' file.cpp:(.text+0xc0): undefined reference to `boost::system::get_generic_category()' file.cpp:(.text+0xcc): undefined reference to `boost::system::get_generic_category()' file.cpp:(.text+0xd8): undefined reference to `boost::system::get_generic_category()' file.cpp:(.text+0xe4): undefined reference to `boost::system::get_system_category()' file.o: In function `boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> > >::dispose()': file.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impINS2_10basic_pathISsNS2_11path_traitsEEEEEE7disposeEv[boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> > >::dispose()]+0x20): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)' file.o: In function `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::increment()': file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::increment()]+0x51): undefined reference to `boost::system::get_system_category()' file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE9incrementEv[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::increment()]+0x83): undefined reference to `boost::filesystem::detail::dir_itr_increment(void*&, void*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::filesystem::file_status&, boost::filesystem::file_status&)' file.o: In function `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x67): undefined reference to `boost::filesystem::detail::not_found_error()' file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x147): undefined reference to `boost::filesystem::detail::dir_itr_first(void*&, void*&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, boost::filesystem::file_status&, boost::filesystem::file_status&)' file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEE6m_initERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::m_init(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x29c): undefined reference to `boost::system::get_system_category()' file.o: In function `bool boost::filesystem::detail::remove_aux<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&, boost::filesystem::file_status)': file.cpp:(.text._ZN5boost10filesystem6detail10remove_auxINS0_10basic_pathISsNS0_11path_traitsEEEEEbRKT_NS0_11file_statusE[bool boost::filesystem::detail::remove_aux<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&, boost::filesystem::file_status)]+0x5e): undefined reference to `boost::filesystem::detail::remove_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' file.o: In function `boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::basic_directory_iterator(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem24basic_directory_iteratorINS0_10basic_pathISsNS0_11path_traitsEEEEC1ERKS4_[boost::filesystem::basic_directory_iterator<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >::basic_directory_iterator(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x1c0): undefined reference to `boost::filesystem::detail::dir_itr_close(void*&, void*&)' file.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem6removeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x36): undefined reference to `boost::system::get_system_category()' file.cpp:(.text._ZN5boost10filesystem6removeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::remove<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x66): undefined reference to `boost::filesystem::detail::symlink_status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)' file.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem9file_sizeINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEmE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, unsigned long>::type boost::filesystem::file_size<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x52): undefined reference to `boost::filesystem::detail::file_size_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' file.o: In function `boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)': file.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x36): undefined reference to `boost::system::get_system_category()' file.cpp:(.text._ZN5boost10filesystem6existsINS0_10basic_pathISsNS0_11path_traitsEEEEENS_9enable_ifINS0_13is_basic_pathIT_EEbE4typeERKS7_[boost::enable_if<boost::filesystem::is_basic_path<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >, bool>::type boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> >(boost::filesystem::basic_path<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::filesystem::path_traits> const&)]+0x76): undefined reference to `boost::filesystem::detail::status_api(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::system::error_code&)' conn_pool.o: In function `__static_initialization_and_destruction_0(int, int)': conn_pool.cpp:(.text+0x64): undefined reference to `boost::system::get_system_category()' conn_pool.cpp:(.text+0x70): undefined reference to `boost::system::get_generic_category()' conn_pool.cpp:(.text+0x7c): undefined reference to `boost::system::get_generic_category()' conn_pool.cpp:(.text+0x88): undefined reference to `boost::system::get_generic_category()' conn_pool.cpp:(.text+0x94): undefined reference to `boost::system::get_system_category()' scribe_server.o: In function `__static_initialization_and_destruction_0(int, int)': scribe_server.cpp:(.text+0xa4): undefined reference to `boost::system::get_system_category()' scribe_server.cpp:(.text+0xb0): undefined reference to `boost::system::get_generic_category()' scribe_server.cpp:(.text+0xbc): undefined reference to `boost::system::get_generic_category()' scribe_server.cpp:(.text+0xc8): undefined reference to `boost::system::get_generic_category()' scribe_server.cpp:(.text+0xd4): undefined reference to `boost::system::get_system_category()' collect2: ld returned 1 exit status make[3]: *** [scribed] Error 1 make[3]: Leaving directory `/home/astrope/scribe-version-2.01/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/astrope/scribe-version-2.01/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/astrope/scribe-version-2.01' make: *** [all] Error 2 |
From: Anthony G. <an...@fa...> - 2009-02-27 03:45:15
|
I have not yet attempted to build Scribe on Windows. Currently Scribe uses the Boost Filesystem library to peform platform independent file operations (although I posted a discussion in the Forums about whether we should remove this dependency and just rely on people using Cygwin if they need to) . However, Scribe is dependent on Thrift(It uses thrift/lib/cpp as well as runs generated Thrift c++ code). So you would also need to be able to Build Thrift's cpp libraries on Windows. Based on the following link, it doesn't sound like you would be able to do so. But please let me know if you find a way to build on win32. Thanks, Anthony http://wiki.apache.org/thrift/ThriftInstallationWin32?highlight=%28win32%29 On 2/26/09 9:34 AM, "dl...@so..." <dl...@so...> wrote: I have some Windows boxes that I would want to participate. Any docs or experience with building on Windows?Or should I plan on Cygwin or other Window/Linux tools? ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Scribeserver-users mailing list Scr...@li... https://lists.sourceforge.net/lists/listinfo/scribeserver-users |
From: <dl...@so...> - 2009-02-26 18:06:37
|
I have some Windows boxes that I would want to participate. Any docs or experience with building on Windows?Or should I plan on Cygwin or other Window/Linux tools? |
From: Anthony G. <an...@fa...> - 2009-02-12 03:26:17
|
I am not familiar with daemontools, so I do not know what could be causing this. Are there any error messages printed to stdout/stderr when it restarts? I think maybe you should email daemontools and ask them what situations could cause this behavior. Thanks, Anthony On 2/11/09 3:04 PM, "Stephen Corona" <sc...@ad...> wrote: I am having some trouble running Scribe via Daemontools (http://cr.yp.to/daemontools.html). If I don't redirect STDOUT, daemon tools will keep restarting scribe over and over again. This is odd considering I run other programs which write to STDOUT and run fine through daemontools. Is Scribe doing anything funny during the initial startup that would cause this? This is my daemonstools run file: #!/bin/sh exec /usr/local/bin/scribed /vm/scribed/example2central.conf It will only run if I change it to this: #!/bin/sh exec /usr/local/bin/scribed /vm/scribed/example2central.conf 1>/dev/null Thanks for any help, Steve Corona ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Scribeserver-users mailing list Scr...@li... https://lists.sourceforge.net/lists/listinfo/scribeserver-users |
From: Stephen C. <sc...@ad...> - 2009-02-11 23:05:34
|
I am having some trouble running Scribe via Daemontools (http://cr.yp.to/daemontools.html). If I don't redirect STDOUT, daemon tools will keep restarting scribe over and over again. This is odd considering I run other programs which write to STDOUT and run fine through daemontools. Is Scribe doing anything funny during the initial startup that would cause this? This is my daemonstools run file: #!/bin/sh exec /usr/local/bin/scribed /vm/scribed/example2central.conf It will only run if I change it to this: #!/bin/sh exec /usr/local/bin/scribed /vm/scribed/example2central.conf 1>/dev/null Thanks for any help, Steve Corona |
From: Alex W. <ale...@gm...> - 2009-01-13 15:48:26
|
I figured out the problem. I had built the Thrift and Scribe libraries as static libraries, as is the default in the configure file, however my Makefile was trying to link dynamically (I was not using the -static flag, or -Wl,-Bstatic). I preferred to link dynamically, so I reconfigured the Thrift and Scribe libraries with the --disable-static flag, remade the libraries, copied them to my /usr/local/lib directory, and then my Makefile compiled my code without errors. I hope this helps someone else. --Alex |
From: Alex W. <ale...@gm...> - 2009-01-12 21:18:26
|
I posted this question to the Help forum, but I think the mailing list was probably the correct location to send this question. I apologize if this qualifies as a double posting. I have Thrift and Scribe built and have passed messages successfully using the example code included in these projects, like the Python scribe_cat file under /scribe-2.0/examples. I am attempting to build my own Scribe C++ client, but I get a hundred different errors when I compile. I am grateful for any help offered. I'm on Ubuntu 8.04 I've tried compiling using g++ 4.2.4 and g++ 3.4 I'm using Boost 1.37 I'm using Thrift 20080411-r733188 I'm using Scribe 2.0 Scribe version 2.0 Last Update: Oct 29 2008 Here is a snapshot of the first few errors: g++ -o CppClient -I/usr/local/include/thrift -I/usr/local/include/boost-1_37 -I/usr/local/include/thrift/fb303 -Igen-cpp -L/usr/local/lib -lthrift CppClient.cpp gen-cpp/scribe.cpp /tmp/ccRkmGTP.o: In function `scribe::thrift::scribeProcessor::process_fn(facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int)': scribe.cpp:(.text+0x14d): undefined reference to `facebook::fb303::FacebookServiceProcessor::process_fn(facebook::thrift::protocol::TProtocol*, facebook::thrift::protocol::TProtocol*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, int)' /tmp/ccRkmGTP.o: In function `scribe::thrift::scribe_Log_pargs::write(facebook::thrift::protocol::TProtocol*) const': scribe.cpp:(.text+0xcac): undefined reference to `scribe::thrift::LogEntry::write(facebook::thrift::protocol::TProtocol*) const' /tmp/ccRkmGTP.o: In function `scribe::thrift::scribe_Log_args::write(facebook::thrift::protocol::TProtocol*) const': scribe.cpp:(.text+0x1014): undefined reference to `scribe::thrift::LogEntry::write(facebook::thrift::protocol::TProtocol*) const' /tmp/ccRkmGTP.o: In function `scribe::thrift::scribe_Log_args::read(facebook::thrift::protocol::TProtocol*)': scribe.cpp:(.text+0x11d9): undefined reference to `scribe::thrift::LogEntry::read(facebook::thrift::protocol::TProtocol*)' /tmp/ccRkmGTP.o: In function `facebook::fb303::FacebookServiceClient::~FacebookServiceClient()': My CppClient.cpp looks like this: ------------------------------------------- #include <stdio.h> #include <unistd.h> #include <sys/time.h> #include <protocol/TBinaryProtocol.h> #include <transport/TSocket.h> #include <transport/TTransportUtils.h> #include "gen-cpp/scribe.h" using namespace std; using namespace facebook::thrift; using namespace facebook::thrift::protocol; using namespace facebook::thrift::transport; using namespace boost; int main(int argc, char** argv) { shared_ptr<TTransport> socket(new TSocket("localhost", 9090)); shared_ptr<TTransport> transport(new TBufferedTransport(socket)); shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport)); return 0; } ------------------------------------------- My gen-cpp/ directory contains the generated scribe files from scribe-2.0/if/scribe.thrift My Makefile looks like this: ------------------------------------------------ BOOST_DIR = /usr/local/include/boost-1_37 THRIFT_DIR = /usr/local/include/thrift LIB_DIR = /usr/local/lib SCRIBE_INC = /usr/local/include/thrift/fb303 GEN_SRC = gen-cpp/scribe.cpp default: client client: CppClient.cpp g++ -o CppClient -I${THRIFT_DIR} -I${BOOST_DIR} -I${SCRIBE_INC} -Igen-cpp -L${LIB_DIR} -lthrift CppClient.cpp ${GEN_SRC} Again, any suggestions or debugging pointers would be greatly appreciated. --Alex |
From: Anthony G. <an...@fa...> - 2008-12-01 19:43:52
|
Chandranshu, Glad you got this figured out. I forwarded your email to our thrift gurus. Thanks for looking into this. Please let me know how the rest of your tests go. -Anthony On 12/1/08 5:41 AM, "Chandranshu ." <cha...@gm...> wrote: Hey Anthony, I got bogged down with some other work but was finally able to run Scribe with ruby today. I took some time debugging what was the version expected by the protocol and then actually probed the corresponding Python code. It appears that the ruby code generated by Thrift for Thrift::BinaryProtocol is outdated. Thankfully, the python code was very readable and helped me nail down the problem for once and all. The following comment in /usr/lib/python2.5/site-packages/thrift/protocol/TBinaryProtocol.py was especially helpful: # NastyHaxx. Python 2.4+ on 32-bit machines forces hex constants to be # positive, converting this into a long. If we hardcode the int value # instead it'll stay in 32 bit-land. I made the corresponding changes in /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb and things started to look good as I was getting some meaningful debug info for the first time. The I compared the `read_message_begin' method in this class with the Python version and pooh! The bug was right there staring straight into my eyes. Can you guys review and check-in the following code in the ruby branch: def read_message_begin version = read_i32 if(version <0) if (version & VERSION_MASK != VERSION_1) raise ProtocolException.new(ProtocolException::BAD_VERSION, 'Missing version identifier') end type = version & 0x000000ff name = read_string seqid = read_i32 else name = trans.readAll(version) type = read_byte seqid = read_i32 end [name, type, seqid] end Please note that this code does not check for a strict read condition that was used by Python to restrict the actions in the else section. I'll be benchmarking Scribe with Ruby day after tomorrow and will pass on the results. All help on performance tuning will be appreciated. Regards Chandranshu On Wed, Nov 26, 2008 at 7:34 PM, Chandranshu . <cha...@gm...> wrote: > Hi Anthony, > > Thanks for all your helpful suggestions. > I changed > client.Log(LogEntry.new(:category => "test", :message => "This is a > test message")); > to be > log_entry = LogEntry.new(:category => "test", :message => "This is a > test message") > client.Log([log_entry]) > > This ensured that the message reached the scribed server and got > logged with appropriate category. However, now I get the following > error: > /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in > `read_message_begin': Missing version identifier > (Thrift::ProtocolException) > from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in `receive_message' > from ../src/gen-rb/scribe.rb:26:in `recv_Log' > from ../src/gen-rb/scribe.rb:18:in `Log' > from rscribe_cat:19 > > I am still investigating why is this the case. If you can suggest > something, it'll be greatly helpful. > > Regards > Chandranshu > > > > On Wed, Nov 26, 2008 at 1:58 AM, Anthony Giardullo <an...@fa...> wrote: >> You are correct. Sorry, in my earlier email I should have you need to pass >> a *list* of LogEntry's when calling Log. See the declaration of the Log >> procedure in if/scribe.thrift. >> >> -Anthony >> >> On 11/25/08 7:19 AM, "Chandranshu ." <cha...@gm...> wrote: >> >> Hi Anthony, >> >> I changed the client.Log("message") line to be >> client.Log(LogEntry.new(:category => "test", :message => "This is a >> test message")); >> >> Now, I'm getting the following exception: >> /usr/local/lib/site_ruby/1.8/thrift/struct.rb:233:in >> `write_container': undefined method `size' for <LogEntry >> category:"test", message:"This is a test message">:LogEntry >> (NoMethodError) >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:113:in `write' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:69:in >> `each_field' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in `each' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in >> `each_field' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:109:in `write' >> from /usr/local/lib/site_ruby/1.8/thrift/client.rb:16:in >> `send_message' >> from ../src/gen-rb/scribe.rb:22:in `send_Log' >> from ../src/gen-rb/scribe.rb:17:in `Log' >> from rscribe_cat:18 >> >> I'm suspecting that the size method should not have been called on the >> LogEntry class but actually on the Thrift::Types::LIST class which is >> the type of the :element attribute of :message field of Log_args >> class. >> >> Can you please verify that this should actually be the case because in >> that case, it'll be a bug in Thrift rather than Scribe. >> >> Regards >> Chandranshu >> P.S.: I think I understand the source of bug. It is the following >> method in the Thrift::Struct class which is actually setting the >> message field to the LogEntry instance that I'm passing rather than >> creating a Thrift::LIST out of it. I didn't get time to check the >> Thrift.check_type method to see if it changes the 'value' parameter. >> def self.field_accessor(klass, *fields) >> fields.each do |field| >> klass.send :attr_reader, field >> klass.send :define_method, "#{field}=" do |value| >> Thrift.check_type(value, klass::FIELDS.values.find { |f| >> f[:name].to_s == field.to_s }, field) if Thrift.type_checking >> instance_variable_set("@#{field}", value) >> end >> end >> end >> >> On Tue, Nov 25, 2008 at 10:11 AM, Anthony Giardullo >> <an...@fa...> wrote: >>> Ok, it looks like your passing in a string to client.Log(). What you need >>> to pass in is a LogEntry. This class is defined in the thrift -generated >>> file scribe_types.rb. >>> >>> -Anthony >>> >>> >>> On 11/24/08 3:51 AM, "Chandranshu ." <cha...@gm...> wrote: >>> >>> Hi Anthony, >>> >>> I am using the following code to log the messages. I didn't find any >>> method to create a Log_Entry pair. >>> >>> The only methods I found were Log, send_Log and recv_Log. There are >>> other classes called Log_args and Log_result but I'm not sure how I >>> should be using them. Interestingly, there is the following line in >>> the Log_args class which is using LogEntry but I don't see where it >>> can find it: >>> MESSAGES => {:type => Thrift::Types::LIST, :name => 'messages', >>> :element => {:type => Thrift::Types::STRUCT, :class => LogEntry}} >>> >>> Regards >>> Chandranshu >>> >>> ========= rscribe_cat.rb =========== >>> >>> # include thrift-generated code >>> $:.push('../src/gen-rb') >>> >>> #require 'thrift/transport' >>> require 'thrift/transport/tsocket' >>> require 'thrift/protocol/tbinaryprotocol' >>> require 'thrift/server/tserver' >>> >>> require '../src/gen-rb/scribe' >>> >>> begin >>> socket = Thrift::Socket.new('localhost', 1463) >>> transport = Thrift::FramedTransport.new(socket) >>> protocol = Thrift::BinaryProtocol.new(transport) >>> client = Scribe::Client.new(protocol) >>> >>> transport.open() >>> client.Log(ARGV[1]); >>> >>> transport.close() >>> >>> rescue Thrift::Exception => tx >>> print 'Thrift::Exception: ', tx.message, "\\n" >>> end >>> >>> ============ rscribe_cat.rb ends ============ >>> >>> On Sat, Nov 22, 2008 at 8:09 AM, Anthony Giardullo <an...@fa...> >>> wrote: >>>> Chandranshu, >>>> >>>> Glad to see you figured out many of these issues getting the Ruby code >>>> generated. I am going to pass on your comments to our Thrift gurus. >>>> >>>> Quick question, can you show me how exactly you are calling your >>>> rscribe_cat >>>> script? Are you creating a Log_Entry pair with a category and message? >>>> >>>> -Anthony >>>> >>>> On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: >>>> >>>> Resending in plain text format: >>>> I'm trying to use a Ruby Client named rscribe_cat.rb to post messages >>>> to the scribed server started using the examples/example1.conf file >>>> that came with the distribution. The file is attached herewith. >>>> >>>> I'm summarizing the problems I faced in setting up Scribe for Ruby: >>>> >>>> 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line >>>> >>>> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >>>> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) >>>> >>>> with >>>> >>>> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >>>> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php >>>> --gen rb)) >>>> >>>> 2. Now run the following command from <SCRIBE_BASE> again: >>>> >>>> sudo make install >>>> >>>> Verify that a gen_rb folder has been created in the >>>> <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This >>>> file contains the ruby module that'll enable us to use it from inside >>>> ruby code. Also, add this path to $: in your Ruby Client. >>>> 3. However, the generated module contains the module name as scribe >>>> and trying to use it will result in Ruby complaining that >>>> >>>> ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT >>>> (SyntaxError) >>>> >>>> The leading ".." is because I was writing the ruby client in the >>>> examples directory. Open the "../src/gen-rb/scribe.rb" file and change >>>> the module name to be Scribe with a capital 'S'. >>>> 4. The next error you'll get is: >>>> >>>> ../src/gen-rb/scribe.rb:9:in `require': no such file to load >>>> -- FacebookService (LoadError) >>>> >>>> This is because when installing fb303, ruby classes were left >>>> out again. Generate the ruby classes for the fb303 service interface >>>> from the <FB303_BASE> directory: >>>> >>>> sudo thrift -o /usr/local/share -I /usr/local/share --gen rb >>>> if/fb303.thrift >>>> >>>> Unfortunately, ruby files in /usr/local/share are not picked up >>>> Ruby by default. So, you'll have to manually copy over the files to >>>> /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your >>>> machine. >>>> 5. The next error is the one that consumed most of my time: >>>> >>>> /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no >>>> such file to load -- >>>> /usr/local/lib/site_ruby/1.8/reflection_limited_types >>>> >>>> Looking at the code, I found that it was using >>>> File.dirname(FILE) to load the reflection_limited_types file. Bad for >>>> me. After a huge updatedb call, I was able to locate the corresponding >>>> thrift file. Use the following to remedy this: >>>> >>>> sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb >>>> /usr/local/share/thrift/if/reflection_limited.thrift >>>> >>>> and then copy out the files from the gen-rb directory to the >>>> /usr/local/lib/site_ruby/1.8 directory. After this point, you >>>> shouldn't get any more syntax errors. Though it'd be great if the ruby >>>> classes are also generated at the build time for Thrift, fb303 and >>>> scribe. I think generating the ruby classes for the >>>> thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and >>>> $(srcdir)/../if/scribe.thrift files and putting them in the right >>>> place should do. >>>> 6. What I'm still struggling with: >>>> >>>> >>>> /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in >>>> `read_message_begin': Missing version identifier >>>> (Thrift::ProtocolException) >>>> from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in >>>> `receive_message' >>>> >>>> from ../src/gen-rb/scribe.rb:26:in `recv_Log' >>>> from ../src/gen-rb/scribe.rb:18:in `Log' >>>> from rscribe_cat:18 >>>> >>>> If someone has solved this problem or if the developers can guide me >>>> as to what might be going wrong, I'll try and fix it and post a patch. >>>> >>>> Anyways, good framework Guys!! >>>> >>>> Thanks and regards, >>>> Chandranshu >>>> >>>> ------------------------------------------------------------------------- >>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>> challenge >>>> Build the coolest Linux based applications with Moblin SDK & win great >>>> prizes >>>> Grand prize is a trip for two to an Open Source event anywhere in the >>>> world >>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>> _______________________________________________ >>>> Scribeserver-users mailing list >>>> Scr...@li... >>>> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >>>> >>>> >>> >>> >> >> > |
From: Chandranshu . <cha...@gm...> - 2008-12-01 13:41:08
|
Hey Anthony, I got bogged down with some other work but was finally able to run Scribe with ruby today. I took some time debugging what was the version expected by the protocol and then actually probed the corresponding Python code. It appears that the ruby code generated by Thrift for Thrift::BinaryProtocol is outdated. Thankfully, the python code was very readable and helped me nail down the problem for once and all. The following comment in /usr/lib/python2.5/site-packages/thrift/protocol/TBinaryProtocol.py was especially helpful: # NastyHaxx. Python 2.4+ on 32-bit machines forces hex constants to be # positive, converting this into a long. If we hardcode the int value # instead it'll stay in 32 bit-land. I made the corresponding changes in /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb and things started to look good as I was getting some meaningful debug info for the first time. The I compared the `read_message_begin' method in this class with the Python version and pooh! The bug was right there staring straight into my eyes. Can you guys review and check-in the following code in the ruby branch: def read_message_begin version = read_i32 if(version <0) if (version & VERSION_MASK != VERSION_1) raise ProtocolException.new(ProtocolException::BAD_VERSION, 'Missing version identifier') end type = version & 0x000000ff name = read_string seqid = read_i32 else name = trans.readAll(version) type = read_byte seqid = read_i32 end [name, type, seqid] end Please note that this code does not check for a strict read condition that was used by Python to restrict the actions in the else section. I'll be benchmarking Scribe with Ruby day after tomorrow and will pass on the results. All help on performance tuning will be appreciated. Regards Chandranshu On Wed, Nov 26, 2008 at 7:34 PM, Chandranshu . <cha...@gm...> wrote: > Hi Anthony, > > Thanks for all your helpful suggestions. > I changed > client.Log(LogEntry.new(:category => "test", :message => "This is a > test message")); > to be > log_entry = LogEntry.new(:category => "test", :message => "This is a > test message") > client.Log([log_entry]) > > This ensured that the message reached the scribed server and got > logged with appropriate category. However, now I get the following > error: > /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in > `read_message_begin': Missing version identifier > (Thrift::ProtocolException) > from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in `receive_message' > from ../src/gen-rb/scribe.rb:26:in `recv_Log' > from ../src/gen-rb/scribe.rb:18:in `Log' > from rscribe_cat:19 > > I am still investigating why is this the case. If you can suggest > something, it'll be greatly helpful. > > Regards > Chandranshu > > > > On Wed, Nov 26, 2008 at 1:58 AM, Anthony Giardullo <an...@fa...> wrote: >> You are correct. Sorry, in my earlier email I should have you need to pass >> a *list* of LogEntry's when calling Log. See the declaration of the Log >> procedure in if/scribe.thrift. >> >> -Anthony >> >> On 11/25/08 7:19 AM, "Chandranshu ." <cha...@gm...> wrote: >> >> Hi Anthony, >> >> I changed the client.Log("message") line to be >> client.Log(LogEntry.new(:category => "test", :message => "This is a >> test message")); >> >> Now, I'm getting the following exception: >> /usr/local/lib/site_ruby/1.8/thrift/struct.rb:233:in >> `write_container': undefined method `size' for <LogEntry >> category:"test", message:"This is a test message">:LogEntry >> (NoMethodError) >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:113:in `write' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:69:in >> `each_field' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in `each' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in >> `each_field' >> from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:109:in `write' >> from /usr/local/lib/site_ruby/1.8/thrift/client.rb:16:in >> `send_message' >> from ../src/gen-rb/scribe.rb:22:in `send_Log' >> from ../src/gen-rb/scribe.rb:17:in `Log' >> from rscribe_cat:18 >> >> I'm suspecting that the size method should not have been called on the >> LogEntry class but actually on the Thrift::Types::LIST class which is >> the type of the :element attribute of :message field of Log_args >> class. >> >> Can you please verify that this should actually be the case because in >> that case, it'll be a bug in Thrift rather than Scribe. >> >> Regards >> Chandranshu >> P.S.: I think I understand the source of bug. It is the following >> method in the Thrift::Struct class which is actually setting the >> message field to the LogEntry instance that I'm passing rather than >> creating a Thrift::LIST out of it. I didn't get time to check the >> Thrift.check_type method to see if it changes the 'value' parameter. >> def self.field_accessor(klass, *fields) >> fields.each do |field| >> klass.send :attr_reader, field >> klass.send :define_method, "#{field}=" do |value| >> Thrift.check_type(value, klass::FIELDS.values.find { |f| >> f[:name].to_s == field.to_s }, field) if Thrift.type_checking >> instance_variable_set("@#{field}", value) >> end >> end >> end >> >> On Tue, Nov 25, 2008 at 10:11 AM, Anthony Giardullo >> <an...@fa...> wrote: >>> Ok, it looks like your passing in a string to client.Log(). What you need >>> to pass in is a LogEntry. This class is defined in the thrift -generated >>> file scribe_types.rb. >>> >>> -Anthony >>> >>> >>> On 11/24/08 3:51 AM, "Chandranshu ." <cha...@gm...> wrote: >>> >>> Hi Anthony, >>> >>> I am using the following code to log the messages. I didn't find any >>> method to create a Log_Entry pair. >>> >>> The only methods I found were Log, send_Log and recv_Log. There are >>> other classes called Log_args and Log_result but I'm not sure how I >>> should be using them. Interestingly, there is the following line in >>> the Log_args class which is using LogEntry but I don't see where it >>> can find it: >>> MESSAGES => {:type => Thrift::Types::LIST, :name => 'messages', >>> :element => {:type => Thrift::Types::STRUCT, :class => LogEntry}} >>> >>> Regards >>> Chandranshu >>> >>> ========= rscribe_cat.rb =========== >>> >>> # include thrift-generated code >>> $:.push('../src/gen-rb') >>> >>> #require 'thrift/transport' >>> require 'thrift/transport/tsocket' >>> require 'thrift/protocol/tbinaryprotocol' >>> require 'thrift/server/tserver' >>> >>> require '../src/gen-rb/scribe' >>> >>> begin >>> socket = Thrift::Socket.new('localhost', 1463) >>> transport = Thrift::FramedTransport.new(socket) >>> protocol = Thrift::BinaryProtocol.new(transport) >>> client = Scribe::Client.new(protocol) >>> >>> transport.open() >>> client.Log(ARGV[1]); >>> >>> transport.close() >>> >>> rescue Thrift::Exception => tx >>> print 'Thrift::Exception: ', tx.message, "\\n" >>> end >>> >>> ============ rscribe_cat.rb ends ============ >>> >>> On Sat, Nov 22, 2008 at 8:09 AM, Anthony Giardullo <an...@fa...> >>> wrote: >>>> Chandranshu, >>>> >>>> Glad to see you figured out many of these issues getting the Ruby code >>>> generated. I am going to pass on your comments to our Thrift gurus. >>>> >>>> Quick question, can you show me how exactly you are calling your >>>> rscribe_cat >>>> script? Are you creating a Log_Entry pair with a category and message? >>>> >>>> -Anthony >>>> >>>> On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: >>>> >>>> Resending in plain text format: >>>> I'm trying to use a Ruby Client named rscribe_cat.rb to post messages >>>> to the scribed server started using the examples/example1.conf file >>>> that came with the distribution. The file is attached herewith. >>>> >>>> I'm summarizing the problems I faced in setting up Scribe for Ruby: >>>> >>>> 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line >>>> >>>> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >>>> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) >>>> >>>> with >>>> >>>> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >>>> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php >>>> --gen rb)) >>>> >>>> 2. Now run the following command from <SCRIBE_BASE> again: >>>> >>>> sudo make install >>>> >>>> Verify that a gen_rb folder has been created in the >>>> <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This >>>> file contains the ruby module that'll enable us to use it from inside >>>> ruby code. Also, add this path to $: in your Ruby Client. >>>> 3. However, the generated module contains the module name as scribe >>>> and trying to use it will result in Ruby complaining that >>>> >>>> ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT >>>> (SyntaxError) >>>> >>>> The leading ".." is because I was writing the ruby client in the >>>> examples directory. Open the "../src/gen-rb/scribe.rb" file and change >>>> the module name to be Scribe with a capital 'S'. >>>> 4. The next error you'll get is: >>>> >>>> ../src/gen-rb/scribe.rb:9:in `require': no such file to load >>>> -- FacebookService (LoadError) >>>> >>>> This is because when installing fb303, ruby classes were left >>>> out again. Generate the ruby classes for the fb303 service interface >>>> from the <FB303_BASE> directory: >>>> >>>> sudo thrift -o /usr/local/share -I /usr/local/share --gen rb >>>> if/fb303.thrift >>>> >>>> Unfortunately, ruby files in /usr/local/share are not picked up >>>> Ruby by default. So, you'll have to manually copy over the files to >>>> /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your >>>> machine. >>>> 5. The next error is the one that consumed most of my time: >>>> >>>> /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no >>>> such file to load -- >>>> /usr/local/lib/site_ruby/1.8/reflection_limited_types >>>> >>>> Looking at the code, I found that it was using >>>> File.dirname(FILE) to load the reflection_limited_types file. Bad for >>>> me. After a huge updatedb call, I was able to locate the corresponding >>>> thrift file. Use the following to remedy this: >>>> >>>> sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb >>>> /usr/local/share/thrift/if/reflection_limited.thrift >>>> >>>> and then copy out the files from the gen-rb directory to the >>>> /usr/local/lib/site_ruby/1.8 directory. After this point, you >>>> shouldn't get any more syntax errors. Though it'd be great if the ruby >>>> classes are also generated at the build time for Thrift, fb303 and >>>> scribe. I think generating the ruby classes for the >>>> thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and >>>> $(srcdir)/../if/scribe.thrift files and putting them in the right >>>> place should do. >>>> 6. What I'm still struggling with: >>>> >>>> >>>> /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in >>>> `read_message_begin': Missing version identifier >>>> (Thrift::ProtocolException) >>>> from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in >>>> `receive_message' >>>> >>>> from ../src/gen-rb/scribe.rb:26:in `recv_Log' >>>> from ../src/gen-rb/scribe.rb:18:in `Log' >>>> from rscribe_cat:18 >>>> >>>> If someone has solved this problem or if the developers can guide me >>>> as to what might be going wrong, I'll try and fix it and post a patch. >>>> >>>> Anyways, good framework Guys!! >>>> >>>> Thanks and regards, >>>> Chandranshu >>>> >>>> ------------------------------------------------------------------------- >>>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>>> challenge >>>> Build the coolest Linux based applications with Moblin SDK & win great >>>> prizes >>>> Grand prize is a trip for two to an Open Source event anywhere in the >>>> world >>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>> _______________________________________________ >>>> Scribeserver-users mailing list >>>> Scr...@li... >>>> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >>>> >>>> >>> >>> >> >> > |
From: Chandranshu . <cha...@gm...> - 2008-11-26 14:04:11
|
Hi Anthony, Thanks for all your helpful suggestions. I changed client.Log(LogEntry.new(:category => "test", :message => "This is a test message")); to be log_entry = LogEntry.new(:category => "test", :message => "This is a test message") client.Log([log_entry]) This ensured that the message reached the scribed server and got logged with appropriate category. However, now I get the following error: /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in `read_message_begin': Missing version identifier (Thrift::ProtocolException) from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in `receive_message' from ../src/gen-rb/scribe.rb:26:in `recv_Log' from ../src/gen-rb/scribe.rb:18:in `Log' from rscribe_cat:19 I am still investigating why is this the case. If you can suggest something, it'll be greatly helpful. Regards Chandranshu On Wed, Nov 26, 2008 at 1:58 AM, Anthony Giardullo <an...@fa...> wrote: > You are correct. Sorry, in my earlier email I should have you need to pass > a *list* of LogEntry's when calling Log. See the declaration of the Log > procedure in if/scribe.thrift. > > -Anthony > > On 11/25/08 7:19 AM, "Chandranshu ." <cha...@gm...> wrote: > > Hi Anthony, > > I changed the client.Log("message") line to be > client.Log(LogEntry.new(:category => "test", :message => "This is a > test message")); > > Now, I'm getting the following exception: > /usr/local/lib/site_ruby/1.8/thrift/struct.rb:233:in > `write_container': undefined method `size' for <LogEntry > category:"test", message:"This is a test message">:LogEntry > (NoMethodError) > from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:113:in `write' > from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:69:in > `each_field' > from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in `each' > from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in > `each_field' > from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:109:in `write' > from /usr/local/lib/site_ruby/1.8/thrift/client.rb:16:in > `send_message' > from ../src/gen-rb/scribe.rb:22:in `send_Log' > from ../src/gen-rb/scribe.rb:17:in `Log' > from rscribe_cat:18 > > I'm suspecting that the size method should not have been called on the > LogEntry class but actually on the Thrift::Types::LIST class which is > the type of the :element attribute of :message field of Log_args > class. > > Can you please verify that this should actually be the case because in > that case, it'll be a bug in Thrift rather than Scribe. > > Regards > Chandranshu > P.S.: I think I understand the source of bug. It is the following > method in the Thrift::Struct class which is actually setting the > message field to the LogEntry instance that I'm passing rather than > creating a Thrift::LIST out of it. I didn't get time to check the > Thrift.check_type method to see if it changes the 'value' parameter. > def self.field_accessor(klass, *fields) > fields.each do |field| > klass.send :attr_reader, field > klass.send :define_method, "#{field}=" do |value| > Thrift.check_type(value, klass::FIELDS.values.find { |f| > f[:name].to_s == field.to_s }, field) if Thrift.type_checking > instance_variable_set("@#{field}", value) > end > end > end > > On Tue, Nov 25, 2008 at 10:11 AM, Anthony Giardullo > <an...@fa...> wrote: >> Ok, it looks like your passing in a string to client.Log(). What you need >> to pass in is a LogEntry. This class is defined in the thrift -generated >> file scribe_types.rb. >> >> -Anthony >> >> >> On 11/24/08 3:51 AM, "Chandranshu ." <cha...@gm...> wrote: >> >> Hi Anthony, >> >> I am using the following code to log the messages. I didn't find any >> method to create a Log_Entry pair. >> >> The only methods I found were Log, send_Log and recv_Log. There are >> other classes called Log_args and Log_result but I'm not sure how I >> should be using them. Interestingly, there is the following line in >> the Log_args class which is using LogEntry but I don't see where it >> can find it: >> MESSAGES => {:type => Thrift::Types::LIST, :name => 'messages', >> :element => {:type => Thrift::Types::STRUCT, :class => LogEntry}} >> >> Regards >> Chandranshu >> >> ========= rscribe_cat.rb =========== >> >> # include thrift-generated code >> $:.push('../src/gen-rb') >> >> #require 'thrift/transport' >> require 'thrift/transport/tsocket' >> require 'thrift/protocol/tbinaryprotocol' >> require 'thrift/server/tserver' >> >> require '../src/gen-rb/scribe' >> >> begin >> socket = Thrift::Socket.new('localhost', 1463) >> transport = Thrift::FramedTransport.new(socket) >> protocol = Thrift::BinaryProtocol.new(transport) >> client = Scribe::Client.new(protocol) >> >> transport.open() >> client.Log(ARGV[1]); >> >> transport.close() >> >> rescue Thrift::Exception => tx >> print 'Thrift::Exception: ', tx.message, "\\n" >> end >> >> ============ rscribe_cat.rb ends ============ >> >> On Sat, Nov 22, 2008 at 8:09 AM, Anthony Giardullo <an...@fa...> >> wrote: >>> Chandranshu, >>> >>> Glad to see you figured out many of these issues getting the Ruby code >>> generated. I am going to pass on your comments to our Thrift gurus. >>> >>> Quick question, can you show me how exactly you are calling your >>> rscribe_cat >>> script? Are you creating a Log_Entry pair with a category and message? >>> >>> -Anthony >>> >>> On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: >>> >>> Resending in plain text format: >>> I'm trying to use a Ruby Client named rscribe_cat.rb to post messages >>> to the scribed server started using the examples/example1.conf file >>> that came with the distribution. The file is attached herewith. >>> >>> I'm summarizing the problems I faced in setting up Scribe for Ruby: >>> >>> 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line >>> >>> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >>> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) >>> >>> with >>> >>> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >>> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php >>> --gen rb)) >>> >>> 2. Now run the following command from <SCRIBE_BASE> again: >>> >>> sudo make install >>> >>> Verify that a gen_rb folder has been created in the >>> <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This >>> file contains the ruby module that'll enable us to use it from inside >>> ruby code. Also, add this path to $: in your Ruby Client. >>> 3. However, the generated module contains the module name as scribe >>> and trying to use it will result in Ruby complaining that >>> >>> ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT >>> (SyntaxError) >>> >>> The leading ".." is because I was writing the ruby client in the >>> examples directory. Open the "../src/gen-rb/scribe.rb" file and change >>> the module name to be Scribe with a capital 'S'. >>> 4. The next error you'll get is: >>> >>> ../src/gen-rb/scribe.rb:9:in `require': no such file to load >>> -- FacebookService (LoadError) >>> >>> This is because when installing fb303, ruby classes were left >>> out again. Generate the ruby classes for the fb303 service interface >>> from the <FB303_BASE> directory: >>> >>> sudo thrift -o /usr/local/share -I /usr/local/share --gen rb >>> if/fb303.thrift >>> >>> Unfortunately, ruby files in /usr/local/share are not picked up >>> Ruby by default. So, you'll have to manually copy over the files to >>> /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your >>> machine. >>> 5. The next error is the one that consumed most of my time: >>> >>> /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no >>> such file to load -- >>> /usr/local/lib/site_ruby/1.8/reflection_limited_types >>> >>> Looking at the code, I found that it was using >>> File.dirname(FILE) to load the reflection_limited_types file. Bad for >>> me. After a huge updatedb call, I was able to locate the corresponding >>> thrift file. Use the following to remedy this: >>> >>> sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb >>> /usr/local/share/thrift/if/reflection_limited.thrift >>> >>> and then copy out the files from the gen-rb directory to the >>> /usr/local/lib/site_ruby/1.8 directory. After this point, you >>> shouldn't get any more syntax errors. Though it'd be great if the ruby >>> classes are also generated at the build time for Thrift, fb303 and >>> scribe. I think generating the ruby classes for the >>> thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and >>> $(srcdir)/../if/scribe.thrift files and putting them in the right >>> place should do. >>> 6. What I'm still struggling with: >>> >>> >>> /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in >>> `read_message_begin': Missing version identifier >>> (Thrift::ProtocolException) >>> from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in >>> `receive_message' >>> >>> from ../src/gen-rb/scribe.rb:26:in `recv_Log' >>> from ../src/gen-rb/scribe.rb:18:in `Log' >>> from rscribe_cat:18 >>> >>> If someone has solved this problem or if the developers can guide me >>> as to what might be going wrong, I'll try and fix it and post a patch. >>> >>> Anyways, good framework Guys!! >>> >>> Thanks and regards, >>> Chandranshu >>> >>> ------------------------------------------------------------------------- >>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>> challenge >>> Build the coolest Linux based applications with Moblin SDK & win great >>> prizes >>> Grand prize is a trip for two to an Open Source event anywhere in the >>> world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> Scribeserver-users mailing list >>> Scr...@li... >>> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >>> >>> >> >> > > |
From: Anthony G. <an...@fa...> - 2008-11-25 20:28:55
|
You are correct. Sorry, in my earlier email I should have you need to pass a *list* of LogEntry's when calling Log. See the declaration of the Log procedure in if/scribe.thrift. -Anthony On 11/25/08 7:19 AM, "Chandranshu ." <cha...@gm...> wrote: Hi Anthony, I changed the client.Log("message") line to be client.Log(LogEntry.new(:category => "test", :message => "This is a test message")); Now, I'm getting the following exception: /usr/local/lib/site_ruby/1.8/thrift/struct.rb:233:in `write_container': undefined method `size' for <LogEntry category:"test", message:"This is a test message">:LogEntry (NoMethodError) from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:113:in `write' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:69:in `each_field' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in `each' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in `each_field' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:109:in `write' from /usr/local/lib/site_ruby/1.8/thrift/client.rb:16:in `send_message' from ../src/gen-rb/scribe.rb:22:in `send_Log' from ../src/gen-rb/scribe.rb:17:in `Log' from rscribe_cat:18 I'm suspecting that the size method should not have been called on the LogEntry class but actually on the Thrift::Types::LIST class which is the type of the :element attribute of :message field of Log_args class. Can you please verify that this should actually be the case because in that case, it'll be a bug in Thrift rather than Scribe. Regards Chandranshu P.S.: I think I understand the source of bug. It is the following method in the Thrift::Struct class which is actually setting the message field to the LogEntry instance that I'm passing rather than creating a Thrift::LIST out of it. I didn't get time to check the Thrift.check_type method to see if it changes the 'value' parameter. def self.field_accessor(klass, *fields) fields.each do |field| klass.send :attr_reader, field klass.send :define_method, "#{field}=" do |value| Thrift.check_type(value, klass::FIELDS.values.find { |f| f[:name].to_s == field.to_s }, field) if Thrift.type_checking instance_variable_set("@#{field}", value) end end end On Tue, Nov 25, 2008 at 10:11 AM, Anthony Giardullo <an...@fa...> wrote: > Ok, it looks like your passing in a string to client.Log(). What you need > to pass in is a LogEntry. This class is defined in the thrift -generated > file scribe_types.rb. > > -Anthony > > > On 11/24/08 3:51 AM, "Chandranshu ." <cha...@gm...> wrote: > > Hi Anthony, > > I am using the following code to log the messages. I didn't find any > method to create a Log_Entry pair. > > The only methods I found were Log, send_Log and recv_Log. There are > other classes called Log_args and Log_result but I'm not sure how I > should be using them. Interestingly, there is the following line in > the Log_args class which is using LogEntry but I don't see where it > can find it: > MESSAGES => {:type => Thrift::Types::LIST, :name => 'messages', > :element => {:type => Thrift::Types::STRUCT, :class => LogEntry}} > > Regards > Chandranshu > > ========= rscribe_cat.rb =========== > > # include thrift-generated code > $:.push('../src/gen-rb') > > #require 'thrift/transport' > require 'thrift/transport/tsocket' > require 'thrift/protocol/tbinaryprotocol' > require 'thrift/server/tserver' > > require '../src/gen-rb/scribe' > > begin > socket = Thrift::Socket.new('localhost', 1463) > transport = Thrift::FramedTransport.new(socket) > protocol = Thrift::BinaryProtocol.new(transport) > client = Scribe::Client.new(protocol) > > transport.open() > client.Log(ARGV[1]); > > transport.close() > > rescue Thrift::Exception => tx > print 'Thrift::Exception: ', tx.message, "\\n" > end > > ============ rscribe_cat.rb ends ============ > > On Sat, Nov 22, 2008 at 8:09 AM, Anthony Giardullo <an...@fa...> > wrote: >> Chandranshu, >> >> Glad to see you figured out many of these issues getting the Ruby code >> generated. I am going to pass on your comments to our Thrift gurus. >> >> Quick question, can you show me how exactly you are calling your >> rscribe_cat >> script? Are you creating a Log_Entry pair with a category and message? >> >> -Anthony >> >> On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: >> >> Resending in plain text format: >> I'm trying to use a Ruby Client named rscribe_cat.rb to post messages >> to the scribed server started using the examples/example1.conf file >> that came with the distribution. The file is attached herewith. >> >> I'm summarizing the problems I faced in setting up Scribe for Ruby: >> >> 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line >> >> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) >> >> with >> >> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php >> --gen rb)) >> >> 2. Now run the following command from <SCRIBE_BASE> again: >> >> sudo make install >> >> Verify that a gen_rb folder has been created in the >> <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This >> file contains the ruby module that'll enable us to use it from inside >> ruby code. Also, add this path to $: in your Ruby Client. >> 3. However, the generated module contains the module name as scribe >> and trying to use it will result in Ruby complaining that >> >> ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT >> (SyntaxError) >> >> The leading ".." is because I was writing the ruby client in the >> examples directory. Open the "../src/gen-rb/scribe.rb" file and change >> the module name to be Scribe with a capital 'S'. >> 4. The next error you'll get is: >> >> ../src/gen-rb/scribe.rb:9:in `require': no such file to load >> -- FacebookService (LoadError) >> >> This is because when installing fb303, ruby classes were left >> out again. Generate the ruby classes for the fb303 service interface >> from the <FB303_BASE> directory: >> >> sudo thrift -o /usr/local/share -I /usr/local/share --gen rb >> if/fb303.thrift >> >> Unfortunately, ruby files in /usr/local/share are not picked up >> Ruby by default. So, you'll have to manually copy over the files to >> /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your >> machine. >> 5. The next error is the one that consumed most of my time: >> >> /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no >> such file to load -- >> /usr/local/lib/site_ruby/1.8/reflection_limited_types >> >> Looking at the code, I found that it was using >> File.dirname(FILE) to load the reflection_limited_types file. Bad for >> me. After a huge updatedb call, I was able to locate the corresponding >> thrift file. Use the following to remedy this: >> >> sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb >> /usr/local/share/thrift/if/reflection_limited.thrift >> >> and then copy out the files from the gen-rb directory to the >> /usr/local/lib/site_ruby/1.8 directory. After this point, you >> shouldn't get any more syntax errors. Though it'd be great if the ruby >> classes are also generated at the build time for Thrift, fb303 and >> scribe. I think generating the ruby classes for the >> thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and >> $(srcdir)/../if/scribe.thrift files and putting them in the right >> place should do. >> 6. What I'm still struggling with: >> >> /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in >> `read_message_begin': Missing version identifier >> (Thrift::ProtocolException) >> from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in >> `receive_message' >> >> from ../src/gen-rb/scribe.rb:26:in `recv_Log' >> from ../src/gen-rb/scribe.rb:18:in `Log' >> from rscribe_cat:18 >> >> If someone has solved this problem or if the developers can guide me >> as to what might be going wrong, I'll try and fix it and post a patch. >> >> Anyways, good framework Guys!! >> >> Thanks and regards, >> Chandranshu >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Scribeserver-users mailing list >> Scr...@li... >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >> >> > > |
From: Chandranshu . <cha...@gm...> - 2008-11-25 15:19:55
|
Hi Anthony, I changed the client.Log("message") line to be client.Log(LogEntry.new(:category => "test", :message => "This is a test message")); Now, I'm getting the following exception: /usr/local/lib/site_ruby/1.8/thrift/struct.rb:233:in `write_container': undefined method `size' for <LogEntry category:"test", message:"This is a test message">:LogEntry (NoMethodError) from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:113:in `write' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:69:in `each_field' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in `each' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:68:in `each_field' from /usr/local/lib/site_ruby/1.8/thrift/struct.rb:109:in `write' from /usr/local/lib/site_ruby/1.8/thrift/client.rb:16:in `send_message' from ../src/gen-rb/scribe.rb:22:in `send_Log' from ../src/gen-rb/scribe.rb:17:in `Log' from rscribe_cat:18 I'm suspecting that the size method should not have been called on the LogEntry class but actually on the Thrift::Types::LIST class which is the type of the :element attribute of :message field of Log_args class. Can you please verify that this should actually be the case because in that case, it'll be a bug in Thrift rather than Scribe. Regards Chandranshu P.S.: I think I understand the source of bug. It is the following method in the Thrift::Struct class which is actually setting the message field to the LogEntry instance that I'm passing rather than creating a Thrift::LIST out of it. I didn't get time to check the Thrift.check_type method to see if it changes the 'value' parameter. def self.field_accessor(klass, *fields) fields.each do |field| klass.send :attr_reader, field klass.send :define_method, "#{field}=" do |value| Thrift.check_type(value, klass::FIELDS.values.find { |f| f[:name].to_s == field.to_s }, field) if Thrift.type_checking instance_variable_set("@#{field}", value) end end end On Tue, Nov 25, 2008 at 10:11 AM, Anthony Giardullo <an...@fa...> wrote: > Ok, it looks like your passing in a string to client.Log(). What you need > to pass in is a LogEntry. This class is defined in the thrift -generated > file scribe_types.rb. > > -Anthony > > > On 11/24/08 3:51 AM, "Chandranshu ." <cha...@gm...> wrote: > > Hi Anthony, > > I am using the following code to log the messages. I didn't find any > method to create a Log_Entry pair. > > The only methods I found were Log, send_Log and recv_Log. There are > other classes called Log_args and Log_result but I'm not sure how I > should be using them. Interestingly, there is the following line in > the Log_args class which is using LogEntry but I don't see where it > can find it: > MESSAGES => {:type => Thrift::Types::LIST, :name => 'messages', > :element => {:type => Thrift::Types::STRUCT, :class => LogEntry}} > > Regards > Chandranshu > > ========= rscribe_cat.rb =========== > > # include thrift-generated code > $:.push('../src/gen-rb') > > #require 'thrift/transport' > require 'thrift/transport/tsocket' > require 'thrift/protocol/tbinaryprotocol' > require 'thrift/server/tserver' > > require '../src/gen-rb/scribe' > > begin > socket = Thrift::Socket.new('localhost', 1463) > transport = Thrift::FramedTransport.new(socket) > protocol = Thrift::BinaryProtocol.new(transport) > client = Scribe::Client.new(protocol) > > transport.open() > client.Log(ARGV[1]); > > transport.close() > > rescue Thrift::Exception => tx > print 'Thrift::Exception: ', tx.message, "\\n" > end > > ============ rscribe_cat.rb ends ============ > > On Sat, Nov 22, 2008 at 8:09 AM, Anthony Giardullo <an...@fa...> > wrote: >> Chandranshu, >> >> Glad to see you figured out many of these issues getting the Ruby code >> generated. I am going to pass on your comments to our Thrift gurus. >> >> Quick question, can you show me how exactly you are calling your >> rscribe_cat >> script? Are you creating a Log_Entry pair with a category and message? >> >> -Anthony >> >> On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: >> >> Resending in plain text format: >> I'm trying to use a Ruby Client named rscribe_cat.rb to post messages >> to the scribed server started using the examples/example1.conf file >> that came with the distribution. The file is attached herewith. >> >> I'm summarizing the problems I faced in setting up Scribe for Ruby: >> >> 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line >> >> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) >> >> with >> >> $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, >> -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php >> --gen rb)) >> >> 2. Now run the following command from <SCRIBE_BASE> again: >> >> sudo make install >> >> Verify that a gen_rb folder has been created in the >> <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This >> file contains the ruby module that'll enable us to use it from inside >> ruby code. Also, add this path to $: in your Ruby Client. >> 3. However, the generated module contains the module name as scribe >> and trying to use it will result in Ruby complaining that >> >> ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT >> (SyntaxError) >> >> The leading ".." is because I was writing the ruby client in the >> examples directory. Open the "../src/gen-rb/scribe.rb" file and change >> the module name to be Scribe with a capital 'S'. >> 4. The next error you'll get is: >> >> ../src/gen-rb/scribe.rb:9:in `require': no such file to load >> -- FacebookService (LoadError) >> >> This is because when installing fb303, ruby classes were left >> out again. Generate the ruby classes for the fb303 service interface >> from the <FB303_BASE> directory: >> >> sudo thrift -o /usr/local/share -I /usr/local/share --gen rb >> if/fb303.thrift >> >> Unfortunately, ruby files in /usr/local/share are not picked up >> Ruby by default. So, you'll have to manually copy over the files to >> /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your >> machine. >> 5. The next error is the one that consumed most of my time: >> >> /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no >> such file to load -- >> /usr/local/lib/site_ruby/1.8/reflection_limited_types >> >> Looking at the code, I found that it was using >> File.dirname(FILE) to load the reflection_limited_types file. Bad for >> me. After a huge updatedb call, I was able to locate the corresponding >> thrift file. Use the following to remedy this: >> >> sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb >> /usr/local/share/thrift/if/reflection_limited.thrift >> >> and then copy out the files from the gen-rb directory to the >> /usr/local/lib/site_ruby/1.8 directory. After this point, you >> shouldn't get any more syntax errors. Though it'd be great if the ruby >> classes are also generated at the build time for Thrift, fb303 and >> scribe. I think generating the ruby classes for the >> thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and >> $(srcdir)/../if/scribe.thrift files and putting them in the right >> place should do. >> 6. What I'm still struggling with: >> >> /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in >> `read_message_begin': Missing version identifier >> (Thrift::ProtocolException) >> from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in >> `receive_message' >> >> from ../src/gen-rb/scribe.rb:26:in `recv_Log' >> from ../src/gen-rb/scribe.rb:18:in `Log' >> from rscribe_cat:18 >> >> If someone has solved this problem or if the developers can guide me >> as to what might be going wrong, I'll try and fix it and post a patch. >> >> Anyways, good framework Guys!! >> >> Thanks and regards, >> Chandranshu >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Scribeserver-users mailing list >> Scr...@li... >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >> >> > > |
From: Anthony G. <an...@fa...> - 2008-11-25 04:42:18
|
Ok, it looks like your passing in a string to client.Log(). What you need to pass in is a LogEntry. This class is defined in the thrift -generated file scribe_types.rb. -Anthony On 11/24/08 3:51 AM, "Chandranshu ." <cha...@gm...> wrote: Hi Anthony, I am using the following code to log the messages. I didn't find any method to create a Log_Entry pair. The only methods I found were Log, send_Log and recv_Log. There are other classes called Log_args and Log_result but I'm not sure how I should be using them. Interestingly, there is the following line in the Log_args class which is using LogEntry but I don't see where it can find it: MESSAGES => {:type => Thrift::Types::LIST, :name => 'messages', :element => {:type => Thrift::Types::STRUCT, :class => LogEntry}} Regards Chandranshu ========= rscribe_cat.rb =========== # include thrift-generated code $:.push('../src/gen-rb') #require 'thrift/transport' require 'thrift/transport/tsocket' require 'thrift/protocol/tbinaryprotocol' require 'thrift/server/tserver' require '../src/gen-rb/scribe' begin socket = Thrift::Socket.new('localhost', 1463) transport = Thrift::FramedTransport.new(socket) protocol = Thrift::BinaryProtocol.new(transport) client = Scribe::Client.new(protocol) transport.open() client.Log(ARGV[1]); transport.close() rescue Thrift::Exception => tx print 'Thrift::Exception: ', tx.message, "\\n" end ============ rscribe_cat.rb ends ============ On Sat, Nov 22, 2008 at 8:09 AM, Anthony Giardullo <an...@fa...> wrote: > Chandranshu, > > Glad to see you figured out many of these issues getting the Ruby code > generated. I am going to pass on your comments to our Thrift gurus. > > Quick question, can you show me how exactly you are calling your rscribe_cat > script? Are you creating a Log_Entry pair with a category and message? > > -Anthony > > On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: > > Resending in plain text format: > I'm trying to use a Ruby Client named rscribe_cat.rb to post messages > to the scribed server started using the examples/example1.conf file > that came with the distribution. The file is attached herewith. > > I'm summarizing the problems I faced in setting up Scribe for Ruby: > > 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line > > $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, > -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) > > with > > $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, > -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php > --gen rb)) > > 2. Now run the following command from <SCRIBE_BASE> again: > > sudo make install > > Verify that a gen_rb folder has been created in the > <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This > file contains the ruby module that'll enable us to use it from inside > ruby code. Also, add this path to $: in your Ruby Client. > 3. However, the generated module contains the module name as scribe > and trying to use it will result in Ruby complaining that > > ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT > (SyntaxError) > > The leading ".." is because I was writing the ruby client in the > examples directory. Open the "../src/gen-rb/scribe.rb" file and change > the module name to be Scribe with a capital 'S'. > 4. The next error you'll get is: > > ../src/gen-rb/scribe.rb:9:in `require': no such file to load > -- FacebookService (LoadError) > > This is because when installing fb303, ruby classes were left > out again. Generate the ruby classes for the fb303 service interface > from the <FB303_BASE> directory: > > sudo thrift -o /usr/local/share -I /usr/local/share --gen rb > if/fb303.thrift > > Unfortunately, ruby files in /usr/local/share are not picked up > Ruby by default. So, you'll have to manually copy over the files to > /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your > machine. > 5. The next error is the one that consumed most of my time: > > /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no > such file to load -- > /usr/local/lib/site_ruby/1.8/reflection_limited_types > > Looking at the code, I found that it was using > File.dirname(FILE) to load the reflection_limited_types file. Bad for > me. After a huge updatedb call, I was able to locate the corresponding > thrift file. Use the following to remedy this: > > sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb > /usr/local/share/thrift/if/reflection_limited.thrift > > and then copy out the files from the gen-rb directory to the > /usr/local/lib/site_ruby/1.8 directory. After this point, you > shouldn't get any more syntax errors. Though it'd be great if the ruby > classes are also generated at the build time for Thrift, fb303 and > scribe. I think generating the ruby classes for the > thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and > $(srcdir)/../if/scribe.thrift files and putting them in the right > place should do. > 6. What I'm still struggling with: > > /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in > `read_message_begin': Missing version identifier > (Thrift::ProtocolException) > from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in > `receive_message' > > from ../src/gen-rb/scribe.rb:26:in `recv_Log' > from ../src/gen-rb/scribe.rb:18:in `Log' > from rscribe_cat:18 > > If someone has solved this problem or if the developers can guide me > as to what might be going wrong, I'll try and fix it and post a patch. > > Anyways, good framework Guys!! > > Thanks and regards, > Chandranshu > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Scribeserver-users mailing list > Scr...@li... > https://lists.sourceforge.net/lists/listinfo/scribeserver-users > > |
From: Dhruba B. <dh...@gm...> - 2008-11-24 20:31:31
|
Chukwa has the capability to handle HDFS downtimes. The period of the downtime depends on the amount of data being written into Chukwa and the amount of local storage configured to store it on the chukwa servers. I do not know of a benchmark that demonstrates/triggers this scenario. thanks, dhruba On Mon, Nov 24, 2008 at 12:26 PM, Joydeep Sen Sarma <js...@fa...>wrote: > Did the (potential) issue of a prolonged hdfs downtime come up in Chukwa > design? > > > ------------------------------ > > *From:* Dhruba Borthakur > *Sent:* Thursday, November 20, 2008 5:30 PM > *To:* Ian Holsman; Joydeep Sen Sarma > *Cc:* scr...@li...; Rodrigo Schmidt; > dh...@ap... > > *Subject:* Re: [Scribeserver-users] Scribe and Hadoop > > > > Hi Ian, > > I personally havn't had a chance (yet) to play around with Chukwa. But the > design goals of Chukwa are such that it should precisely be solving the > problem you are mentioning. It is a log aggregation service, so in a sense, > it is similar to Scribe. Scribe has been in prooduction here at Facebook for > a couple of years. I have heard that Yahoo has started using Chukwa to > collect logs of appliccations that run on Hadoop. > > In your existing solution, you would end up creating lots of temporary > small files in HDFS. In the chukway architecture, the chukwa servers log > data into their own local disk and periodically upload data to HDFS. It also > can multiplex different log streams into the same HDFS file. > > Hope this helps, > Thanks, > dhruba > > On 11/20/08 5:15 PM, "Ian Holsman" <li...@ho...> wrote: > > Joydeep Sen Sarma wrote: > > Dhruba can shed more light on chukwa - I haven't looked at it myself. > > > > Does ur mail imply that the log files are being tailed and written out to > hdfs periodically (by an application outside scribe?). If so - this is not > so different from what we do (except there's more code to deal with catchups > etc.). > > > > > we're not using scribe at the moment (it & chukwa weren't there when we > started), but am investigating moving to a more widely used solution. > > and yes... > we're using something called 'logtail' > http://www.drxyzzy.org/ntlog/logtail.c which remembers where it was the > last time it was run, and does a seek() into the logfile and continues > from that point, there is a bit of log-rotation logic which goes on so > it doesn't miss something if it was stopped. > > This stream is then piped into a piece of code that runs on the > webserver that writes it into hdfs, switching the filename every 15m ( > making sure it is unique etc) > the downside is that we create files like crazy on HDFS. 4 x # of > webservers per hour, each about 30-180Mb each (which is small imho for a > file in hdfs). > > hence why are looking at doing something else ;-) > > -----Original Message----- > > From: Ian Holsman [mailto:li...@ho... <li...@ho...>] > > Sent: Thursday, November 20, 2008 4:41 PM > > To: Joydeep Sen Sarma > > Cc: scr...@li...; Dhruba Borthakur; Rodrigo > Schmidt > > Subject: Re: [Scribeserver-users] Scribe and Hadoop > > > > Hi Joydeep. > > > > we currently are just doing the naivé approach writing log files > > directly into hadoop to individual files, rotating them every 15minutes > > to avoid the append problem. We used logtail on the client side to > > de-couple the system and a map/red job which then aggregates the info > > 10-30 minutes later. > > > > I was wondering if you had seen the recent contribution to hadoop called > > 'chukwa', and what your thoughts were on it. > > > > personally i'm looking at scribe (and chukwa) for realtime logging and > > decision systems. > > > > Joydeep Sen Sarma wrote: > > > >> Hi folks, > >> > >> Can shed some light on scribe and hdfs/hadoop integration at FB: > >> > >> - when we (actually Avinash - who's leading the Cassandra project now) > >> started out - we investigated writing log files from scribe directly > >> to hdfs (using libhdfs c++ api). However there were a few issues with > >> this approach that steered us in a different direction: > >> > >> o hdfs uptime: there have been periods of sustained downtime and we > >> can't rule that out in the future. There are many reasons - software > >> upgrades being the most common. Buffering data in scribe for such > >> large periods didn't seem like a very good route > >> > >> o lack of append support in hdfs in early days > >> > >> o desire to build loosely coupled systems (otherwise we would have to > >> upgrade scribe servers with new libhdfs every time we had a software > >> upgrade on hdfs) > >> > >> o flexibility in transforming data while copying into hdfs (more on > >> this later) > >> > >> - currently we have a rsync like model to pull data from scribe to hdfs: > >> > >> o scribe writes data to netapp filers. These filers are high speed > >> buffers for the most part > >> > >> o we have 'copier' jobs that 'pull' data from scribe output locations > >> in these filers to hdfs. They maintain file offsets for copied data in > >> a registry - so that these jobs can be periodically invoked so that > >> continuous copying can happen. > >> > >> o 'copier' jobs can run in continous mode - or can be invoked to copy > >> (or re-copy) data from older dates (this can be important if incorrect > >> data was logged or data shows up late) > >> > >> o 'copier' jobs are map-only jobs in hadoop - this means that we can > >> increase the copy parallelism if required. For example - if we are > >> falling behind or hdfs was down for long time and there's a lot of > >> accumulated data - the copiers will dial up the parallelism (up to a > >> maximum - so as not to trip the filers up completely). > >> > >> - data 'copied' into hdfs - is eventually 'loaded' into Hive (this is > >> our open source date warehousing layer on top of Hadoop). Usually this > >> loading is a nightly process - but in some small number of cases - we > >> load data at hourly granularity for semi-real-time applications. > >> Application processing over scribe log sets is typically using Hive QL. > >> > >> - one interesting angle is 'close of books'. Scribe itself does not > >> provide any hard guarantees on when data for a given date will be > >> logged by. However several applications (especially revenue sensitive > >> ones) need a hard deadline (invoke me when all data for a given day > >> has been logged). For such applications - the loading process > >> typically waits until 2am or so in the night (on day N+1) and then > >> scans data from day N-1, N, N+1 to find all the relevant data for day > >> N (using unix timestamps that are typically logged with the data). > >> This is the data that's loaded into date partition N for the relevant > >> hive table. Clearly the 2am boundary is arbitrary and we will move > >> towards more heuristic based ways of determining when data for a given > >> date is (almost) complete. > >> > >> - we have instances of text, json and thrift data sets logged via > >> scribe. For the case of thrift (particularly when there's a thrift > >> file with heterogenous records) - we do some transforms in the copying > >> process to make the subsequent loading easier. Thrift data also shows > >> up as TFileTransport format - and this cannot be parallel processed by > >> Hadoop natively (although it wouldn't be so hard to arrange that as > >> well) - so we always convert thrift data into sequencefiles as it's > >> copied into hadoop. > >> > >> there are several pieces here that are not open sourced - and > >> depending on community interest can be made available. The scribe to > >> hdfs copier code for one. TFileTransport's java implementation is also > >> not open sourced (since there is constant talk of superseding it with > >> newer better transports). > >> > >> Please let us know if there are more questions and would be happy to > >> answer. > >> > >> Joydeep > >> > >> ------ Forwarded Message > >> *From: *Johan Oskarsson <jo...@os...> > >> *Date: *Wed, 19 Nov 2008 09:36:38 -0800 > >> *To: *<scr...@li...> > >> *Subject: *[Scribeserver-users] Scribe and Hadoop > >> > >> I understand Scribe is being used to put logs into the Hadoop HDFS at > >> Facebook. I'd love to hear more about how that works and how to > >> replicate the setup you guys have. > >> > >> /Johan > >> > >> > ------------------------------------------------------------------------- > >> This SF.Net email is sponsored by the Moblin Your Move Developer's > >> challenge > >> Build the coolest Linux based applications with Moblin SDK & win great > >> prizes > >> Grand prize is a trip for two to an Open Source event anywhere in the > >> world > >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > >> _______________________________________________ > >> Scribeserver-users mailing list > >> Scr...@li... > >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users > >> > >> > >> ------ End of Forwarded Message > >> > >> ------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------- > >> This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > >> Build the coolest Linux based applications with Moblin SDK & win great > prizes > >> Grand prize is a trip for two to an Open Source event anywhere in the > world > >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >> ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Scribeserver-users mailing list > >> Scr...@li... > >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users > >> > >> > > > > > > > > |
From: Joydeep S. S. <js...@fa...> - 2008-11-24 20:27:03
|
Did the (potential) issue of a prolonged hdfs downtime come up in Chukwa design? ________________________________ From: Dhruba Borthakur Sent: Thursday, November 20, 2008 5:30 PM To: Ian Holsman; Joydeep Sen Sarma Cc: scr...@li...; Rodrigo Schmidt; dh...@ap... Subject: Re: [Scribeserver-users] Scribe and Hadoop Hi Ian, I personally havn't had a chance (yet) to play around with Chukwa. But the design goals of Chukwa are such that it should precisely be solving the problem you are mentioning. It is a log aggregation service, so in a sense, it is similar to Scribe. Scribe has been in prooduction here at Facebook for a couple of years. I have heard that Yahoo has started using Chukwa to collect logs of appliccations that run on Hadoop. In your existing solution, you would end up creating lots of temporary small files in HDFS. In the chukway architecture, the chukwa servers log data into their own local disk and periodically upload data to HDFS. It also can multiplex different log streams into the same HDFS file. Hope this helps, Thanks, dhruba On 11/20/08 5:15 PM, "Ian Holsman" <li...@ho...> wrote: Joydeep Sen Sarma wrote: > Dhruba can shed more light on chukwa - I haven't looked at it myself. > > Does ur mail imply that the log files are being tailed and written out to hdfs periodically (by an application outside scribe?). If so - this is not so different from what we do (except there's more code to deal with catchups etc.). > > we're not using scribe at the moment (it & chukwa weren't there when we started), but am investigating moving to a more widely used solution. and yes... we're using something called 'logtail' http://www.drxyzzy.org/ntlog/logtail.c which remembers where it was the last time it was run, and does a seek() into the logfile and continues from that point, there is a bit of log-rotation logic which goes on so it doesn't miss something if it was stopped. This stream is then piped into a piece of code that runs on the webserver that writes it into hdfs, switching the filename every 15m ( making sure it is unique etc) the downside is that we create files like crazy on HDFS. 4 x # of webservers per hour, each about 30-180Mb each (which is small imho for a file in hdfs). hence why are looking at doing something else ;-) > -----Original Message----- > From: Ian Holsman [mailto:li...@ho...] > Sent: Thursday, November 20, 2008 4:41 PM > To: Joydeep Sen Sarma > Cc: scr...@li...; Dhruba Borthakur; Rodrigo Schmidt > Subject: Re: [Scribeserver-users] Scribe and Hadoop > > Hi Joydeep. > > we currently are just doing the naivé approach writing log files > directly into hadoop to individual files, rotating them every 15minutes > to avoid the append problem. We used logtail on the client side to > de-couple the system and a map/red job which then aggregates the info > 10-30 minutes later. > > I was wondering if you had seen the recent contribution to hadoop called > 'chukwa', and what your thoughts were on it. > > personally i'm looking at scribe (and chukwa) for realtime logging and > decision systems. > > Joydeep Sen Sarma wrote: > >> Hi folks, >> >> Can shed some light on scribe and hdfs/hadoop integration at FB: >> >> - when we (actually Avinash - who's leading the Cassandra project now) >> started out - we investigated writing log files from scribe directly >> to hdfs (using libhdfs c++ api). However there were a few issues with >> this approach that steered us in a different direction: >> >> o hdfs uptime: there have been periods of sustained downtime and we >> can't rule that out in the future. There are many reasons - software >> upgrades being the most common. Buffering data in scribe for such >> large periods didn't seem like a very good route >> >> o lack of append support in hdfs in early days >> >> o desire to build loosely coupled systems (otherwise we would have to >> upgrade scribe servers with new libhdfs every time we had a software >> upgrade on hdfs) >> >> o flexibility in transforming data while copying into hdfs (more on >> this later) >> >> - currently we have a rsync like model to pull data from scribe to hdfs: >> >> o scribe writes data to netapp filers. These filers are high speed >> buffers for the most part >> >> o we have 'copier' jobs that 'pull' data from scribe output locations >> in these filers to hdfs. They maintain file offsets for copied data in >> a registry - so that these jobs can be periodically invoked so that >> continuous copying can happen. >> >> o 'copier' jobs can run in continous mode - or can be invoked to copy >> (or re-copy) data from older dates (this can be important if incorrect >> data was logged or data shows up late) >> >> o 'copier' jobs are map-only jobs in hadoop - this means that we can >> increase the copy parallelism if required. For example - if we are >> falling behind or hdfs was down for long time and there's a lot of >> accumulated data - the copiers will dial up the parallelism (up to a >> maximum - so as not to trip the filers up completely). >> >> - data 'copied' into hdfs - is eventually 'loaded' into Hive (this is >> our open source date warehousing layer on top of Hadoop). Usually this >> loading is a nightly process - but in some small number of cases - we >> load data at hourly granularity for semi-real-time applications. >> Application processing over scribe log sets is typically using Hive QL. >> >> - one interesting angle is 'close of books'. Scribe itself does not >> provide any hard guarantees on when data for a given date will be >> logged by. However several applications (especially revenue sensitive >> ones) need a hard deadline (invoke me when all data for a given day >> has been logged). For such applications - the loading process >> typically waits until 2am or so in the night (on day N+1) and then >> scans data from day N-1, N, N+1 to find all the relevant data for day >> N (using unix timestamps that are typically logged with the data). >> This is the data that's loaded into date partition N for the relevant >> hive table. Clearly the 2am boundary is arbitrary and we will move >> towards more heuristic based ways of determining when data for a given >> date is (almost) complete. >> >> - we have instances of text, json and thrift data sets logged via >> scribe. For the case of thrift (particularly when there's a thrift >> file with heterogenous records) - we do some transforms in the copying >> process to make the subsequent loading easier. Thrift data also shows >> up as TFileTransport format - and this cannot be parallel processed by >> Hadoop natively (although it wouldn't be so hard to arrange that as >> well) - so we always convert thrift data into sequencefiles as it's >> copied into hadoop. >> >> there are several pieces here that are not open sourced - and >> depending on community interest can be made available. The scribe to >> hdfs copier code for one. TFileTransport's java implementation is also >> not open sourced (since there is constant talk of superseding it with >> newer better transports). >> >> Please let us know if there are more questions and would be happy to >> answer. >> >> Joydeep >> >> ------ Forwarded Message >> *From: *Johan Oskarsson <jo...@os...> >> *Date: *Wed, 19 Nov 2008 09:36:38 -0800 >> *To: *<scr...@li...> >> *Subject: *[Scribeserver-users] Scribe and Hadoop >> >> I understand Scribe is being used to put logs into the Hadoop HDFS at >> Facebook. I'd love to hear more about how that works and how to >> replicate the setup you guys have. >> >> /Johan >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> _______________________________________________ >> Scribeserver-users mailing list >> Scr...@li... >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >> >> >> ------ End of Forwarded Message >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Scribeserver-users mailing list >> Scr...@li... >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >> >> > > > |
From: Chandranshu . <cha...@gm...> - 2008-11-24 11:51:49
|
Hi Anthony, I am using the following code to log the messages. I didn't find any method to create a Log_Entry pair. The only methods I found were Log, send_Log and recv_Log. There are other classes called Log_args and Log_result but I'm not sure how I should be using them. Interestingly, there is the following line in the Log_args class which is using LogEntry but I don't see where it can find it: MESSAGES => {:type => Thrift::Types::LIST, :name => 'messages', :element => {:type => Thrift::Types::STRUCT, :class => LogEntry}} Regards Chandranshu ========= rscribe_cat.rb =========== # include thrift-generated code $:.push('../src/gen-rb') #require 'thrift/transport' require 'thrift/transport/tsocket' require 'thrift/protocol/tbinaryprotocol' require 'thrift/server/tserver' require '../src/gen-rb/scribe' begin socket = Thrift::Socket.new('localhost', 1463) transport = Thrift::FramedTransport.new(socket) protocol = Thrift::BinaryProtocol.new(transport) client = Scribe::Client.new(protocol) transport.open() client.Log(ARGV[1]); transport.close() rescue Thrift::Exception => tx print 'Thrift::Exception: ', tx.message, "\\n" end ============ rscribe_cat.rb ends ============ On Sat, Nov 22, 2008 at 8:09 AM, Anthony Giardullo <an...@fa...> wrote: > Chandranshu, > > Glad to see you figured out many of these issues getting the Ruby code > generated. I am going to pass on your comments to our Thrift gurus. > > Quick question, can you show me how exactly you are calling your rscribe_cat > script? Are you creating a Log_Entry pair with a category and message? > > -Anthony > > On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: > > Resending in plain text format: > I'm trying to use a Ruby Client named rscribe_cat.rb to post messages > to the scribed server started using the examples/example1.conf file > that came with the distribution. The file is attached herewith. > > I'm summarizing the problems I faced in setting up Scribe for Ruby: > > 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line > > $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, > -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) > > with > > $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, > -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php > --gen rb)) > > 2. Now run the following command from <SCRIBE_BASE> again: > > sudo make install > > Verify that a gen_rb folder has been created in the > <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This > file contains the ruby module that'll enable us to use it from inside > ruby code. Also, add this path to $: in your Ruby Client. > 3. However, the generated module contains the module name as scribe > and trying to use it will result in Ruby complaining that > > ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT > (SyntaxError) > > The leading ".." is because I was writing the ruby client in the > examples directory. Open the "../src/gen-rb/scribe.rb" file and change > the module name to be Scribe with a capital 'S'. > 4. The next error you'll get is: > > ../src/gen-rb/scribe.rb:9:in `require': no such file to load > -- FacebookService (LoadError) > > This is because when installing fb303, ruby classes were left > out again. Generate the ruby classes for the fb303 service interface > from the <FB303_BASE> directory: > > sudo thrift -o /usr/local/share -I /usr/local/share --gen rb > if/fb303.thrift > > Unfortunately, ruby files in /usr/local/share are not picked up > Ruby by default. So, you'll have to manually copy over the files to > /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your > machine. > 5. The next error is the one that consumed most of my time: > > /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no > such file to load -- > /usr/local/lib/site_ruby/1.8/reflection_limited_types > > Looking at the code, I found that it was using > File.dirname(FILE) to load the reflection_limited_types file. Bad for > me. After a huge updatedb call, I was able to locate the corresponding > thrift file. Use the following to remedy this: > > sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb > /usr/local/share/thrift/if/reflection_limited.thrift > > and then copy out the files from the gen-rb directory to the > /usr/local/lib/site_ruby/1.8 directory. After this point, you > shouldn't get any more syntax errors. Though it'd be great if the ruby > classes are also generated at the build time for Thrift, fb303 and > scribe. I think generating the ruby classes for the > thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and > $(srcdir)/../if/scribe.thrift files and putting them in the right > place should do. > 6. What I'm still struggling with: > > /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in > `read_message_begin': Missing version identifier > (Thrift::ProtocolException) > from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in > `receive_message' > > from ../src/gen-rb/scribe.rb:26:in `recv_Log' > from ../src/gen-rb/scribe.rb:18:in `Log' > from rscribe_cat:18 > > If someone has solved this problem or if the developers can guide me > as to what might be going wrong, I'll try and fix it and post a patch. > > Anyways, good framework Guys!! > > Thanks and regards, > Chandranshu > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Scribeserver-users mailing list > Scr...@li... > https://lists.sourceforge.net/lists/listinfo/scribeserver-users > > |
From: Anthony G. <an...@fa...> - 2008-11-22 02:40:16
|
Chandranshu, Glad to see you figured out many of these issues getting the Ruby code generated. I am going to pass on your comments to our Thrift gurus. Quick question, can you show me how exactly you are calling your rscribe_cat script? Are you creating a Log_Entry pair with a category and message? -Anthony On 11/21/08 4:15 AM, "Chandranshu ." <cha...@gm...> wrote: Resending in plain text format: I'm trying to use a Ruby Client named rscribe_cat.rb to post messages to the scribed server started using the examples/example1.conf file that came with the distribution. The file is attached herewith. I'm summarizing the problems I faced in setting up Scribe for Ruby: 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) with $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php --gen rb)) 2. Now run the following command from <SCRIBE_BASE> again: sudo make install Verify that a gen_rb folder has been created in the <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This file contains the ruby module that'll enable us to use it from inside ruby code. Also, add this path to $: in your Ruby Client. 3. However, the generated module contains the module name as scribe and trying to use it will result in Ruby complaining that ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT (SyntaxError) The leading ".." is because I was writing the ruby client in the examples directory. Open the "../src/gen-rb/scribe.rb" file and change the module name to be Scribe with a capital 'S'. 4. The next error you'll get is: ../src/gen-rb/scribe.rb:9:in `require': no such file to load -- FacebookService (LoadError) This is because when installing fb303, ruby classes were left out again. Generate the ruby classes for the fb303 service interface from the <FB303_BASE> directory: sudo thrift -o /usr/local/share -I /usr/local/share --gen rb if/fb303.thrift Unfortunately, ruby files in /usr/local/share are not picked up Ruby by default. So, you'll have to manually copy over the files to /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your machine. 5. The next error is the one that consumed most of my time: /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no such file to load -- /usr/local/lib/site_ruby/1.8/reflection_limited_types Looking at the code, I found that it was using File.dirname(FILE) to load the reflection_limited_types file. Bad for me. After a huge updatedb call, I was able to locate the corresponding thrift file. Use the following to remedy this: sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb /usr/local/share/thrift/if/reflection_limited.thrift and then copy out the files from the gen-rb directory to the /usr/local/lib/site_ruby/1.8 directory. After this point, you shouldn't get any more syntax errors. Though it'd be great if the ruby classes are also generated at the build time for Thrift, fb303 and scribe. I think generating the ruby classes for the thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and $(srcdir)/../if/scribe.thrift files and putting them in the right place should do. 6. What I'm still struggling with: /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in `read_message_begin': Missing version identifier (Thrift::ProtocolException) from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in `receive_message' from ../src/gen-rb/scribe.rb:26:in `recv_Log' from ../src/gen-rb/scribe.rb:18:in `Log' from rscribe_cat:18 If someone has solved this problem or if the developers can guide me as to what might be going wrong, I'll try and fix it and post a patch. Anyways, good framework Guys!! Thanks and regards, Chandranshu ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Scribeserver-users mailing list Scr...@li... https://lists.sourceforge.net/lists/listinfo/scribeserver-users |
From: Anthony G. <an...@fa...> - 2008-11-22 02:06:52
|
Jonathan, I have not yet tested the maximum throughput of a single php Thrift client. We use Scribe to collect data from thousands of machines and are primarily concerned with scaling the aggregate total amount of data. We are usually limited by how fast we can write to disk, but can easily scale out by configuring scribe to forward messages to as many scribe servers as we need. The exact throughput would depend on the workload and how Scribe is configured. I am not sure what you mean by 'configuring php on scribe', but I am assuming you are asking how to configure Scribe. If so, I would take a look at the configuration section of the Scribe wiki. Also, I recommend taking a look at the example code that is included with Scribe. The example code demonstrates how configure Scribe to run on multiple machines and buffer data locally when remote Scribe instances are not available. -Anthony On 11/20/08 5:49 PM, "Jonathan Cao" <jon...@ro...> wrote: We are trying to evaluate Scribe log server. What is the typical throughput for php Thrift client? Any advice to configure the php on scribe would be welcomed. Thanks, Jonathan |
From: Chandranshu . <cha...@gm...> - 2008-11-21 12:15:56
|
Resending in plain text format: I'm trying to use a Ruby Client named rscribe_cat.rb to post messages to the scribed server started using the examples/example1.conf file that came with the distribution. The file is attached herewith. I'm summarizing the problems I faced in setting up Scribe for Ruby: 1. Edit the <SCRIBE_BASE>/src/Makefile.in. Replace the following line $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php)) with $(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, -I $(thrift_home)/share/ -I $(fb303_home)/share/ --cpp --py --php --gen rb)) 2. Now run the following command from <SCRIBE_BASE> again: sudo make install Verify that a gen_rb folder has been created in the <SCRIBE_BASE>/src directory and it contains the scribe.rb file. This file contains the ruby module that'll enable us to use it from inside ruby code. Also, add this path to $: in your Ruby Client. 3. However, the generated module contains the module name as scribe and trying to use it will result in Ruby complaining that ../src/gen-rb/scribe.rb:12: class/module name must be CONSTANT (SyntaxError) The leading ".." is because I was writing the ruby client in the examples directory. Open the "../src/gen-rb/scribe.rb" file and change the module name to be Scribe with a capital 'S'. 4. The next error you'll get is: ../src/gen-rb/scribe.rb:9:in `require': no such file to load -- FacebookService (LoadError) This is because when installing fb303, ruby classes were left out again. Generate the ruby classes for the fb303 service interface from the <FB303_BASE> directory: sudo thrift -o /usr/local/share -I /usr/local/share --gen rb if/fb303.thrift Unfortunately, ruby files in /usr/local/share are not picked up Ruby by default. So, you'll have to manually copy over the files to /usr/local/lib/site_ruby/1.8/ or the corresponding directory on your machine. 5. The next error is the one that consumed most of my time: /usr/local/lib/site_ruby/1.8/fb303_types.rb:8:in `require': no such file to load -- /usr/local/lib/site_ruby/1.8/reflection_limited_types Looking at the code, I found that it was using File.dirname(FILE) to load the reflection_limited_types file. Bad for me. After a huge updatedb call, I was able to locate the corresponding thrift file. Use the following to remedy this: sudo thrift -o /usr/local/lib/site_ruby/1.8 --gen rb /usr/local/share/thrift/if/reflection_limited.thrift and then copy out the files from the gen-rb directory to the /usr/local/lib/site_ruby/1.8 directory. After this point, you shouldn't get any more syntax errors. Though it'd be great if the ruby classes are also generated at the build time for Thrift, fb303 and scribe. I think generating the ruby classes for the thrift/if/reflection_limited.thrift, <fb303_base>/if/fb303.thrift and $(srcdir)/../if/scribe.thrift files and putting them in the right place should do. 6. What I'm still struggling with: /usr/local/lib/site_ruby/1.8/thrift/protocol/binaryprotocol.rb:82:in `read_message_begin': Missing version identifier (Thrift::ProtocolException) from /usr/local/lib/site_ruby/1.8/thrift/client.rb:26:in `receive_message' from ../src/gen-rb/scribe.rb:26:in `recv_Log' from ../src/gen-rb/scribe.rb:18:in `Log' from rscribe_cat:18 If someone has solved this problem or if the developers can guide me as to what might be going wrong, I'll try and fix it and post a patch. Anyways, good framework Guys!! Thanks and regards, Chandranshu |
From: Jonathan C. <jon...@ro...> - 2008-11-21 02:13:45
|
We are trying to evaluate Scribe log server. What is the typical throughput for php Thrift client? Any advice to configure the php on scribe would be welcomed. Thanks, Jonathan |
From: Dhruba B. <dh...@fa...> - 2008-11-21 01:48:02
|
Hi Ian, I personally havn't had a chance (yet) to play around with Chukwa. But the design goals of Chukwa are such that it should precisely be solving the problem you are mentioning. It is a log aggregation service, so in a sense, it is similar to Scribe. Scribe has been in prooduction here at Facebook for a couple of years. I have heard that Yahoo has started using Chukwa to collect logs of appliccations that run on Hadoop. In your existing solution, you would end up creating lots of temporary small files in HDFS. In the chukway architecture, the chukwa servers log data into their own local disk and periodically upload data to HDFS. It also can multiplex different log streams into the same HDFS file. Hope this helps, Thanks, dhruba On 11/20/08 5:15 PM, "Ian Holsman" <li...@ho...> wrote: Joydeep Sen Sarma wrote: > Dhruba can shed more light on chukwa - I haven't looked at it myself. > > Does ur mail imply that the log files are being tailed and written out to hdfs periodically (by an application outside scribe?). If so - this is not so different from what we do (except there's more code to deal with catchups etc.). > > we're not using scribe at the moment (it & chukwa weren't there when we started), but am investigating moving to a more widely used solution. and yes... we're using something called 'logtail' http://www.drxyzzy.org/ntlog/logtail.c which remembers where it was the last time it was run, and does a seek() into the logfile and continues from that point, there is a bit of log-rotation logic which goes on so it doesn't miss something if it was stopped. This stream is then piped into a piece of code that runs on the webserver that writes it into hdfs, switching the filename every 15m ( making sure it is unique etc) the downside is that we create files like crazy on HDFS. 4 x # of webservers per hour, each about 30-180Mb each (which is small imho for a file in hdfs). hence why are looking at doing something else ;-) > -----Original Message----- > From: Ian Holsman [mailto:li...@ho...] > Sent: Thursday, November 20, 2008 4:41 PM > To: Joydeep Sen Sarma > Cc: scr...@li...; Dhruba Borthakur; Rodrigo Schmidt > Subject: Re: [Scribeserver-users] Scribe and Hadoop > > Hi Joydeep. > > we currently are just doing the naivé approach writing log files > directly into hadoop to individual files, rotating them every 15minutes > to avoid the append problem. We used logtail on the client side to > de-couple the system and a map/red job which then aggregates the info > 10-30 minutes later. > > I was wondering if you had seen the recent contribution to hadoop called > 'chukwa', and what your thoughts were on it. > > personally i'm looking at scribe (and chukwa) for realtime logging and > decision systems. > > Joydeep Sen Sarma wrote: > >> Hi folks, >> >> Can shed some light on scribe and hdfs/hadoop integration at FB: >> >> - when we (actually Avinash - who's leading the Cassandra project now) >> started out - we investigated writing log files from scribe directly >> to hdfs (using libhdfs c++ api). However there were a few issues with >> this approach that steered us in a different direction: >> >> o hdfs uptime: there have been periods of sustained downtime and we >> can't rule that out in the future. There are many reasons - software >> upgrades being the most common. Buffering data in scribe for such >> large periods didn't seem like a very good route >> >> o lack of append support in hdfs in early days >> >> o desire to build loosely coupled systems (otherwise we would have to >> upgrade scribe servers with new libhdfs every time we had a software >> upgrade on hdfs) >> >> o flexibility in transforming data while copying into hdfs (more on >> this later) >> >> - currently we have a rsync like model to pull data from scribe to hdfs: >> >> o scribe writes data to netapp filers. These filers are high speed >> buffers for the most part >> >> o we have 'copier' jobs that 'pull' data from scribe output locations >> in these filers to hdfs. They maintain file offsets for copied data in >> a registry - so that these jobs can be periodically invoked so that >> continuous copying can happen. >> >> o 'copier' jobs can run in continous mode - or can be invoked to copy >> (or re-copy) data from older dates (this can be important if incorrect >> data was logged or data shows up late) >> >> o 'copier' jobs are map-only jobs in hadoop - this means that we can >> increase the copy parallelism if required. For example - if we are >> falling behind or hdfs was down for long time and there's a lot of >> accumulated data - the copiers will dial up the parallelism (up to a >> maximum - so as not to trip the filers up completely). >> >> - data 'copied' into hdfs - is eventually 'loaded' into Hive (this is >> our open source date warehousing layer on top of Hadoop). Usually this >> loading is a nightly process - but in some small number of cases - we >> load data at hourly granularity for semi-real-time applications. >> Application processing over scribe log sets is typically using Hive QL. >> >> - one interesting angle is 'close of books'. Scribe itself does not >> provide any hard guarantees on when data for a given date will be >> logged by. However several applications (especially revenue sensitive >> ones) need a hard deadline (invoke me when all data for a given day >> has been logged). For such applications - the loading process >> typically waits until 2am or so in the night (on day N+1) and then >> scans data from day N-1, N, N+1 to find all the relevant data for day >> N (using unix timestamps that are typically logged with the data). >> This is the data that's loaded into date partition N for the relevant >> hive table. Clearly the 2am boundary is arbitrary and we will move >> towards more heuristic based ways of determining when data for a given >> date is (almost) complete. >> >> - we have instances of text, json and thrift data sets logged via >> scribe. For the case of thrift (particularly when there's a thrift >> file with heterogenous records) - we do some transforms in the copying >> process to make the subsequent loading easier. Thrift data also shows >> up as TFileTransport format - and this cannot be parallel processed by >> Hadoop natively (although it wouldn't be so hard to arrange that as >> well) - so we always convert thrift data into sequencefiles as it's >> copied into hadoop. >> >> there are several pieces here that are not open sourced - and >> depending on community interest can be made available. The scribe to >> hdfs copier code for one. TFileTransport's java implementation is also >> not open sourced (since there is constant talk of superseding it with >> newer better transports). >> >> Please let us know if there are more questions and would be happy to >> answer. >> >> Joydeep >> >> ------ Forwarded Message >> *From: *Johan Oskarsson <jo...@os...> >> *Date: *Wed, 19 Nov 2008 09:36:38 -0800 >> *To: *<scr...@li...> >> *Subject: *[Scribeserver-users] Scribe and Hadoop >> >> I understand Scribe is being used to put logs into the Hadoop HDFS at >> Facebook. I'd love to hear more about how that works and how to >> replicate the setup you guys have. >> >> /Johan >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> _______________________________________________ >> Scribeserver-users mailing list >> Scr...@li... >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >> >> >> ------ End of Forwarded Message >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Scribeserver-users mailing list >> Scr...@li... >> https://lists.sourceforge.net/lists/listinfo/scribeserver-users >> >> > > > |