【问题标题】:zabbix How to complete installation successfully? [closed]zabbix 如何成功完成安装? [关闭]
【发布时间】:2013-06-21 10:59:21
【问题描述】:

CentOS 6.4 postgres 9.2 zabbix 2.0

ps

     1761 ?        Ss     0:00 postgres: logger process                            
 1763 ?        Ss     0:00 postgres: checkpointer process                      
 1764 ?        Ss     0:00 postgres: writer process                            
 1765 ?        Ss     0:00 postgres: wal writer process                        
 1766 ?        Ss     0:00 postgres: autovacuum launcher process               
 1767 ?        Ss     0:00 postgres: stats collector process 
 2257 ?        Ss     0:00 /usr/sbin/httpd
 2259 ?        S      0:00 /usr/sbin/httpd
 2260 ?        S      0:00 /usr/sbin/httpd
 2261 ?        S      0:00 /usr/sbin/httpd
 2262 ?        S      0:00 /usr/sbin/httpd
 2263 ?        S      0:00 /usr/sbin/httpd
 2264 ?        S      0:00 /usr/sbin/httpd
 2265 ?        S      0:00 /usr/sbin/httpd
 2266 ?        S      0:00 /usr/sbin/httpd
 2280 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2282 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2283 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2284 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2285 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2286 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2287 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2288 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2289 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2290 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2291 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2292 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2293 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2294 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2295 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2296 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2298 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51084) idle       
 2299 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2300 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2301 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2302 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2303 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2304 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2305 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2306 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2307 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51085) idle       
 2308 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51086) idle       
 2309 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51087) idle       
 2310 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51088) idle       
 2311 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51089) idle       
 2312 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51090) idle       
 2313 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51091) idle       
 2315 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51093) idle       
 2316 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51094) idle       
 2317 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51095) idle       
 2318 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51096) idle       
 2319 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51097) idle       
 2320 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51098) idle       
 2321 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2322 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2323 ?        S      0:00 zabbix_server -c /etc/zabbix/zabbix_server.conf
 2324 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51099) idle       
 2325 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51100) idle       
 2326 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51101) idle       
 2327 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51102) idle       
 2328 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51103) idle       
 2329 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51104) idle       
 2330 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51105) idle       
 2331 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51106) idle       
 2332 ?        Ss     0:00 postgres: zabbix zabbix 127.0.0.1(51107) idle

pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                 METHOD

local all all trust
host all all 0.0.0.0/0 trust
local   zabbix      zabbix                            md5

postgresql.conf

# - Connection Settings -

listen_addresses = '*'      # what IP address(es) to listen on;
                    # comma-separated list of addresses;
                    # defaults to 'localhost'; use '*' for all
                    # (change requires restart)
port = 5432             # (change requires restart)
max_connections = 100   

zabbix_server.conf

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/tmp/.s.PGSQL.5432

我可以在 pgAdmin 中连接和观察 zabbix 数据库,没有任何问题。但是在“3.配置数据库连接”中安装zabbix时,我得到:

pg_connect():无法连接到 PostgreSQL 服务器:无法连接到服务器:
权限被拒绝服务器是否在主机上运行 “localhost”(127.0.0.1)并接受端口 5432 上的 TCP/IP 连接? [包括/db.inc.php:99] 连接数据库时出错

如何成功完成安装?

【问题讨论】:

  • 更适合于 serverfault.com;这可能很快就会关闭。不过,感谢您提出有关所有错误消息、版本等的详细问题; +1。奇怪的错误,TCP 套接字 connect() 调用上的“权限被拒绝”。运行一些自定义防火墙软件? SELinux?

标签: postgresql centos zabbix


【解决方案1】:

Permission denied 建立网络连接时可能是由于SELinux。检查/var/log/audit/audit.log中的错误信息

另请注意,DBSocket 用于 MySQL,而用于 PostgreSQL 将被忽略。 要让 zabbix 通过 Unix 本地域套接字连接到 PostgresQL,这将是:

DBHost=/tmp # 而不是 localhost

【讨论】:

  • 问题出在 SE 配置中。谢谢。
  • 即使是错误的论坛,对我来说答案是有帮助的。我总是添加 .s.PGSQL.5432,这不是必需的。 (实际上它不起作用:) /var/run/postgres/ 对于 debian 来说已经足够了。
猜你喜欢
  • 2012-10-15
  • 1970-01-01
  • 2012-09-03
  • 1970-01-01
  • 2018-12-18
  • 1970-01-01
  • 1970-01-01
  • 2018-10-21
  • 1970-01-01
相关资源
最近更新 更多