Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to get Zabbix running under Amazon Linux

I've installed the following packages:

zabbix20-server-2.0.11-1.el6.x86_64
zabbix20-server-pgsql-2.0.11-1.el6.x86_64
zabbix20-web-mysql-2.0.11-1.el6.noarch
zabbix20-2.0.11-1.el6.x86_64
zabbix20-agent-2.0.11-1.el6.x86_64
zabbix20-web-2.0.11-1.el6.noarch

When I run:

service zabbix_server start

The log file shows:

 1265:20140317:053235.774 [Z3001] connection to database 'zabbix' failed: [0] server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
could not send startup packet: Broken pipe

I can connect from the same machine to the database: mysql -h MYSQLSERVER.DOMAIN.NAME -uMYSQLUSER -pMYSQLPASSWORD -P 3306

I've configured /etc/zabbix_server.conf

# This is a configuration file for Zabbix Server process
# To get more information about Zabbix,
# visit http://www.zabbix.com

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

### Option: NodeID
#       Unique NodeID in distributed setup.
#       0 - standalone server
#
# Mandatory: no
# Range: 0-999
# Default:
NodeID=0

### Option: ListenPort
#       Listen port for trapper.
#
# Mandatory: no
# Range: 1024-32767
# Default:
ListenPort=10051

### Option: SourceIP
#       Source IP address for outgoing connections.
#
# Mandatory: no
# Default:
# SourceIP=

### Option: LogFile
#       Name of log file.
#       If not set, syslog is used.
#
# Mandatory: no
# Default:
# LogFile=

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

### Option: LogFileSize
#       Maximum size of log file in MB.
#       0 - disable automatic log rotation.
#
# Mandatory: no
# Range: 0-1024
# Default:
LogFileSize=0

### Option: DebugLevel
#       Specifies debug level
#       0 - no debug
#       1 - critical information
#       2 - error information
#       3 - warnings
#       4 - for debugging (produces lots of information)
#
# Mandatory: no
# Range: 0-4
# Default:
DebugLevel=4

### Option: PidFile
#       Name of PID file.
#
# Mandatory: no
# Default:
PidFile=/var/run/zabbix/zabbix_server.pid

### Option: DBHost
#       Database host name.
#       If set to localhost, socket is used for MySQL.
#       If set to empty string, socket is used for PostgreSQL.
#
# Mandatory: no
# Default:
DBHost=MYSQLSERVER.DOMAIN.NAME

### Option: DBName
#       Database name.
#       For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
#
# Mandatory: yes
# Default:
# DBName=

DBName=zabbix

### Option: DBSchema
#       Schema name. Used for IBM DB2.
#
# Mandatory: no
# Default:
# DBSchema=

### Option: DBUser
#       Database user. Ignored for SQLite.
#
# Mandatory: no
# Default:
# DBUser=

DBUser=MYSQLUSER

### Option: DBPassword
#       Database password. Ignored for SQLite.
#       Comment this line if no password is used.
#
# Mandatory: no
# Default:
DBPassword=MYSQLPASSWORD

### Option: DBSocket
#       Path to MySQL socket.
#
# Mandatory: no
# Default:
DBSocket=/var/lib/mysql/mysql.sock

### Option: DBPort
#       Database port when not using local socket. Ignored for SQLite.
#
# Mandatory: no
# Range: 1024-65535
# Default (for MySQL):
DBPort=3306

############ ADVANCED PARAMETERS ################
MORE STUFF HERE ...............
share|improve this question
    
I just installed zabbix, and it had a seutp wizard. Have you gone through that ? –  Lawrence Mar 17 at 5:53
    
I went through the web setup wizard. It did not the zabbix server conf file –  Greg Pagendam-Turner Mar 17 at 7:19
    
It did not...what...the conf file ? –  Lawrence Mar 17 at 7:28
    
It did not set the conf file. I set that manually. –  Greg Pagendam-Turner Mar 17 at 7:44
    
Did you test the connection when you went through the web setup wizard ? –  Lawrence Mar 18 at 1:43

2 Answers 2

The fact that you have "zabbix20-server-pgsql-2.0.11-1.el6.x86_64" package installed might indicate that your Zabbix server actually tries to connect to a PostgreSQL database.

share|improve this answer
    
did yum remove zabbix20-server-pgsql them yum install zabbix20-server-mysql error is now: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' –  Greg Pagendam-Turner Mar 17 at 8:52
    
@Greg: Does /var/lib/mysql/mysql.sock exist? On my Debian system the correct path is /var/run/mysqld/mysqld.sock. Also note that you should have either DBPort or DBSocket specified, but not both. –  asaveljevs Mar 17 at 10:49

After removing the zabbix20-server-pgsql package, installing zabbix20-server-mysql package and commenting out the socket config in the config file, Zabbix could connect to the database. I also had to run the schema.sql, images.sql and data.sql files into the database.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.