为什么如果数据库导入data.sql,则zabbix_proxy服务无法启动?

来源:互联网 发布:php set cookie 编辑:程序博客网 时间:2024/06/09 14:40

zabbix_proxy的main()函数如下


intmain(int argc, char **argv){zbx_task_ttask = ZBX_TASK_START;charch;#if defined(PS_OVERWRITE_ARGV) || defined(PS_PSTAT_ARGV)argv = setproctitle_save_env(argc, argv);#endifprogname = get_program_name(argv[0]);/* parse the command-line */while ((char)EOF != (ch = (char)zbx_getopt_long(argc, argv, shortopts, longopts, NULL))){switch (ch){case 'c':CONFIG_FILE = zbx_strdup(CONFIG_FILE, zbx_optarg);break;case 'R':if (0 == strcmp(zbx_optarg, ZBX_CONFIG_CACHE_RELOAD))task = ZBX_TASK_CONFIG_CACHE_RELOAD;else{printf("invalid runtime control option: %s\n", zbx_optarg);exit(EXIT_FAILURE);}break;case 'h':help();exit(-1);break;case 'V':version();exit(-1);break;default:usage();exit(-1);break;}}if (NULL == CONFIG_FILE)CONFIG_FILE = zbx_strdup(CONFIG_FILE, SYSCONFDIR "/zabbix_proxy.conf");/* required for simple checks */init_metrics();zbx_load_config();if (ZBX_TASK_CONFIG_CACHE_RELOAD == task)exit(SUCCEED == zbx_sigusr_send(ZBX_TASK_CONFIG_CACHE_RELOAD) ? EXIT_SUCCESS : EXIT_FAILURE);#ifdef HAVE_OPENIPMIinit_ipmi_handler();#endifreturn daemon_start(CONFIG_ALLOW_ROOT);}


0 0
原创粉丝点击