2

I am having a problem with haproxy. Every time I turn off virtuoso, haproxy shows the following error message:

Message from syslogd@master0 at Jul 9 14:39:18 ... haproxy[4403]: backend virtuoso has no server available!

I found the following Link where they suggested to use *.emerg;local2.none  * but I really didn't undestand how it can help and where it should be located in the configuration file.

How can I modify the configuration file in order to hide the error messages.


Configuration file

#$export HAPROXY=/scratch_globa/HAProxy/haproxy-1.5.12-dist

global
        log /dev/log    local0
        log /dev/log    local1 notice
        user    test
        group   test_1
        maxconn 8890
        daemon

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull

#
#  Listen on *:80 - Send traffic to the backend named "apache"
#
frontend www-http
    bind *:8890
    default_backend virtuoso

#
# Back-end definition.
#
backend virtuoso
    mode http
    balance roundrobin
    server node0 xxx.xxx.x.xxx:8890 check
# 

#############################################
# Start
2
  • Is it showing it in a log file or to your console? – GregL Jul 9 '15 at 14:36
  • Console. Actually all the users on the server are getting this message lol it's spamming the whole sever lolololol. Every TIme I turn off virtuoso or something wrong happens then this error message is shown. The problem is that all the users that are on the server are getting this message it is annoying them lolll – Hani Gotc Jul 9 '15 at 14:40
5

The post to referenced in your question is right, you need to tell rsyslog (or syslog) to stop sending local0.emerg and local1.emerg messages to the console.

You'd need to append those lines to rsyslog.conf, not the HAProxy config file.

As an alternative, you could change

global
    log /dev/log    local0
    log /dev/log    local1 notice

to

global
    log /dev/log    local0 info alert
    log /dev/log    local1 notice alert

This will have the effect of "capping" the maximum severity of messages to alert, as outlined in the HAProxy docs:

log <address> [len <length>] <facility> [<level> [<minlevel>]]  

...

<level>    is optional and can be specified to filter outgoing messages. By
           default, all messages are sent. If a level is specified, only
           messages with a severity at least as important as this level
           will be sent. An optional minimum level can be specified. If it
           is set, logs emitted with a more severe level than this one will
           be capped to this level. This is used to avoid sending "emerg"
           messages on all terminals on some default syslog configurations.
           Eight levels are known :
             emerg  alert  crit   err    warning notice info  debug
3
  • If I raise Local1 for example to Local2 what will change? – Hani Gotc Jul 9 '15 at 15:00
  • As this site is for professional sysadmins, I would think you'd know where to find rsyslog.conf, or at the vert least, how to find it. No, changing local1 to local2 won't do anything to fix your issue. Read this Wikipedia article to find out why. – GregL Jul 9 '15 at 15:02
  • It worked sheesh you saved my life – Hani Gotc Jul 9 '15 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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