Bug#974977: HA-Proxy 2.3.0 doesn't log into haproxy.log
❦ 4 janvier 2021 11:52 +01, Katharina Drexel: > Meanwhile, the logging problem is solved upstream (tested with > 2.4-dev4-4d71176). > With the default config and the rsyslog snippet (49-haproxy.conf) the logs go > into haproxy.log again and look like: > > Jan 4 11:40:53 haproxy-test haproxy[411079]: 81.XXX.XXX.142:36800 > [04/Jan/2021:11:40:53.782] test- http-/web1.backup.example.com > 1/0/32 4081 -- 1/1/0/0/0 0/0 The patch has been backported to 2.3 and will be present in 2.3.3. -- Replace repetitive expressions by calls to a common function. - The Elements of Programming Style (Kernighan & Plauger)
Bug#974977: HA-Proxy 2.3.0 doesn't log into haproxy.log
Meanwhile, the logging problem is solved upstream (tested with 2.4-dev4-4d71176). With the default config and the rsyslog snippet (49-haproxy.conf) the logs go into haproxy.log again and look like: Jan 4 11:40:53 haproxy-test haproxy[411079]: 81.XXX.XXX.142:36800 [04/Jan/2021:11:40:53.782] test- http-/web1.backup.example.com 1/0/32 4081 -- 1/1/0/0/0 0/0 -- Berner Fachhochschule / Bern University of Applied Sciences IT-Services / Team Linux & Infrastructure Services Katharina Drexel IT System Engineer ___ Dammweg 3, CH-3013 Bern Telefon direkt +41 31 848 48 87 Telefon Servicedesk +41 31 848 48 48 katharina.dre...@bfh.ch https://bfh.ch https://bfh.science
Bug#974977: HA-Proxy 2.3.0 doesn't log into haproxy.log
bug report in upstream is open: https://github.com/haproxy/haproxy/issues/963 On Wednesday, 2020-11-18, 09:31:59 (GMT +0100), Vincent Bernat wrote: > ❦ 18 novembre 2020 09:11 +01, Katharina Drexel: > > >> > local0.*/var/log/haproxy.log > >> > > >> Logging all local0 to /var/log/haproxy.log is too wide. The match below > >> should still work as the program name is still HAProxy. I don't see > >> anything that would explain why it would not work. Can you copy/paste > >> one log line to check if program name is haproxy. > >> -- > > > > Here some log output from the syslog (when above patch not applied): > > > > Nov 18 08:21:48 node1 node1.proxy.nextcloud-test.example.com > > haproxy[63848]: 194.193.242.80:46764 [18/Nov/2020:08:21:47.102] http-lb4~ > > http-nodes4/node1.nextcloud-test.example.com 0/0/4/1846/1850 200 1785 - - > > --NN 1/1/2/2/0 0/0 {Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 > > Firefox/82.0} "GET > > https://nextcloud-test.example.com/index.php/svg/core/actions/public?color=fff=1 > > HTTP/2.0" > > The hostname seems to be repeated. There have been many changes in the > log infrastructure in 2.3. Looking a bit at the history, maybe this is > "MEDIUM: log/sink: re-work and merge of build message API." As there are > many subsequent changes, it's not easy to revert to test. > > Could you report this upstream? Maybe they'll have a clue. > > Thanks. > -- > 10.0 times 0.1 is hardly ever 1.0. > - The Elements of Programming Style (Kernighan & Plauger) -- Berner Fachhochschule / Bern University of Applied Sciences IT-Services / Team Linux & Infrastructure Services Katharina Drexel IT System Engineer ___ Dammweg 3, CH-3013 Bern Telefon direkt +41 31 848 48 87 Telefon Servicedesk +41 31 848 48 48 katharina.dre...@bfh.ch https://bfh.ch https://bfh.science
Bug#974977: HA-Proxy 2.3.0 doesn't log into haproxy.log
❦ 17 novembre 2020 14:52 +01, Katharina Drexel: > When updating from haproxy 2.2.5 to 2.3.0, the logs only go into syslog, not > to haproxy.log any more. > For fixing that, you need an additional line in the 49-haproxy.conf of > rsyslog: > > local0.*/var/log/haproxy.log > > The diff would be: > > --- 49-haproxy.conf 2020-11-16 18:27:04.628696482 +0100 > +++ /tmp/49-haproxy.conf2020-11-16 18:26:30.896699927 +0100 > @@ -3,7 +3,8 @@ > $AddUnixListenSocket /var/lib/haproxy/dev/log > > # Send HAProxy messages to a dedicated logfile > +local0.*/var/log/haproxy.log > + > :programname, startswith, "haproxy" { >/var/log/haproxy.log >stop > > Im am using bullseye/sid and kernel 5.7.0-2progress5+u1-amd64. Logging all local0 to /var/log/haproxy.log is too wide. The match below should still work as the program name is still HAProxy. I don't see anything that would explain why it would not work. Can you copy/paste one log line to check if program name is haproxy. -- F.S. Fitzgerald to Hemingway: "Ernest, the rich are different from us." Hemingway: "Yes. They have more money."
Bug#974977: HA-Proxy 2.3.0 doesn't log into haproxy.log
Package: haproxy Version: 2.3.0-1 Severity: normal Hello, When updating from haproxy 2.2.5 to 2.3.0, the logs only go into syslog, not to haproxy.log any more. For fixing that, you need an additional line in the 49-haproxy.conf of rsyslog: local0.*/var/log/haproxy.log The diff would be: --- 49-haproxy.conf 2020-11-16 18:27:04.628696482 +0100 +++ /tmp/49-haproxy.conf2020-11-16 18:26:30.896699927 +0100 @@ -3,7 +3,8 @@ $AddUnixListenSocket /var/lib/haproxy/dev/log # Send HAProxy messages to a dedicated logfile +local0.*/var/log/haproxy.log + :programname, startswith, "haproxy" { /var/log/haproxy.log stop Im am using bullseye/sid and kernel 5.7.0-2progress5+u1-amd64. -- Berner Fachhochschule / Bern University of Applied Sciences IT-Services / Team Linux & Infrastructure Services Katharina Drexel IT System Engineer ___ Dammweg 3, CH-3013 Bern Telefon direkt +41 31 848 48 87 Telefon Servicedesk +41 31 848 48 48 katharina.dre...@bfh.ch https://bfh.ch https://bfh.science