Too many redirects when running behind load balancer?, posted by Tamas Gal on Tue Jul 19 11:01:00 2022
|
We were running ELOG for many many years in our experiments and the instance was operated on a Debian XEN server as a container. I am now trying to migrate
it into our Docker Swarm cluster and I am using the https://hub.docker.com/r/de1lz/elog-docker Docker image, which works very well with our logbooks
when I run it as a single container. However, when I put the container behind my load balancer (HAProxy) using the simple HTTP mode (which works very |
Re: Too many redirects when running behind load balancer?, posted by Stefan Ritt on Tue Jul 19 11:13:09 2022
|
Probably you need a setting
URL = https://elog.test.km3net.de
or so in your elogd.cfg file. |
Re: Too many redirects when running behind load balancer?, posted by Tamas Gal on Tue Jul 19 11:17:44 2022
|
Thanks for the quick reply! Sorry, I forgot to paste the "global" part of the config, I have that URL already set:
[global]
;Main Settings |
Re: Too many redirects when running behind load balancer?, posted by Tamas Gal on Tue Jul 19 11:24:36 2022
|
I also tried the default configuration (example config) and it that works behind the load balancer. So I guess it's related to the password-page,
which causes this redirect loop? Our logbooks are all password protected, so when a logbook URL is clicked, it should first present the login-form, and
that's where it chokes. |
Re: Too many redirects when running behind load balancer?, posted by Stefan Ritt on Tue Jul 19 11:40:59 2022
|
Yeah, after you enter a password, elog redirects to what it finds in "URL". You can trace that by opening "development tools" in
Google Chrome, go to "network" and watch packets going back and forth. I never worked with the load balancer, but maybe you need a different
"URL" containing a '/' at the end? |
Re: Too many redirects when running behind load balancer?, posted by Tamas Gal on Tue Jul 19 12:36:04 2022
|
My problem is that I don't even reach the page where I can enter a password. If you go to https://elog.test.km3net.de and click on a logbook,
you'll see that it immediately goes into a redirect loop. I already logged the routing but there is nothing else...
Stefan |
Re: Too many redirects when running behind load balancer?, posted by Tamas Gal on Tue Jul 19 12:38:12 2022
|
Attached is the log, where you can see that `Operations+IT` redirects to `Operations+IT/` and that redirects to `Operations+IT` again, which then goes
to `elog.test.km3net.de` and `Operations+IT` again etc. etc.
EDIT: I use the very same load balancer confugration for dozens of other services incl. Apache, Nginx, GitLab, Mattermost, RocketChat |
Re: Too many redirects when running behind load balancer?, posted by Stefan Ritt on Tue Jul 19 12:48:42 2022
|
Yes I see the redirects. You say with the example logbook it works, right? Is it the password protection which triggers the problem or anything else?
Does it work if you take out the password protection? The key is to identify which setting in your config file triggers the problem, so you can bracket
the problem down between the example logbook and your logbook definition. |
Re: Too many redirects when running behind load balancer?, posted by Tamas Gal on Tue Jul 19 12:57:37 2022
|
Yes, I used the empty `passwd` file from example. When I then click on one of the logbooks, I get to the page where I can register a user (see attached
screenshot). After clickin on "Save" for the user registration, I again get the redirect error. Once there is a registered user (i.e. a
non-empty password file) the redirect issue is persistent. Any idea where the problem might be? I just emptied the password file again, so you can |
Re: Too many redirects when running behind load balancer?, posted by Tamas Gal on Fri Jan 20 14:11:52 2023
|
The issue is still present and now it's quite urgent to move this last service into the Swarm. Does anyone maybe have an idea what's wrong? To
sum up: if there is a non-empty password file, the login page chokes in an infinite loop of redirects. I am using the same HAProxy load balancer configuration
as for all the other services (running Apache, NGINX, GitLab, XWiki, etc.): |
Duplicated \n in "plain" format with new WebKit, posted by Andrey on Tue Dec 27 12:44:52 2022
|
Dear Stefan,
There is a problem with editing an Elog page in "plain" format with the following "User Agent" :
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15" |
bug report to webkit.org , posted by Andrey on Wed Dec 28 16:09:30 2022
|
It shound't be a "bug report", sorry. I have changed the category to "Info".
It seems to be really a bug in the WebKit core. I have created a bug report there. For reference: https://bugs.webkit.org/show_bug.cgi?id=249923
|
a hack around, posted by Andrey on Thu Dec 29 20:26:11 2022
|
FYI.
Removing "wrap=hard" on the line #11461 in the elogd.cxx file resolves my problem.
|
a hack around, posted by Konstantin Olchanski on Fri Dec 30 00:46:03 2022
|
- rsprintf("<textarea rows=%d cols=%d wrap=hard name=\"Text\">\n", height, width);
+ rsprintf("<textarea rows=%d cols=%d name=\"Text\">\n", height, width);
|
webkit bug, posted by Andrey Pashnin on Mon Jan 2 12:32:13 2023
|
FYI
They seem to have accepted the bug report:
|
a hack around, posted by Stefan Ritt on Wed Jan 4 09:33:25 2023
|
> - rsprintf("<textarea rows=%d cols=%d wrap=hard name=\"Text\">\n", height, width);
> + rsprintf("<textarea rows=%d cols=%d name=\"Text\">\n", height, width);
>
|
a hack around, posted by Stefan Ritt on Wed Jan 4 09:39:38 2023 
|
Ahh, now I remember. Well, the I put that in like 25 years ago ;-)
Let's assume the user write a very long line and relies on the wrapping of the text box. So the input might look like the
|
editing on a smartphone, posted by Andrey Pashnin on Wed Jan 4 10:05:38 2023
|
oh! so, that's the cause of another problem I faced a while ago.
When people edited an ELOG page on a narrow screen device (a.k.a smartphone) it put the extra CRLF and made the page look like the attachment below
(it broke the original formatting).
|
editing on a smartphone, posted by Stefan Ritt on Wed Jan 4 10:12:43 2023
|
Yepp, that's right. But without the "wrap=hard", you could get one single long line which is almost impossible to read. So there is no perfect solution
for all cases. I see three options
|
config option?, posted by Andrey Pashnin on Wed Jan 4 11:03:45 2023
|
How about adding a config option?
Ideally, it might be nice to have this option "per record" or "per logbook", but "per instance" should be good enough. |
config option?, posted by Stefan Ritt on Wed Jan 4 11:43:00 2023
|
Ok, I added an option
Hard wrap = 0 | 1
|
config option?, posted by Andrey Pashnin on Wed Jan 4 11:53:35 2023
|
That's great! Thank you very much. |
wrap "pre" tag in a "div" with fixed width, posted by Andrey Pashnin on Wed Jan 4 11:39:39 2023 
|
I'm sorry for being annoying...
but I have tried to wrap the <pre> tag in a <div> and it seems to do the trick
(the text is a single line with repeating aaa-b-cc sequence)
|
wrap "pre" tag in a "div" with fixed width, posted by Stefan Ritt on Wed Jan 4 12:17:46 2023
|
Didn't work for me. The text is just truncated after the width and no extra lines are added. |
wrap "pre" tag in a "div" with fixed width, posted by Andrey Pashnin on Wed Jan 4 14:05:25 2023
|
Sorry, I forgot to mention that I also added some styles to the <pre> tag:
style="white-space: normal"
(see the screenshot on my previous post) |
wrap "pre" tag in a "div" with fixed width, posted by Stefan Ritt on Wed Jan 4 14:23:12 2023
|
> Sorry, I forgot to mention that I also added some styles to the <pre> tag:
> style="white-space: normal"
> (see the screenshot on my previous post)
|
white-space: pre-wrap", posted by Andrey Pashnin on Wed Jan 4 14:38:54 2023
|
> I guess we want "white-space: pre-wrap" which keeps the old line breaks.
Yep. You're right. Thanks! |
URL causes elog crash, posted by Germano Massullo on Tue Dec 20 21:16:37 2022
|
Hello, the following URL
https://foo.bar/elog/Shift+Reports/?new_user_name=a2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.coma2seferewd@fonomsdfef.com&new_full_name=a2seferewd%40fanneat.com&new_user_email=a2seferewd%40fanneat.com&newpwd=asdf&newpwd2=asdf&cmd=Save
causes elog 3.1.4 to crash. I attach full GDB trace |
Re: URL causes elog crash, posted by Stefan Ritt on Wed Jan 4 13:38:29 2023
|
I added a user name validation in the current version.
Stefan
Germano |
Post using html form --> not solved ... , posted by Hayg Guler on Wed Jan 4 11:00:01 2023
|
Dear All,
Just want to come back to this issue I faced.
In the config file, I call an html form to format input. The way I call the html file inside my config file is described below. |
Re: Post using html form --> not solved ... , posted by Stefan Ritt on Wed Jan 4 12:38:07 2023
|
When you log in manually to a logbook, a session ID is created and stored in a cookie "sid". On your shift check list you need some code to
copy this session ID into your current form. In the code form 2010, I used "unm" and "upwd", but this was removed since it's not
safe. So now you need somethign like: |
duplicated/extra newlines (LF) after submit with Safari (since 15.4), posted by Andrey on Tue May 10 09:31:40 2022
|
I think this is a bug report.
However, I am not sure whether the problem is in the new version of Apple's WebKit (15.4) or in the ELOG itself.
|
reproduced on the latest newly compiled Elogd, posted by Andrey on Tue May 10 10:58:12 2022
|
I have just setup a new ELOG server on another machine. I took the latest source code from here: http://elog.psi.ch/elog/download/tar/elog-latest.tar.gz.
Compiled it and ran.
Still the same problem with Safari. |
RESOLVED HERE:, posted by Andrey Pashnin on Wed Jan 4 11:54:55 2023
|
see https://elog.psi.ch/elogs/Forum/69594 |
please DELETE this thread, posted by Andrey Pashnin on Wed Jan 4 11:58:19 2023
|
I added a reply to my previous post about this issue (a few months ago) to point to the solution, but ELOG moved it to the top of the forum.
And I cannot delete this now, because I change my user name from "Andrey" to "Andrey Pashnin" :)
|
custom css not loaded, posted by Laurent Jean-Rigaud on Fri Dec 2 14:02:49 2022
|
Hi,
I use some CSS for each elog to resize column correcly and it seems that current ELOG version 3.14 available from EPEL for EL7 has a problem
(maybe others also). |
Re: custom css not loaded, posted by Laurent Jean-Rigaud on Fri Dec 2 14:44:46 2022
|
Update : i tryed with last git, w/o ldap support and it seems the problem is solved with CCS URL on same machine (just replace the elogd binary from
EPEL by new one just build w/o LDAP support and fallback on File to login for testing).
So my problem is the error during build with LDAP auth (since using C++) :-( |
remove elog from EPEL and Fedora., posted by Konstantin Olchanski on Mon Dec 5 04:15:17 2022
|
> elogd binary from EPEL
thank you for bringing this up to our attention. we recently went through this with debian and ubuntu. the elog package was severely out of date and
|
remove elog from EPEL and Fedora., posted by Germano Massullo on Tue Dec 20 17:37:42 2022
|
> > elogd binary from EPEL
>
> thank you for bringing this up to our attention. we recently went through this with debian and ubuntu. the elog package was severely out of date and |
Buildrpm / copy .cxx in place of .c, posted by Laurent Jean-Rigaud on Fri Dec 2 14:12:35 2022
|
Hi Stefan,
It seems buildrpm should be updated to take care of cpp files. Plz replace "cp <blahblah>.c
..." by "cp <blahblah>.cxx ..." . |
Planned maintenance at the top of ELOG listing, posted by Finn Junker on Mon Nov 21 09:46:46 2022
|
We use our instance of ELOG as a operations log so that newest events are sorted at the top.
Sometimes we are also up front informed about planned maintenance, and i would be nice to could "pin" them at the top - before
the sorting, so that operatores could have them in mind when starting a new shift. Have anyone found a way to solve this? |
Re: Planned maintenance at the top of ELOG listing, posted by David Pilgram on Mon Nov 21 13:32:04 2022
|
The way to do this is to ensure that the date of the entry is in the future. As a hard -core linux (ab)user of elog, I create an entry, then dive
into the yymmdda.log files, and edit it so that the date at the top of the entry is, for example, Sat, 31 Dec 2022 23:59:59. Then, that entry will
remain at the top of the listings until the New Year. I do this very thing for the very same reason, i.e. to keep one entry at the top of the listings |