From: Michael M. <mic...@xy...> - 2014-01-21 13:14:39
|
Hi Double check out the zabbix manual but I believe SourceIP is the network card the server uses as its outgoing address. In this case you have 127.0.0.1 which won't go anywhere. Try adding the card of the 192.168.1 network instead. Hope that helps Michael On Jan 21, 2014 7:32 AM, "John McIntyre" <joh...@gm...> wrote: > Hi, > I'm having issues with zabbix, the server of which can't connect to an > agent. I've scoured google, and the problem I'm having is apparently quite > commonplace, but nothing I've tried, has fixed it. > > The set-up is: one Zabbix server and one Zabbix client or agent (there are > actually two boxes running agents, but the symptoms are the same on both, > so I'm guessing that if I can get one working, then the other will work, > too). > > Here is the zabbix_server.conf, with comments etc removed.. > > ===== zabbix_server.conf ==== > ListenPort=10051 > > SourceIP=127.0.0.1 > > LogFile=/var/log/zabbix/zabbix_server.log > > LogFileSize=1024 > > DebugLevel=3 > > DBHost=localhost > > DBName=XXXXX > > DBUser=XXXXX > > DBPassword=XXXXX > > Timeout=30 > ===== zabbix_server.conf ==== > > All of the other options are commented, i.e. set to default values. > > Here is the agentd.conf file, again - commented lines removed. > > ===== zabbix_agentd.conf ==== > LogFile=/var/log/zabbix_agent.log > > DebugLevel=3 > > SourceIP=192.168.1.3 > > ListenIP=192.168.1.3 > > Server=server.mydomain.com > > ListenPort=10050 > > StartAgents=5 > > ServerActive=server.mydomain.com > > Hostname=agent.mydomain.com > ===== zabbix_agentd.conf ==== > > Once all of that is set up, I went onto the frontend, and added the server. > Within five minutes, I was seeing .. > > 'Get value from agent failed: cannot connect to [[192.168.1.3]:10050]: [22] > Invalid argument' > > In the logs, I _was_ seeing this .. > > ==== server logs ==== > 5518:20140121:103752.335 Zabbix agent item [system.cpu.util[,steal]] on > host [agent.mydomain.com] failed: another network error, wait > for 15 seconds > 5518:20140121:103752.335 Zabbix agent item [system.cpu.util[,steal]] on > host [agent.mydomain.com] failed: another network error, wait for 15 > seconds > 5518:20140121:103811.118 temporarily disabling Zabbix agent checks on > host [agent.mydomain.com]: host unavailable > ==== server logs ==== > > So I increased the timeout in the server configuration files, and now.. > > ==== server logs ==== > [root@server ~]# tail -f /var/log/zabbix/zabbix_server.log > 8349:20140121:114328.141 server #23 started [history syncer #4] > 8352:20140121:114328.141 server #26 started [self-monitoring #1] > 8331:20140121:114328.154 server #5 started [poller #3] > 8330:20140121:114328.154 server #4 started [poller #2] > 8328:20140121:114328.161 server #3 started [poller #1] > 8332:20140121:114328.165 server #6 started [poller #4] > 8334:20140121:114328.167 server #8 started [unreachable poller #1] > 8345:20140121:114328.169 server #19 started [discoverer #1] > 8333:20140121:114328.172 server #7 started [poller #5] > 8342:20140121:114335.409 housekeeper deleted: 2258 > records from history and trends, 0 records of deleted items, 0 events, 0 > alerts, 0 sessions > ==== server logs ==== > > .. or on the agent logs .. > > ==== agentd logs ==== > Starting zabbix_agentd: [ OK ] > [root@agent etc]# tail -f /var/log/zabbix_agent.log > 9785:20140121:124226.570 agent #5 started [listener] > 9788:20140121:124226.571 agent #8 started [listener] > 9787:20140121:124226.571 agent #7 started [listener] > 9790:20140121:124226.571 agent #10 started [listener] > 9789:20140121:124226.571 agent #9 started [listener] > 9782:20140121:124226.571 agent #2 started [listener] > 9791:20140121:124226.571 agent #11 started [active checks] > 9780:20140121:124226.571 agent #0 started [collector] > 9783:20140121:124226.572 agent #3 started [listener] > 9781:20140121:124226.572 agent #1 started [listener] > ==== agentd logs ==== > > I can ping from one, to the other. I can ssh from one server to the other. > > But still, I cannot get zabbix to connect from the server to the agent. > > iptables is stopped on both servers. > > SELinux is disabled on both servers. > > /etc/hosts.allow and /etc/hosts.deny on the respective machines look like > this .. > > ==== server /etc/hosts.allow ==== > ALL: 127.0.0.1 > ALL: 192.168.1.* > ALL: XXX.XXX.XXX.XXX // my office > ALL: XXX.XXX.XXX.XXX // my wife's office > > sendmail: * > httpd: * > mysqld: 192.168.1.3 > zabbix: 192.168.1.3 > ==== server /etc/hosts.allow ==== > > ==== server /etc/hosts.deny ==== > ALL: * > ==== server /etc/hosts.deny ==== > > ==== agent /etc/hosts.allow ==== > ALL: 127.0.0.1 > ALL: 192.168.1.* > ==== agent /etc/hosts.allow ==== > > ==== agent /etc/hosts.deny ==== > ==== agent /etc/hosts.deny ==== > > When I telnet ... > > [root@server ~]# telnet agent.mydomain.com 10050 > Trying 192.168.1.3... > Connected to agent.mydomain.com > Escape character is '^]'. > Connection closed by foreign host. > > I'm stumped. :-( > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Zabbix-users mailing list > Zab...@li... > https://lists.sourceforge.net/lists/listinfo/zabbix-users > > |