Cannot connect to [Connection refused] zabbix

Résolu/Fermé
naby007 - 17 mars 2008 à 10:16
 Arooo - 24 août 2022 à 18:43
Bonjour,
je suis en stage mon tuteur la demandé d'installé et de comprenndre zabbix le seul probléme qui se trouve sé ke des host se mete dispo et dutre on comme message Cannot connect to[ ] [Connection refused]

si quelqun pouvai m'aidé svp

merci d'avance
A voir également:

7 réponses

landros Messages postés 98 Date d'inscription mercredi 14 février 2007 Statut Membre Dernière intervention 26 mars 2010 6
14 mai 2008 à 09:51
OUIIIIIIIIIIIII, c'était bien ça !!

maintenant les deux fonctionnent et donc, mon pc a pour IP : 10.150.36.44

mon fichier "zabbix_agent.conf" :

# This is config file for zabbix_agent
# To get more information about ZABBIX,
# go https://www.zabbix.com/

# IP address of ZABBIX server
# Connections from other hosts will be denied

#Server=10.150.36.44
Server=127.0.0.1

# Spend no more than Timeout seconds on processing
# Must be between 1 and 30

Timeout=3

####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
#UserParameter=mysql.version,mysql -V



mon fichier "zabbix_agentd.conf" :

# This is config file for zabbix_agentd
# To get more information about ZABBIX, go https://www.zabbix.com/

############ GENERAL PARAMETERS #################

# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
# No spaces allowed. First entry is used for sending active checks.
# Note that hostnames must resolve hostname->IP address and
# IP address->hostname.

Server=127.0.0.1

# Server port for sending active checks

#ServerPort=10051
ServerPort=10051

# Unique hostname. Required for active checks.

Hostname=localhost

# Listen port. Default is 10050

#ListenPort=10050
ListenPort=10050

# IP address to bind agent
# If missing, bind to all available IPs

#ListenIP=127.0.0.1
ListenIP=127.0.0.1

# Number of pre-forked instances of zabbix_agentd.
# Default value is 5
# This parameter must be between 1 and 16

StartAgents=5

# How often refresh list of active checks. 2 minutes by default. in seconds

RefreshActiveChecks=10

# Disable active checks. The agent will work in passive mode listening server.

#DisableActive=1

# Enable remote commands for ZABBIX agent. By default remote commands disabled.

#EnableRemoteCommands=1

# Specifies debug level
# 0 - debug is not created
# 1 - critical information
# 2 - error information
# 3 - warnings (default)
# 4 - for debugging (produces lots of information)

DebugLevel=4

# Name of PID file

PidFile=/var/run/zabbix-agent/zabbix_agentd.pid

# Name of log file.
# If not set, syslog will be used

LogFile=/var/log/zabbix-agent/zabbix_agentd.log

# Spend no more than Timeout seconds on processing
# Must be between 1 and 30

Timeout=3

####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
#UserParameter=mysql.version,mysql -V


mon fichier "zabbix_server.conf" :


# This is config file for ZABBIX server process
# To get more information about ZABBIX,
# go https://www.zabbix.com/

############ GENERAL PARAMETERS #################

# This defines which server this is.
# Default value 1
# This parameter must be between 1 and 255
Server=1

# Number of pre-forked instances of pollers
# Default value is 6
# This parameter must be between 5 and 255
StartPollers=6

# Number of pre-forked instances of trappers
# Default value is 5
# This parameter must be between 2 and 255
StartTrappers=5

# Listen interface for trapper. Trapper will listen all network interfaces
# if this parameter is missing.
#ListenIP=127.0.0.1

# Listen port for trapping. Default port number is 10051. This parameter
# must be between 1024 and 32767

ListenPort=10051

# How often ZABBIX will perform housekeeping procedure
# (in hours)
# Default value is 1 hour
# Housekeeping is removing unnecessary information from
# tables history, laert, and alarms
# This parameter must be between 1 and 24

HousekeepingFrequency=1

# How often ZABBIX will try to send unsent alerts
# (in seconds)
# Default value is 30 seconds
SenderFrequency=30

# Uncomment this line to disable housekeeping procedure

#DisableHousekeeping=1

# Specifies debug level
# 0 - debug is not created
# 1 - critical information
# 2 - error information
# 3 - warnings (default)
# 4 - for debugging (produces lots of information)

DebugLevel=3

# Specifies how long we wait for agent (in sec)
# Must be between 1 and 30
Timeout=5

# After how many seconds of unavailability treat a host as unavailable
UnavailablePeriod=20

# Name of PID file

PidFile=/var/run/zabbix-server/zabbix_server.pid

# Name of log file
# If not set, syslog is used

LogFile=/var/log/zabbix-server/zabbix_server.log

#Location for custom alert scripts
AlertScriptsPath=/usr/local/sbin/

#Location of 'fping. Default is /usr/sbin/fping
FpingLocation=/usr/bin/fping

# Frequency of ICMP pings. Defauls is 30 second.
#PingerFrequency=30

# Database host name
# Default is localhost

DBHost=

# Database name

DBName=zabbix

# Database user

DBUser=zabbix

# Database password
# Comment this line if no password used

DBPassword=toto

# Connect to MySQL using Unix socket?

#DBSocket=/tmp/mysql.sock



avec

/etc/init.d/zabbix-server restart
et
/etc/init.d/zabbix-agent restart

dans un terminal pour relancer le tout et faire tenir compte de la nouvelle configuration.

A noter que si je remet l'adresse : 10.150.36.44 dans la conf, c'est
l'erreur "Connection reset by peer." qui revient
donc c'est pour cela que je l'ai laissé dans les fichiers mais avec un commentaire, pour que chacun voit l'erreur à ne pas faire.

j'espère que cela aidera le maximum de gens. Bye
2