fabio icon indicating copy to clipboard operation
fabio copied to clipboard

Logging is truncated when set to delta

Open scalp42 opened this issue 3 years ago • 6 comments

When using Fabio 1.5.14 with logging set to delta, it appears that the logs are truncated:

Sep 29 23:01:43 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:01:43 [INFO] Config updates
Sep 29 23:01:43 ip-10-82-220-170 fabio[4170]: - 45.4:31201/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:01:43 ip-10-82-220-170 fabio[4170]: - route add prod-data-ranking-api /prod-data-ranking-api http://10.82.
Sep 29 23:01:59 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:01:59 [INFO] Unregistered timer _./prod-data-ranking-api
Sep 29 23:01:59 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:01:59 [INFO] Config updates
Sep 29 23:01:59 ip-10-82-220-170 fabio[4170]: - ranking-api /prod-data-ranking-api http://10.82.17.10:27041/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:01:59 ip-10-82-220-170 fabio[4170]: - route add prod-data-
Sep 29 23:02:10 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:02:10 [INFO] Config updates
Sep 29 23:02:10 ip-10-82-220-170 fabio[4170]: + ranking-api /prod-data-ranking-api http://10.82.45.4:31201/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:02:10 ip-10-82-220-170 fabio[4170]: + route add prod-data-
Sep 29 23:02:11 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:02:11 [INFO] Config updates
Sep 29 23:02:11 ip-10-82-220-170 fabio[4170]: + ranking-api /prod-data-ranking-api http://10.82.20.188:26312/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:02:11 ip-10-82-220-170 fabio[4170]: + route add prod-data-
Sep 29 23:02:37 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:02:37 [INFO] Config updates
Sep 29 23:02:37 ip-10-82-220-170 fabio[4170]: - ranking-api /prod-data-ranking-api http://10.82.20.188:26312/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:02:37 ip-10-82-220-170 fabio[4170]: - route add prod-data-
Sep 29 23:02:43 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:02:43 [INFO] Config updates
Sep 29 23:02:43 ip-10-82-220-170 fabio[4170]: + ranking-api /prod-data-ranking-api http://10.82.17.10:27041/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:02:43 ip-10-82-220-170 fabio[4170]: + route add prod-data-
Sep 29 23:02:47 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:02:47 [INFO] Config updates
Sep 29 23:02:47 ip-10-82-220-170 fabio[4170]: + ranking-api /prod-data-ranking-api http://10.82.11.52:28403/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:02:47 ip-10-82-220-170 fabio[4170]: + route add prod-data-
Sep 29 23:02:47 ip-10-82-220-170 fabio[4170]: 2020/09/29 23:02:47 [INFO] Config updates
Sep 29 23:02:47 ip-10-82-220-170 fabio[4170]: + 20.188:26312/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:02:47 ip-10-82-220-170 fabio[4170]: + route add prod-data-ranking-api /prod-data-ranking-api http://10.82.

The length restriction seems to be random, for example we get 10.82.1 here:

Sep 29 23:01:16 ip-10-82-220-170 fabio[4170]: + 7.10:27041/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:01:16 ip-10-82-220-170 fabio[4170]: + route add prod-data-ranking-api /prod-data-ranking-api http://10.82.1

Thanks in advance

scalp42 avatar Sep 29 '20 23:09 scalp42

Looking more into it, it looks like it's the full line split in reverse order:

Sep 29 23:01:43 ip-10-82-220-170 fabio[4170]: - 45.4:31201/ tags "latest" opts "strip=/prod-data-ranking-api"
Sep 29 23:01:43 ip-10-82-220-170 fabio[4170]: - route add prod-data-ranking-api /prod-data-ranking-api http://10.82.

scalp42 avatar Sep 29 '20 23:09 scalp42

I've also seen this in my logs from fabio. I'm assuming this is not saying that fabio has incorrect routes, and it's more of an issue buffering and writing out the log. At the very least, this makes parsing the logs impossible.

@scalp42, are you running the latest release or an older version?

Also, @scalp42, do you see this work ok if you set logging to something other than delta?

ketzacoatl avatar Jun 14 '22 13:06 ketzacoatl

Interesting, the logs are not just truncated, they are split and in reverse order.

For example:

foobar

Is coming out like:

bar
foo

Also, it seems to happen the most on IP addresses.

ketzacoatl avatar Jun 20 '22 16:06 ketzacoatl

One last bit, I see this on the latest stable release (v1.6.0)

ketzacoatl avatar Jun 20 '22 17:06 ketzacoatl

@ketzacoatl I moved away from Fabio at this time but seems about right with what you see.

scalp42 avatar Jun 20 '22 18:06 scalp42

@leprechau any insights on this one? Have you seen it in your own deployments?

ketzacoatl avatar Jun 24 '22 14:06 ketzacoatl