javascript?, posted by Tim Schelfhout on Mon Sep 4 11:56:47 2017
|
Is there anyone out there who can help me get started using javascript in elog ? Is there an example somewhere ... i suppose you put the code in the
scripts folder?
Basically I am trying to calculate age of an added person in the database and display it after the birthdate field. I want to do other stuff, but once I know how
the interaction is done I can proceed.
Thankx heaps
Great job btw with this ELOG ... been using it for years now. I see you can add forms with html also, this might interest me for the future.
|
Re: javascript?, posted by Andreas Luedeke on Mon Sep 4 13:19:33 2017
|
This logbook, the forum, provides some javascript code. The code is simply referenced in the footer (Bottom text = <file> | <string> ).
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/default.min.css"><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script>
There's another example under elog:contributions/39
Cheers, Andreas
Tim Schelfhout wrote: |
Is there anyone out there who can help me get started using javascript in elog ? Is there an example somewhere ... i suppose you put the code in the
scripts folder?
Basically I am trying to calculate age of an added person in the database and display it after the birthdate field. I want to do other stuff, but once I know how
the interaction is done I can proceed.
Thankx heaps
Great job btw with this ELOG ... been using it for years now. I see you can add forms with html also, this might interest me for the future.
|
|
edit elog config via elog web interface, posted by Tim Schelfhout on Mon Sep 4 11:22:05 2017
|
Hello,
Is it possible to edit the entire elog config file via the elog frontend? I see the config button
on some screens but it only allows me to change user and password??
Thankx |
Re: edit elog config via elog web interface, posted by Andreas Luedeke on Mon Sep 4 13:08:35 2017
|
On the right side of "Change password" you should find "Change config file".
But you'll only see this, if the user has admin priviledges defined in the config file: "Admin user = <user>"

