{"action":"created","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/7591","repository_url":"https://api.github.com/repos/rancher/rancher","labels_url":"https://api.github.com/repos/rancher/rancher/issues/7591/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/7591/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/7591/events","html_url":"https://github.com/rancher/rancher/issues/7591","id":203909078,"number":7591,"title":"Load balancer logs are empty - error during parsing file /etc/haproxy/rsyslogd.conf","user":{"login":"jmoscato","id":302113,"avatar_url":"https://avatars3.githubusercontent.com/u/302113?v=3","gravatar_id":"","url":"https://api.github.com/users/jmoscato","html_url":"https://github.com/jmoscato","followers_url":"https://api.github.com/users/jmoscato/followers","following_url":"https://api.github.com/users/jmoscato/following{/other_user}","gists_url":"https://api.github.com/users/jmoscato/gists{/gist_id}","starred_url":"https://api.github.com/users/jmoscato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmoscato/subscriptions","organizations_url":"https://api.github.com/users/jmoscato/orgs","repos_url":"https://api.github.com/users/jmoscato/repos","events_url":"https://api.github.com/users/jmoscato/events{/privacy}","received_events_url":"https://api.github.com/users/jmoscato/received_events","type":"User","site_admin":false},"labels":[{"id":203011204,"url":"https://api.github.com/repos/rancher/rancher/labels/area/balancer","name":"area/balancer","color":"FBCA04","default":false},{"id":145695746,"url":"https://api.github.com/repos/rancher/rancher/labels/kind/enhancement","name":"kind/enhancement","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":{"login":"superseb","id":2620179,"avatar_url":"https://avatars1.githubusercontent.com/u/2620179?v=3","gravatar_id":"","url":"https://api.github.com/users/superseb","html_url":"https://github.com/superseb","followers_url":"https://api.github.com/users/superseb/followers","following_url":"https://api.github.com/users/superseb/following{/other_user}","gists_url":"https://api.github.com/users/superseb/gists{/gist_id}","starred_url":"https://api.github.com/users/superseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superseb/subscriptions","organizations_url":"https://api.github.com/users/superseb/orgs","repos_url":"https://api.github.com/users/superseb/repos","events_url":"https://api.github.com/users/superseb/events{/privacy}","received_events_url":"https://api.github.com/users/superseb/received_events","type":"User","site_admin":false},"assignees":[{"login":"superseb","id":2620179,"avatar_url":"https://avatars1.githubusercontent.com/u/2620179?v=3","gravatar_id":"","url":"https://api.github.com/users/superseb","html_url":"https://github.com/superseb","followers_url":"https://api.github.com/users/superseb/followers","following_url":"https://api.github.com/users/superseb/following{/other_user}","gists_url":"https://api.github.com/users/superseb/gists{/gist_id}","starred_url":"https://api.github.com/users/superseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superseb/subscriptions","organizations_url":"https://api.github.com/users/superseb/orgs","repos_url":"https://api.github.com/users/superseb/repos","events_url":"https://api.github.com/users/superseb/events{/privacy}","received_events_url":"https://api.github.com/users/superseb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2017-01-30T00:34:25Z","updated_at":"2017-05-16T08:46:32Z","closed_at":null,"body":"The HAProxy logs in /var/log/haproxy/ are empty in the load balancer container. From the error messages in /var/log/messages it looks like those parenthesis on the if-then lines in rsyslogd.conf should be curly braces. Please see the example at the end of this page: [RSYSLOG if then](http://www.rsyslog.com/tag/if-then/)\r\n\r\nAlso see recent comments in [issue 2414](https://github.com/rancher/rancher/issues/2414).\r\n\r\n**Rancher Versions:**\r\nServer: v1.4.0-rc5 (also in v1.3.3)\r\nhealthcheck: v0.2.3\r\nipsec: holder\r\nnetwork-services: ?\r\nscheduler: v0.6.1\r\nkubernetes (if applicable): n/a\r\n\r\n**Docker Version:**\r\n1.13.0\r\n\r\n**OS and where are the hosts located? (cloud, bare metal, etc):**\r\nUbuntu 16.04, bare metal\r\n\r\n**Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)**\r\nsingle node rancher, internal DB\r\n\r\n**Environment Type: (Cattle/Kubernetes/Swarm/Mesos)**\r\nCattle\r\n\r\n**Steps to Reproduce:**\r\n* fresh install of Rancher server\r\n* add a host\r\n* create a new stack in the default environment\r\n* add a service (rawmind/web-test for example)\r\n* add a load balancer and configure a port with its target pointing to the service\r\n* make some requests to the load balancer's port\r\n\r\n**Results:** \r\n\r\nNavigate to load balancer container in rancher ui and select Execute Shell\r\n\r\nhaproxy logs:\r\n```\r\nroot@8d303d0449d6:/# ls -l /var/log/haproxy/\r\ntotal 0\r\n-rw-r--r-- 1 root root 0 Jan 24 22:27 errors\r\n-rw-r--r-- 1 root root 0 Jan 24 22:27 events\r\n-rw-r--r-- 1 root root 0 Jan 24 22:27 traffic\r\nroot@8d303d0449d6:/#\r\n```\r\n\r\n/var/log/messages output:\r\n```\r\nroot@8d303d0449d6:/# tail -n 50 /var/log/messages\r\nJan 29 23:13:04 8d303d0449d6 rsyslogd: [origin software=\"rsyslogd\" swVersion=\"8.\r\n16.0\" x-pid=\"28\" x-info=\"http://www.rsyslog.com\"] start\r\nJan 29 23:13:04 8d303d0449d6 rsyslogd-2207:error during parsing file /etc/haprox\r\ny/rsyslogd.conf, on or before line 7: invalid character '(' - is there an invali\r\nd escape sequence somewhere? [v8.16.0 try http://www.rsyslog.com/e/2207 ]\r\nJan 29 23:13:04 8d303d0449d6 rsyslogd-2207:error during parsing file /etc/haprox\r\ny/rsyslogd.conf, on or before line 9: invalid character ')' - is there an invali\r\nd escape sequence somewhere? [v8.16.0 try http://www.rsyslog.com/e/2207 ]\r\nJan 29 23:13:04 8d303d0449d6 rsyslogd-2207:error during parsing file /etc/haprox\r\ny/rsyslogd.conf, on or before line 10: invalid character '(' - is there an inval\r\nid escape sequence somewhere? [v8.16.0 try http://www.rsyslog.com/e/2207 ]\r\nJan 29 23:13:04 8d303d0449d6 rsyslogd-2207:error during parsing file /etc/haprox\r\ny/rsyslogd.conf, on or before line 12: invalid character ')' - is there an inval\r\nid escape sequence somewhere? [v8.16.0 try http://www.rsyslog.com/e/2207 ]\r\nJan 29 23:13:04 8d303d0449d6 rsyslogd-2207:error during parsing file /etc/haprox\r\ny/rsyslogd.conf, on or before line 14: invalid character '(' - is there an inval\r\nid escape sequence somewhere? [v8.16.0 try http://www.rsyslog.com/e/2207 ]\r\nJan 29 23:13:04 8d303d0449d6 rsyslogd-2207:error during parsing file /etc/haprox\r\ny/rsyslogd.conf, on or before line 16: invalid character ')' - is there an inval\r\nid escape sequence somewhere? [v8.16.0 try http://www.rsyslog.com/e/2207 ]\r\n```\r\n\r\nhaproxy's rsyslogd configuration:\r\n```\r\nroot@8d303d0449d6:/# cat /etc/haproxy/rsyslogd.conf\r\n$ModLoad imudp.so\r\n$UDPServerRun 8514\r\n$template CustomFormat,\"%timegenerated% %HOSTNAME% %syslogtag%%msg%\\n\"\r\n$ActionFileDefaultTemplate CustomFormat\r\n\r\n/* info */\r\nif $programname contains 'haproxy' and $syslogseverity == 6 then (\r\n    action(type=\"omfile\" file=\"/var/log/haproxy/traffic\")\r\n)\r\nif $programname contains 'haproxy' and $syslogseverity-text == 'err' then (\r\n    action(type=\"omfile\" file=\"/var/log/haproxy/errors\")\r\n)\r\n/* notice */\r\nif $programname contains 'haproxy' and $syslogseverity <= 5 then (\r\n    action(type=\"omfile\" file=\"/var/log/haproxy/events\")\r\n)\r\n\r\n*.* /var/log/messages\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rancher/rancher/issues/comments/301716572","html_url":"https://github.com/rancher/rancher/issues/7591#issuecomment-301716572","issue_url":"https://api.github.com/repos/rancher/rancher/issues/7591","id":301716572,"user":{"login":"mbernasocchi","id":233663,"avatar_url":"https://avatars0.githubusercontent.com/u/233663?v=3","gravatar_id":"","url":"https://api.github.com/users/mbernasocchi","html_url":"https://github.com/mbernasocchi","followers_url":"https://api.github.com/users/mbernasocchi/followers","following_url":"https://api.github.com/users/mbernasocchi/following{/other_user}","gists_url":"https://api.github.com/users/mbernasocchi/gists{/gist_id}","starred_url":"https://api.github.com/users/mbernasocchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbernasocchi/subscriptions","organizations_url":"https://api.github.com/users/mbernasocchi/orgs","repos_url":"https://api.github.com/users/mbernasocchi/repos","events_url":"https://api.github.com/users/mbernasocchi/events{/privacy}","received_events_url":"https://api.github.com/users/mbernasocchi/received_events","type":"User","site_admin":false},"created_at":"2017-05-16T08:46:32Z","updated_at":"2017-05-16T08:46:32Z","body":"Same syntax error and empty logs with 1.6.0 and\r\n```\r\nlb_config:\r\n     config: |-\r\n       defaults\r\n       log 127.0.0.1:8514 local0 debug\r\n```"}}
{"actor":{"display_login":"mbernasocchi"}}