qihoo360 / qconf Goto Github PK
View Code? Open in Web Editor NEWQihoo Distributed Configuration Management System
License: Other
Qihoo Distributed Configuration Management System
License: Other
由于qconf是运行在容器中的,所以每次容器重启时,qconf服务也是重新启动的,这样导致项目运行起来后的一小段时间内,读取不到qconf中的数据。有没有办法解决呢?
根据wiki ,根据zk上的路径来更改脚本名,测试中
qconf_event和qconf_path 这两个变量都是空的,这两个变量是从哪取的
正确的操作操作姿势是怎样的
安装php扩展qconf错误:
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for libqconfzk... yes, shared
checking whether to enable qconf_manager support... yes, shared
configure: error: Need arg --with-libqconfzk-dir"
这里的with-libqconfzk-dir
是指什么目录?
建议: 在QConf/agent/CMakeLists.txt 第49行增加--without-librtmp。
理由: QConf应该不会用到rtmp功能,防止给编译过程带来不便😄。
Hi, author
commit: dda58e231ff09171ea5b5a8119931be52168682a
Linking CXX executable qconf_agent
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-timeval.o): In function curlx_tvnow': timeval.c:(.text+0xf): undefined reference to
clock_gettime'
collect2: ld returned 1 exit status
make[2]: *** [agent/qconf_agent] Error 1
make[1]: *** [agent/CMakeFiles/qconf_agent.dir/all] Error 2
make: *** [all] Error 2
I think there should hava -lrt in makefile, but I don't know how to fix this.
[ERROR] Failed to init qconf! ret:201
谁帮解决?
部分错误日志:
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/xxx] threw exception [Handler processing failed; nested exception is java.lang.StackOverflowError] with root cause
java.lang.StackOverflowError
at net.qihoo.qconf.Qconf.getConf(Native Method)
at net.qihoo.qconf.Qconf.getConf(Unknown Source)
我在使用c++版本里qconf_get_allhost这个方法,请问这个方法有超时时间吗?因为是同步,总不能太长时间一直不返回吧。。。
./agent-cmd.sh start提示
./agent-cmd.sh: line 355: flock: command not found
本地环境是mac最新的OS X。是不支持mac吗?
原本以为是java driver的问题,后来发现agent没有起来。
Error Traceback (most recent call last)
----> 1 import qconf_py as qconf
Error: inital qconf evn failed!
如果灰度发布,请问整个数据流程是什么样的。怎么影响到客户端
core dumped 信息:
(lldb) target create "php" --core "core.23219"
warning: (x86_64) /cores/core.23219 load command 234 LC_SEGMENT_64 has a fileoff + filesize (0x281ff000) that extends beyond the end of the file (0x281fe000), the segment will be truncated to match
Core file '/cores/core.23219' (x86_64) was loaded.
Process 0 stopped
ccdigest_final_64le + 59, stop reason = signal SIGSTOP frame #0: 0x00007fff8fa72db4 libcorecrypto.dylib
ccdigest_final_64le + 59ccdigest_final_64le + 59 frame #1: 0x00007fff89a2ff63 libcommonCrypto.dylib
CC_MD5_Final + 162qhashmd5(data=0x00007fba34969bb0, nbytes=244, retbuf=0x00007fff5d18db90) + 156 at qhash.c:83 frame #3: 0x00000001058f458c qconf.so
qconf_check_md5(val=0x00007fff5d18e080) + 796 at qconf_shm.cc:190hash_tbl_get(tbl=0x0000000105a1c000, key=0x00007fff5d18dd58, val=0x00007fff5d18e080) + 294 at qconf_shm.cc:173 frame #5: 0x00000001058e5155 qconf.so
qconf_get_(path=0x00007fff5d18e248, tblval=0x00007fff5d18e080, dtype='2', idc=0x00007fff5d18e270, flags=0) + 949 at driver_api.cc:217qconf_get(path=0x00007fff5d18e248, buf=0x00007fff5d18e288, idc=0x00007fff5d18e270, flags=0) + 447 at driver_api.cc:186 frame #7: 0x00000001058e7981 qconf.so
qconf_get_conf_(path=0x00000001054451a8, buf=0x00007fff5d18e640, buf_len=1048576, idc=0x0000000105445270, flags=0) + 1137 at qconf.cc:205qconf_get_conf(path=0x00000001054451a8, buf=0x00007fff5d18e640, buf_len=1048576, idc=0x0000000105445270) + 49 at qconf.cc:60 frame #9: 0x00000001058e4077 qconf.so
zim_Qconf_getConf + 183zend_do_fcall_common_helper_SPEC + 1542 frame #11: 0x0000000102d0931a php
execute + 553zend_execute_scripts + 411 frame #13: 0x0000000102c9f60e php
php_execute_script + 645main + 6409 frame #15: 0x00007fff8fc7e5c9 libdyld.dylib
start + 1以满足“在应用中根据条件触发改变配置(可认为是状态),希望实时推送给其他应用,以期对其他应用造成影响”的场景。
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /mnt/hgfs/github/QConf/deps/gdbm/build-aux/missing aclocal-1.14 -I m4
/mnt/hgfs/github/QConf/deps/gdbm/build-aux/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [aclocal.m4] 错误 127
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /mnt/hgfs/github/QConf/deps/gdbm/build-aux/missing aclocal-1.14 -I m4
/mnt/hgfs/github/QConf/deps/gdbm/build-aux/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [aclocal.m4] 错误 127
CMake Error at driver/c++/CMakeLists.txt:29 (message):
message called with incorrect number of arguments
error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
error: macro "zend_hash_get_current_data" passed 2 arguments, but takes just 1
error: macro "zend_hash_get_current_key" passed 4 arguments, but takes just 3
我们的开发环境在win平台,请问用源码是否能在win平台编译?
1、agent和client程序同时访问共享内存中的哈希表,不用对哈希表加锁吗?
2、对于哈希表中的单个节点,代码中采用md5校验的方式来保证并行读写的数据一致性,这种方法有理论支持吗?
README中英文链接跳转有问题
Qihoo Distrubuted Configuration Management System
Distrubuted
should be Distributed
. 😃
after
yum install gdbm-devel -y
I got
/root/tools/QConf/agent/qconf_dump.cc: In function ‘int qconf_init_dbf_(int)’:
/root/tools/QConf/agent/qconf_dump.cc:62: error: invalid conversion from ‘const char*’ to ‘char*’
/root/tools/QConf/agent/qconf_dump.cc:62: error: initializing argument 1 of ‘<anonymous struct>* gdbm_open(char*, int, int, int, void (*)())’
make[2]: *** [agent/CMakeFiles/qconf_agent.dir/qconf_dump.cc.o] Error 1
make[1]: *** [agent/CMakeFiles/qconf_agent.dir/all] Error 2
make: *** [all] Error 2
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-ssh.o): In function ssh_block2waitfor': ssh.c:(.text+0x258): undefined reference to
libssh2_session_block_directions'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-ssh.o): In function sftp_send': ssh.c:(.text+0x4fc): undefined reference to
libssh2_sftp_write'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-ssh.o): In function sftp_recv': ssh.c:(.text+0x5ac): undefined reference to
libssh2_sftp_read'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-ssh.o): In function scp_send': ssh.c:(.text+0x668): undefined reference to
libssh2_channel_write_ex'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-ssh.o): In function scp_recv': ssh.c:(.text+0x718): undefined reference to
libssh2_channel_read_ex'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-ssh.o): In function `ssh_statemach_act':
请问有没有提供.NET客户端的计划?
I would like to point out that identifiers like "__QCONF_CMD_H__
" and "__QCONF_COMMON_H__
" do not fit to the expected naming convention of the C++ language standard.
Would you like to adjust your selection for unique names?
-- This is unix
CMake Error at driver/c++/CMakeLists.txt:29 (message):
message called with incorrect number of arguments
-- Configuring incomplete, errors occurred!
See also "/root/QConf/build/CMakeFiles/CMakeOutput.log".
See also "/root/QConf/build/CMakeFiles/CMakeError.log".
Run Build Command:/usr/bin/gmake "cmTryCompileExec512667654/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec512667654.dir/build.make CMakeFiles/cmTryCompileExec512667654.dir/build
gmake[1]: Entering directory /root/QConf/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /root/QConf/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec512667654.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTryCompileExec512667654.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTryCompileExec512667654 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec512667654.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTryCompileExec512667654.dir/CheckFunctionExists.c.o -o cmTryCompileExec512667654 -rdynamic -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: ld 返回 1 gmake[1]: Leaving directory
/root/QConf/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec512667654] 错误 1
gmake: *** [cmTryCompileExec512667654/fast] 错误 2
很久没用6了
PHP and QConf are all installed on non-default path.
When QConf PHP extension installed, run php -m
, it reported:
php: symbol lookup error: /path/to/php/lib/php/extensions/no-debug-non-zts-20131226/qconf.so: undefined symbol: qconf_init
I modified the config.m4 file to:
PHP_ARG_ENABLE(qconf, whether to enable qconf support,
[ --enable-qconf Enable qconf support])
PHP_ARG_WITH(libqconf-dir, for libqconf,
[ --with-libqconf-dir[=DIR] Set the path to libqconf prefix.], yes)
if test -z "$PHP_DEBUG"
then
AC_ARG_ENABLE(debug,
[ --enable-debug compile with debugging symbols],[
PHP_DEBUG=$enableval
],[ PHP_DEBUG=no
])
fi
if test "$PHP_QCONF" != "no"
then
if test "$PHP_LIBQCONF_DIR" != "no" && test "$PHP_LIBQCONF_DIR" != "yes"
then
PHP_LIBQCONF_DIR=$PHP_LIBQCONF_DIR
else
PHP_LIBQCONF_DIR="/usr/local/include/qconf"
fi
PHP_LIBQCONF_INC=$PHP_LIBQCONF_DIR/include
PHP_LIBQCONF_LIB=$PHP_LIBQCONF_DIR/lib
if test ! -r "$PHP_LIBQCONF_INC/qconf.h"
then
AC_MSG_ERROR([Can't find qconf headers under "$PHP_LIBQCONF_DIR"])
fi
PHP_REQUIRE_CXX()
PHP_ADD_INCLUDE($PHP_LIBQCONF_INC)
PHP_ADD_LIBRARY(stdc++, "", EXTRA_LDFLAGS)
PHP_ADD_LIBRARY_WITH_PATH(qconf, "$PHP_LIBQCONF_LIB", QCONF_SHARED_LIBADD)
PHP_NEW_EXTENSION(qconf, php_qconf.c $SESSION_EXTRA_FILES, $ext_shared)
PHP_SUBST(QCONF_SHARED_LIBADD)
fi
I use --with-libqconf-dir
to specify the libqconf PREFIX(not the include directory) to solve the problem.
Hope to help you improve QConf :)
QConf/test/unit/CMakeLists.txt line 56 include_directories变量中增加以下头文件引用
${GDBM_SOURCE_DIR}/include
${CURL_SOURCE_DIR}/include
防止编译时找不到gdbm和curl的头文件或者找到了系统中已经安装的版本不一致的头文件。
ssh.c:(.text+0x268): undefined reference to `libssh2_session_block_directions'
改:
QConf-master/agent/CMakeLists.txt
66 ${PROJECT_SOURCE_DIR}/../deps/curl/_install/lib/libcurl.a )
为:
66 ${PROJECT_SOURCE_DIR}/../deps/curl/_install/lib/libcurl.a -lssh2)
MacOS启动时报错:agent-cmd.sh: line 355: flock: command not found
当修改一个配置的值时,怎么确保所有的client都能读到最新的值呢?
比如当agent从zookeeper同步数据失败时,本地程序将仍然使用老的配置在运行,但对zookeeper的修改却是成功的,让人以为本次修改成功。
current python version does not support python3, is there any roadmap for support it ?
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Administrator\AppData\Local\Temp\libqconf_java535428319837713874.so: %1 不是有效的 Win32 应用程序。 at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at net.qihoo.qconf.Qconf.loadLib(Unknown Source) at net.qihoo.qconf.Qconf.<clinit>(Unknown Source) at qconf.Test.main(Test.java:13)
请问,你们遇到过这种情况吗,我linux是64位的,jdk都是64位的,win7也是64位的,为什么会报一个32位的错误呢?
什么时候支持php7?
Manager是否可以增加用户验证(用户名密码)?
能否把17行修改一下,把$value加上",如:
echo "$value" > ${nginx_conf_path}.tmp
不加的话,生成的配置文件不换行
qconf的共享内存是否可以跨越容器边界?
error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
error: macro "zend_hash_get_current_data" passed 2 arguments, but takes just 1
error: macro "add_assoc_string" passed 4 arguments, but takes just 3
php7 是否支持
java.lang.UnsupportedClassVersionError: net/qihoo/qconf/Qconf : Unsupported major.minor version 51.0
qconf client包是在java 1.6.0_45下编译生成,引入工程后再tomcat下运行(java环境还是1.6),报上面的错误,请问怎么解决?
注:
生成环境使用的是jdk1.6,没法升级
QConf 1.1.0
Ubuntu 14.04 LTS 64bit
cmake version 2.8.12.2
GNU Make 3.81
autoconf (GNU Autoconf) 2.69
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
$ cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/local/qconf
(passed)
$ make
Linking CXX executable qconf_agent
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-curl_rtmp.o): In function `rtmp_disconnect':
curl_rtmp.c:(.text+0x2c): undefined reference to `RTMP_Close'
curl_rtmp.c:(.text+0x34): undefined reference to `RTMP_Free'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-curl_rtmp.o): In function `rtmp_connect':
curl_rtmp.c:(.text+0xc4): undefined reference to `RTMP_Connect1'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-curl_rtmp.o): In function `rtmp_send':
curl_rtmp.c:(.text+0x152): undefined reference to `RTMP_Write'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-curl_rtmp.o): In function `rtmp_recv':
curl_rtmp.c:(.text+0x19b): undefined reference to `RTMP_Read'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-curl_rtmp.o): In function `rtmp_setup':
curl_rtmp.c:(.text+0x20a): undefined reference to `RTMP_Alloc'
curl_rtmp.c:(.text+0x21f): undefined reference to `RTMP_Init'
curl_rtmp.c:(.text+0x22c): undefined reference to `RTMP_SetBufferMS'
curl_rtmp.c:(.text+0x23f): undefined reference to `RTMP_SetupURL'
curl_rtmp.c:(.text+0x264): undefined reference to `RTMP_Free'
../../agent/../deps/curl/_install/lib/libcurl.a(libcurl_la-curl_rtmp.o): In function `rtmp_do':
curl_rtmp.c:(.text+0x296): undefined reference to `RTMP_ConnectStream'
collect2: error: ld returned 1 exit status
make[2]: *** [agent/qconf_agent] Error 1
make[1]: *** [agent/CMakeFiles/qconf_agent.dir/all] Error 2
make: *** [all] Error 2
If I change agent/CMakeLists.txt line 65-66 to
target_link_libraries(qconf_agent
${PROJECT_SOURCE_DIR}/../deps/curl/_install/lib/libcurl.a rtmp)
or disable librtmp(agent/CMakeLists.txt line 49)
--disable-ldaps --without-ssl --without-zlib --without-libidn --without-librtmp)
can solve this error.
Does QConf use cURL RTMP? If not, i think maybe disable it is fine:)
Thanks for this fantastic software!!!
编译参数: ./configure --with-php-config=/usr/bin/php-config --with-libqconf-dir=/usr/local/qconf/include --enable-static LDFLAGS=/usr/local/qconf/lib/libqconf.a
所在目录: QConf-1.2.0/driver/php
make test 时提示 undefined symbol: qconf_aget_allhost in Unknown on line 0
YACC gram.c
byacc: e - line 26 of "/root/QConf/deps/gdbm/src/gram.y", syntax error
%error-verbose
^
make[2]: *** [gram.c] Error 1
make[2]: Leaving directory /root/QConf/deps/gdbm/src' make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 make[1]: Leaving directory
/root/QConf/deps/gdbm'
Making install in po
make[1]: Entering directory /root/QConf/deps/gdbm/po' installing de.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/de/LC_MESSAGES/gdbm.mo installing eo.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/eo/LC_MESSAGES/gdbm.mo installing fi.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/fi/LC_MESSAGES/gdbm.mo installing fr.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/fr/LC_MESSAGES/gdbm.mo installing ja.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/ja/LC_MESSAGES/gdbm.mo installing pl.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/pl/LC_MESSAGES/gdbm.mo installing pt_BR.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/pt_BR/LC_MESSAGES/gdbm.mo installing sr.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/sr/LC_MESSAGES/gdbm.mo installing uk.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/uk/LC_MESSAGES/gdbm.mo installing vi.gmo as /root/QConf/agent/../deps/gdbm/_install/share/locale/vi/LC_MESSAGES/gdbm.mo if test "gdbm" = "gettext-tools"; then \ /bin/mkdir -p /root/QConf/agent/../deps/gdbm/_install/share/gettext/po; \ for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed [email protected] [email protected] insert-header.sin Rules-quot Makevars.template; do \ /usr/bin/install -c -m 644 ./$file \ /root/QConf/agent/../deps/gdbm/_install/share/gettext/po/$file; \ done; \ for file in Makevars; do \ rm -f /root/QConf/agent/../deps/gdbm/_install/share/gettext/po/$file; \ done; \ else \ : ; \ fi make[1]: Leaving directory
/root/QConf/deps/gdbm/po'
Making install in src
make[1]: Entering directory /root/QConf/deps/gdbm/src' YACC gram.c byacc: e - line 26 of "/root/QConf/deps/gdbm/src/gram.y", syntax error %error-verbose ^ make[1]: *** [gram.c] Error 1 make[1]: Leaving directory
/root/QConf/deps/gdbm/src'
make: *** [install-recursive] Error 1
CMake Error at driver/c++/CMakeLists.txt:29 (message):
message called with incorrect number of arguments
-- Configuring incomplete, errors occurred!
See also "/root/QConf/build/CMakeFiles/CMakeOutput.log".
See also "/root/QConf/build/CMakeFiles/CMakeError.log".
执行qconf get_host 返回结果是
[ERROR]Failed to get get host! ret:10
请问是什么问题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.