Then you can edit the configuration of that logbook. At the top you'll have a button "Change [global]" to edit the global part of the configuration - if you have the relevant priviledges to do so.
Tim Schelfhout wrote: |
Hello,
Is it possible to edit the entire elog config file via the elog frontend? I see the config button
on some screens but it only allows me to change user and password??
Thankx
|
|
Problems with german_UTF8 language, posted by Andreas Luedeke on Mon Aug 21 11:22:09 2017 
|
Hi Stefan,
since recently (a few weeks) ELOG confuses the language translations.
Individual language strings are translated into garbage; most other strings are fine.
Currently I see the string "please select" translated into "ressed" (see attached picture), instead of what's written correctly in the language file "bitte auswählen".
But with every restart the corrupted strings vary: other strings are affected and other garbage strings are shown - some of them unreadable binary code (see Attachment 2).
I have the same version running in English: I see no problems there.
Kind regards
Andreas |
Re: Problems with german_UTF8 language, posted by Andreas Luedeke on Wed Aug 23 15:11:32 2017
|
Just an update: I've re-compiled, reinstalled and restarted elogd for other reasons and now the corrupted strings are all gone. Everthing looks fine now.
But I never worry when a problem goes away before I could understand it: I'm confident that I will have plenty of time later, when the problem magically re-appears - likely I'll be called on a Friday night :-)
Andreas Luedeke wrote: |
Hi Stefan,
since recently (a few weeks) ELOG confuses the language translations.
Individual language strings are translated into garbage; most other strings are fine.
Currently I see the string "please select" translated into "ressed" (see attached picture), instead of what's written correctly in the language file "bitte auswählen".
But with every restart the corrupted strings vary: other strings are affected and other garbage strings are shown - some of them unreadable binary code (see Attachment 2).
I have the same version running in English: I see no problems there.
Kind regards
Andreas
|
|
HTML in attribute values, posted by Richard Stamper on Tue Aug 22 14:19:43 2017
|
When one has "Allow HTML = 1" to permit HTML in attribute values, is it only a subset of HTML that is rendered?
I find that <br> and <a href="..."> tags are properly rendered, for example, but lists with <ol> and <ul> are not. |
Re: HTML in attribute values, posted by Stefan Ritt on Tue Aug 22 14:26:42 2017
|
- As you can see...
- <UL> is possible
Richard Stamper wrote: |
When one has "Allow HTML = 1" to permit HTML in attribute values, is it only a subset of HTML that is rendered?
I find that <br> and <a href="..."> tags are properly rendered, for example, but lists with <ol> and <ul> are not.
|
|
Re: HTML in attribute values, posted by Richard Stamper on Tue Aug 22 14:36:46 2017
|
Isn't that list in the message text rather than as an attribute value?
Stefan Ritt wrote: |
- As you can see...
- <UL> is possible
Richard Stamper wrote: |
When one has "Allow HTML = 1" to permit HTML in attribute values, is it only a subset of HTML that is rendered?
I find that <br> and <a href="..."> tags are properly rendered, for example, but lists with <ol> and <ul> are not.
|
|
|
Re: HTML in attribute values, posted by Stefan Ritt on Tue Aug 22 14:37:44 2017
|
Sorry, I misread your question. Only following HTML tags are allowed in attributes:
<a>
<img>
<b>
<i>
<p>
<br>
<hr>
This is for some internal reason. Probably you can mimick <ul> with bullets and <p> tags.
Stefan
Richard Stamper wrote: |
Isn't that list in the message text rather than as an attribute value?
Stefan Ritt wrote: |
- As you can see...
- <UL> is possible
Richard Stamper wrote: |
When one has "Allow HTML = 1" to permit HTML in attribute values, is it only a subset of HTML that is rendered?
I find that <br> and <a href="..."> tags are properly rendered, for example, but lists with <ol> and <ul> are not.
|
|
|
|
Re: HTML in attribute values, posted by Richard Stamper on Tue Aug 22 14:58:09 2017
|
Exactly the information I was after - thanks! I'll simulate fancier markup as necessary.
Stefan Ritt wrote: |
Sorry, I misread your question. Only following HTML tags are allowed in attributes:
<a>
<img>
<b>
<i>
<p>
<br>
<hr>
This is for some internal reason. Probably you can mimick <ul> with bullets and <p> tags.
Stefan
Richard Stamper wrote: |
Isn't that list in the message text rather than as an attribute value?
Stefan Ritt wrote: |
- As you can see...
- <UL> is possible
Richard Stamper wrote: |
When one has "Allow HTML = 1" to permit HTML in attribute values, is it only a subset of HTML that is rendered?
I find that <br> and <a href="..."> tags are properly rendered, for example, but lists with <ol> and <ul> are not.
|
|
|
|
|
Bug with Drafts and Language German, posted by Andreas Luedeke on Mon Aug 21 11:45:06 2017
|
Hi Stefan,
when one creates a new entry, and a draft entry exists for the logbook, then a menu appears (see attachment).
If one select "Neuen Eintrag anlegen" then it should ignore the draft and create a new entry.
This feat is done by adding a "&ignore=1" to the "new" command: "<URL>/?cmd=New&ignore=1".
The problem is, that it should not be "cmd=New&..." but "cmd=Neu", since the commands are part of the translation.
Due to this, no new entry can be created as long as a draft exists; at least not in any language other than english.
This problem apparently existed since the beginning of drafts, but it only created problems at our site recently.
Kind Regards
Andreas
PS: Here's a patch that works:
diff elogd.c elogd.c-orig
9575,9576c9575,9576
< rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='?cmd=%s&ignore=1';\">\n", loc("Create new entry"),
< loc("New"));
---
> rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%s';\">\n", loc("Create new entry"),
> "?cmd=New&ignore=1"); |
Re: Bug with Drafts and Language German, posted by Andreas Luedeke on Mon Aug 21 12:16:05 2017
|
I've quickly checked: there are a couple more commands in the source code that are not language encoded. I guess some of them needs correction.
> egrep -n "cmd=[A-Za-z]" elogd.c
10293: rsprintf(" r.open('GET', '?jcmd=Unlock&edit_id=%d', true);\n", message_id);
11784: ("<label for=\"ELCode\"><a target=\"_blank\" href=\"?cmd=HelpELCode\">ELCode</a> </label>\n");
13663: "\r\n%s URL : %s?cmd=Config&cfg_user=%s&unm=%s\r\n", loc("Logbook"),
14562: redirect(lbs, "?cmd=Config");
14625: sprintf(str, "../%s/?cmd=Config", getparam("lbname"));
14678: sprintf(str, "../%s/?cmd=Config", lbn);
15703: combine_url(lbs, host, "?cmd=GetMD5", url, sizeof(url), &ssl);
16378: strcat(str, "?cmd=GetConfig"); // request complete config file
16380: strcat(str, "?cmd=Download"); // request config section of logbook
16570: strcat(str, "?cmd=GetPwdFile"); // request password file
17575: rsprintf("<br><b><a href=\"../%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
17577: rsprintf("<br><b><a href=\"%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
17579: rsprintf("<br><b><a href=\"../%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
18959: if (strstr(ref, "cmd=Search&"))
18960: strlcpy(strstr(ref, "cmd=Search&"), strstr(ref, "cmd=Search&") + 11, sizeof(str));
26728: rsprintf("<a href=\"?cmd=Synchronize\">%s</a></td>\n", loc("Synchronize all logbooks"));
Andreas Luedeke wrote: |
Hi Stefan,
when one creates a new entry, and a draft entry exists for the logbook, then a menu appears (see attachment).
If one select "Neuen Eintrag anlegen" then it should ignore the draft and create a new entry.
This feat is done by adding a "&ignore=1" to the "new" command: "<URL>/?cmd=New&ignore=1".
The problem is, that it should not be "cmd=New&..." but "cmd=Neu", since the commands are part of the translation.
Due to this, no new entry can be created as long as a draft exists; at least not in any language other than english.
This problem apparently existed since the beginning of drafts, but it only created problems at our site recently.
Kind Regards
Andreas
PS: Here's a patch that works:
diff elogd.c elogd.c-orig
9575,9576c9575,9576
< rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='?cmd=%s&ignore=1';\">\n", loc("Create new entry"),
< loc("New"));
---
> rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%s';\">\n", loc("Create new entry"),
> "?cmd=New&ignore=1");
|
|
Sharing logbooks among "Top Groups", posted by Satyajit Jena on Sun Aug 20 10:07:57 2017
|
Hi,
I am currently trying to configuring elog top groups, which are supposed to separate from each other. However, I would like to have a common logbook that should be visible in each group. Is there a way to share logbooks among Top Groups for example
Top Group Electronics = Elec1, Elec_EEE, Ele2
Top Group Processing = P_AA1, PPP2, Elec_EEE
Top Group Monitoring = Mon1, Mon2, Mon3, Mon4
Top Group Data = Data1, PPP2, Data2
I would like logbook to be viewed:
- Electronics:
- Processing:
- Monitoring:
- Data:
- Data1
- PPP2
- Data2
- Mon3
- Mon4
Could you please suggest me if it is possible to set in this way (Color codes t show the common sharing).
Many thanks and regards,
satyajit |
Re: Sharing logbooks among "Top Groups", posted by Andreas Luedeke on Sun Aug 20 14:55:18 2017
|
I don't know if that works. Why don't you just try?
Satyajit Jena wrote: |
Hi,
I am currently trying to configuring elog top groups, which are supposed to separate from each other. However, I would like to have a common logbook that should be visible in each group. Is there a way to share logbooks among Top Groups for example
Top Group Electronics = Elec1, Elec_EEE, Ele2
Top Group Processing = P_AA1, PPP2, Elec_EEE
Top Group Monitoring = Mon1, Mon2, Mon3, Mon4
Top Group Data = Data1, PPP2, Data2
I would like logbook to be viewed:
- Electronics:
- Processing:
- Monitoring:
- Data:
- Data1
- PPP2
- Data2
- Mon3
- Mon4
Could you please suggest me if it is possible to set in this way (Color codes t show the common sharing).
Many thanks and regards,
satyajit
|
|
Re: Sharing logbooks among "Top Groups", posted by Satyajit Jena on Sun Aug 20 16:21:59 2017
|
Hi,
I tried without success. Logbook is not sharing, it is displaying only under one "Top Group" whereever it appears first.
With regards,
satyajit
Andreas Luedeke wrote: |
I don't know if that works. Why don't you just try?
Satyajit Jena wrote: |
Hi,
I am currently trying to configuring elog top groups, which are supposed to separate from each other. However, I would like to have a common logbook that should be visible in each group. Is there a way to share logbooks among Top Groups for example
Top Group Electronics = Elec1, Elec_EEE, Ele2
Top Group Processing = P_AA1, PPP2, Elec_EEE
Top Group Monitoring = Mon1, Mon2, Mon3, Mon4
Top Group Data = Data1, PPP2, Data2
I would like logbook to be viewed:
- Electronics:
- Processing:
- Monitoring:
- Data:
- Data1
- PPP2
- Data2
- Mon3
- Mon4
Could you please suggest me if it is possible to set in this way (Color codes t show the common sharing).
Many thanks and regards,
satyajit
|
|
|
Re: Sharing logbooks among "Top Groups", posted by Andreas Luedeke on Mon Aug 21 08:51:09 2017
|
Hi Satyajit,
I think you've just answered your own question. There is no magic switch - as far as I know - that would change that behaviour.
Probably there are ways to achieve your desired behaviour (using mirror servers and synchronising the logbooks) but that would require a large effort and would make your installation a lot more complicated.
With kind regards, Andreas
Satyajit Jena wrote: |
Hi,
I tried without success. Logbook is not sharing, it is displaying only under one "Top Group" whereever it appears first.
With regards,
satyajit
Andreas Luedeke wrote: |
I don't know if that works. Why don't you just try?
Satyajit Jena wrote: |
Hi,
I am currently trying to configuring elog top groups, which are supposed to separate from each other. However, I would like to have a common logbook that should be visible in each group. Is there a way to share logbooks among Top Groups for example
Top Group Electronics = Elec1, Elec_EEE, Ele2
Top Group Processing = P_AA1, PPP2, Elec_EEE
Top Group Monitoring = Mon1, Mon2, Mon3, Mon4
Top Group Data = Data1, PPP2, Data2
I would like logbook to be viewed:
- Electronics:
- Processing:
- Monitoring:
- Data:
- Data1
- PPP2
- Data2
- Mon3
- Mon4
Could you please suggest me if it is possible to set in this way (Color codes t show the common sharing).
Many thanks and regards,
satyajit
|
|
|
|
elogd hangs, posted by Alan Grant on Fri Aug 18 05:28:16 2017
|
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times). |
Re: elogd hangs, posted by Stefan Ritt on Fri Aug 18 08:59:08 2017
|
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
Re: elogd hangs, posted by David Pilgram on Fri Aug 18 12:40:21 2017
|
I have experience of elog hanging (under linux). I'll describe my situation, although it may not apply to you. I still use elog 2.9.2 but I am unaware of this issue ever being resolved although I have mentioned it in the past. (Possibly because I'm one of the few who has this situation). I certainly recall other person had this as the problem, and my reply on this forum solved their problem. The cause is the following:
1. A thread with a large number of replies - something over 40 I think.
2. This long thread is deleted from the first entry. This will crash elog,
3. Once restarted, the later entries of the deleted thread (which survived the deletion attempt when elog crashed) are accessed. This will cause elog to go into an endless loop and hang. Until I learnt better, I had to reboot the computer. Under linux kill -9 (process) does the job, but kill (process) does not.
The problem lays with the first entry that survived the attempt at deletion. It has an "In reply to" line in the entry in the yymmdda.log file, referring to an entry that has now been deleted. Manually editing the yymmdda.log file to remove that line does the trick, and then the surviving entries can be accessed and deleted.
A good work-around is that if you are about to delete a long thread is to delete it in sections, starting at the end. It is useful to note the entry number or some other way to find it again after the last section is deleted, as of course it will now be back in with the even older entries. Or have two tabs on your browser accessing the same thread.
If you want to move the long thread to another logbook, to avoid the problem, Copy the thread, and then do the deletion in stages. Moving a long thread does the same computer crash/computer hang, although the Copying part is done fine, the deletion part is the problem.
You don't have to have a large number of replies to an entry to cause the hang in controlled conditions. Just edit the yymmdda.log file of a new entry adding in a "In reply to" line referring to an earlier entry number that does not exist is enough to cause the problem when you try and access the thread.
If this is the cause of your issue, the problem is to find the orphan thread that is causing the hang, especially after all this time. Also, you may have more than one orphan thread. Even though I am aware of the problem, I do occasionally find orphan threads in my logbooks. In my case I use the ticketing system, and searching by ticket number will find an orphan thread without hanging the computer, but if you then click on any entry found - hang.
There is a related issue, which I think I have now resolved. If the entry in the "Reply to" field in the yymmdda.log file does not exist, that is a later entry (not earlier, as above), elog will cause a duplicate entry, always in bold, with entry no 0 to appear in the listings. This entry is an artifact that appears in the listings, not a real entry in a yymmdda.log file. Again, finding the rogue entry is the tricky bit.
Stefan Ritt wrote: |
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
|
Re: elogd hangs, posted by Alan Grant on Fri Aug 18 15:10:15 2017
|
Yes I think I recall the incident in the Forum you're talking about from previous searches I've done on hanging however so far I haven't used Reply To's in this elog instance. Nevertheless, you explained it very well and it's good points to keep in mind should I ever use them, thank you David.
David Pilgram wrote: |
I have experience of elog hanging (under linux). I'll describe my situation, although it may not apply to you. I still use elog 2.9.2 but I am unaware of this issue ever being resolved although I have mentioned it in the past. (Possibly because I'm one of the few who has this situation). I certainly recall other person had this as the problem, and my reply on this forum solved their problem. The cause is the following:
1. A thread with a large number of replies - something over 40 I think.
2. This long thread is deleted from the first entry. This will crash elog,
3. Once restarted, the later entries of the deleted thread (which survived the deletion attempt when elog crashed) are accessed. This will cause elog to go into an endless loop and hang. Until I learnt better, I had to reboot the computer. Under linux kill -9 (process) does the job, but kill (process) does not.
The problem lays with the first entry that survived the attempt at deletion. It has an "In reply to" line in the entry in the yymmdda.log file, referring to an entry that has now been deleted. Manually editing the yymmdda.log file to remove that line does the trick, and then the surviving entries can be accessed and deleted.
A good work-around is that if you are about to delete a long thread is to delete it in sections, starting at the end. It is useful to note the entry number or some other way to find it again after the last section is deleted, as of course it will now be back in with the even older entries. Or have two tabs on your browser accessing the same thread.
If you want to move the long thread to another logbook, to avoid the problem, Copy the thread, and then do the deletion in stages. Moving a long thread does the same computer crash/computer hang, although the Copying part is done fine, the deletion part is the problem.
You don't have to have a large number of replies to an entry to cause the hang in controlled conditions. Just edit the yymmdda.log file of a new entry adding in a "In reply to" line referring to an earlier entry number that does not exist is enough to cause the problem when you try and access the thread.
If this is the cause of your issue, the problem is to find the orphan thread that is causing the hang, especially after all this time. Also, you may have more than one orphan thread. Even though I am aware of the problem, I do occasionally find orphan threads in my logbooks. In my case I use the ticketing system, and searching by ticket number will find an orphan thread without hanging the computer, but if you then click on any entry found - hang.
There is a related issue, which I think I have now resolved. If the entry in the "Reply to" field in the yymmdda.log file does not exist, that is a later entry (not earlier, as above), elog will cause a duplicate entry, always in bold, with entry no 0 to appear in the listings. This entry is an artifact that appears in the listings, not a real entry in a yymmdda.log file. Again, finding the rogue entry is the tricky bit.
Stefan Ritt wrote: |
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
|
|
Re: elogd hangs, posted by Alan Grant on Fri Aug 18 15:15:57 2017
|
Yes I think I recall the incident in the Forum you're talking about from previous searches I've done on hanging however so far I haven't used Reply To's in this elog instance. Nevertheless, you explained it very well and it's good points to keep in mind should I ever use them, thank you David.
David Pilgram wrote: |
I have experience of elog hanging (under linux). I'll describe my situation, although it may not apply to you. I still use elog 2.9.2 but I am unaware of this issue ever being resolved although I have mentioned it in the past. (Possibly because I'm one of the few who has this situation). I certainly recall other person had this as the problem, and my reply on this forum solved their problem. The cause is the following:
1. A thread with a large number of replies - something over 40 I think.
2. This long thread is deleted from the first entry. This will crash elog,
3. Once restarted, the later entries of the deleted thread (which survived the deletion attempt when elog crashed) are accessed. This will cause elog to go into an endless loop and hang. Until I learnt better, I had to reboot the computer. Under linux kill -9 (process) does the job, but kill (process) does not.
The problem lays with the first entry that survived the attempt at deletion. It has an "In reply to" line in the entry in the yymmdda.log file, referring to an entry that has now been deleted. Manually editing the yymmdda.log file to remove that line does the trick, and then the surviving entries can be accessed and deleted.
A good work-around is that if you are about to delete a long thread is to delete it in sections, starting at the end. It is useful to note the entry number or some other way to find it again after the last section is deleted, as of course it will now be back in with the even older entries. Or have two tabs on your browser accessing the same thread.
If you want to move the long thread to another logbook, to avoid the problem, Copy the thread, and then do the deletion in stages. Moving a long thread does the same computer crash/computer hang, although the Copying part is done fine, the deletion part is the problem.
You don't have to have a large number of replies to an entry to cause the hang in controlled conditions. Just edit the yymmdda.log file of a new entry adding in a "In reply to" line referring to an earlier entry number that does not exist is enough to cause the problem when you try and access the thread.
If this is the cause of your issue, the problem is to find the orphan thread that is causing the hang, especially after all this time. Also, you may have more than one orphan thread. Even though I am aware of the problem, I do occasionally find orphan threads in my logbooks. In my case I use the ticketing system, and searching by ticket number will find an orphan thread without hanging the computer, but if you then click on any entry found - hang.
There is a related issue, which I think I have now resolved. If the entry in the "Reply to" field in the yymmdda.log file does not exist, that is a later entry (not earlier, as above), elog will cause a duplicate entry, always in bold, with entry no 0 to appear in the listings. This entry is an artifact that appears in the listings, not a real entry in a yymmdda.log file. Again, finding the rogue entry is the tricky bit.
Stefan Ritt wrote: |
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
|
|
Re: elogd hangs, posted by David Pilgram on Fri Aug 18 21:16:12 2017
|
Hi Alan,
Just to be clear (and for others) if any entry is a reply to a previous one, such as this one is to yours, then there will be "Reply to" and "In reply to" fields in the entry as found in the yymmdda.log files. They are automatically generated as part of the elog program's internal structure, but are only there when there is a reply - so a new entry on a new topic does not have either field (at all) until there is a reply to that entry, when the fields start to appear in the log file.
David.
Alan Grant wrote: |
Yes I think I recall the incident in the Forum you're talking about from previous searches I've done on hanging however so far I haven't used Reply To's in this elog instance. Nevertheless, you explained it very well and it's good points to keep in mind should I ever use them, thank you David.
David Pilgram wrote: |
I have experience of elog hanging (under linux). I'll describe my situation, although it may not apply to you. I still use elog 2.9.2 but I am unaware of this issue ever being resolved although I have mentioned it in the past. (Possibly because I'm one of the few who has this situation). I certainly recall other person had this as the problem, and my reply on this forum solved their problem. The cause is the following:
1. A thread with a large number of replies - something over 40 I think.
2. This long thread is deleted from the first entry. This will crash elog,
3. Once restarted, the later entries of the deleted thread (which survived the deletion attempt when elog crashed) are accessed. This will cause elog to go into an endless loop and hang. Until I learnt better, I had to reboot the computer. Under linux kill -9 (process) does the job, but kill (process) does not.
The problem lays with the first entry that survived the attempt at deletion. It has an "In reply to" line in the entry in the yymmdda.log file, referring to an entry that has now been deleted. Manually editing the yymmdda.log file to remove that line does the trick, and then the surviving entries can be accessed and deleted.
A good work-around is that if you are about to delete a long thread is to delete it in sections, starting at the end. It is useful to note the entry number or some other way to find it again after the last section is deleted, as of course it will now be back in with the even older entries. Or have two tabs on your browser accessing the same thread.
If you want to move the long thread to another logbook, to avoid the problem, Copy the thread, and then do the deletion in stages. Moving a long thread does the same computer crash/computer hang, although the Copying part is done fine, the deletion part is the problem.
You don't have to have a large number of replies to an entry to cause the hang in controlled conditions. Just edit the yymmdda.log file of a new entry adding in a "In reply to" line referring to an earlier entry number that does not exist is enough to cause the problem when you try and access the thread.
If this is the cause of your issue, the problem is to find the orphan thread that is causing the hang, especially after all this time. Also, you may have more than one orphan thread. Even though I am aware of the problem, I do occasionally find orphan threads in my logbooks. In my case I use the ticketing system, and searching by ticket number will find an orphan thread without hanging the computer, but if you then click on any entry found - hang.
There is a related issue, which I think I have now resolved. If the entry in the "Reply to" field in the yymmdda.log file does not exist, that is a later entry (not earlier, as above), elog will cause a duplicate entry, always in bold, with entry no 0 to appear in the listings. This entry is an artifact that appears in the listings, not a real entry in a yymmdda.log file. Again, finding the rogue entry is the tricky bit.
Stefan Ritt wrote: |
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
|
|
|
Re: elogd hangs, posted by Alan Grant on Fri Aug 18 14:49:42 2017
|
I could begin debugging with C++. In the interim, if you think it will help, I can also provide you with my Config and log files, and the section of redacted data encompassing the time of the hang - just let me know. Regarding CPU usage, I have noted that in the past and have never seen very high CPU usage during an Elog hang. The VM itself remains responsive.
Stefan Ritt wrote: |
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
|
Re: elogd hangs, posted by Stefan Ritt on Fri Aug 18 16:26:14 2017
|
Well, having the config and data files only help if I can reproduce the hanging. If if you give me your files and a step-by-step instruction on how to reproduce the hanging, I can give it a try. But if it happens randomly after a while, it will be very hard for me to reproduce and fix it without the exaclty same user access pattern which of course I don't have.
Alan Grant wrote: |
I could begin debugging with C++. In the interim, if you think it will help, I can also provide you with my Config and log files, and the section of redacted data encompassing the time of the hang - just let me know. Regarding CPU usage, I have noted that in the past and have never seen very high CPU usage during an Elog hang. The VM itself remains responsive.
Stefan Ritt wrote: |
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
|
|
Re: elogd hangs, posted by Alan Grant on Fri Aug 18 16:39:21 2017
|
Okay I will just try the debugger approach first and then take it from there. Thanks Stefan.
Stefan Ritt wrote: |
Well, having the config and data files only help if I can reproduce the hanging. If if you give me your files and a step-by-step instruction on how to reproduce the hanging, I can give it a try. But if it happens randomly after a while, it will be very hard for me to reproduce and fix it without the exaclty same user access pattern which of course I don't have.
Alan Grant wrote: |
I could begin debugging with C++. In the interim, if you think it will help, I can also provide you with my Config and log files, and the section of redacted data encompassing the time of the hang - just let me know. Regarding CPU usage, I have noted that in the past and have never seen very high CPU usage during an Elog hang. The VM itself remains responsive.
Stefan Ritt wrote: |
I have to figure out where elog hangs. I guess it must be some kind of endless loop, triggered by some corrupt data in one of the elog entries. Under linux this is fairly simple (just run elogd under the gdb debugger, wait until it hangs, then press ctrl-c and enter "where" to see a full stack dump where elogd is currently executing). Under Windows this is more difficult, since you need Visual C++ from Microsoft to do the debugging. One thing you can do however without VC is to check if the CPU time is consumed to 100% by elogd, indicating an endless loop.
Stefan
Alan Grant wrote: |
I have a very long standing problem with elog over the last few versions where almost daily the service will hang. Cannot even Restart elogd, that just hangs. Clients experience Page not Found. I can only get the service reinitialized by rebooting the VM machine. I have Elog verbose logging On plus a number of external triage monitors running but nothing is yielding clues beyond the precise time the hang occurs. Aside from providing the Config and log files what else can I provide for you to assist, and what other triage measures can you suggest I try? FYI, there can be up to 20 users at one time doing searches (not updates), and I've trimmed the depth of log files that can be searched so that the CPU/service doesn't bog down but that hasn't helped either. Inserts happen in the background using the elog client app (about 2 or 3 inserts per batch at sporadic times).
|
|
|
|
|
Enable LDAP on Windows, posted by Gerardo Abihaggle on Sun Jul 30 07:39:23 2017
|
Hi All,
I'm running ELOG on a Windows machine and I would like to use LDAP for Authentication, however to achive this I need to compile elog. Any advice on how to do that on Windows?
Thanks! |
|