ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
69205
|
Wed Aug 26 20:41:50 2020 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | Linux | 3.1.4-2 | Re: SSL does not work | Today I succeeded with the help of L.JR to produce a new RPM which contains SSL, KRB5, PAM and LDAP support. It's uploaded to https://elog.psi.ch/elog/download/RPMS/elog-3.1.4-2.el7.x86_64.rpm
Hisataka YOSHIDA wrote: |
Dear Stefan,
Thank you for your comment. I successfuly compiled the latest elog from source code, and now elogd could work with SSL.
In fact, I reported the case of installation with rpm file. Maybe, the latest elog rpm doesn't support SSL, I guess.
The installtion with rpm file is easier to build the common environment, so I hope the next rpm will support the SSL.
best regards,
Hisataka YOSHIDA
Stefan Ritt wrote: |
When you compile elog from the soruces, you need the OpenSSL library to be installed. The CMake build process will then find it and include it in the compile process. When you use the "make" build process, you have to make sure that SSL is enabled there:
USE_SSL = 1
To install the OpenSSL library, you can do on most systems something like "sudo yum install openssl-dev" or "sudo apt-get install openssl-dev"
/Stefan
Hisataka YOSHIDA wrote: |
Hello.
I installed the latest elog (3.1.4-2) in CentOS 7, and it is working well without SSL.
When I enalbled SSL option (SSL = 1) in the "elogd.cfg", and tried to start the elogd, the message below was shown and failed to run.
SSL support not compiled into elogd
If I switched the elog to older one (3.1.4-1), I could successeed to run the elogd with SSL option.
Is there any other option required in the latest elog to run with SSL? Or is this bug in the latest version?
Thank you,
Hisataka YOSHIDA
|
|
|
|
69199
|
Mon Aug 10 08:33:42 2020 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | Linux | 3.1.4 | Re: SSL connection drop with large content | Your solution sounds quite good, I will incorporate them in the distribution.
Stefan
HyonSan Seo wrote: |
Dear all,
I had some difficulty to upload large files (>20MB) with SSL connection. I think it is also related to https://elog.psi.ch/elogs/Forum/68636
During debuging, I found that, when uploading large files, ssl connection is dropped since 'SSL_read' function returns -1.
But it doesn't alway mean broken connection. It may be "SSL_ERROR_WANT_READ".
I changed the "server_loop" function in the source code to "continue" when it is SSL_ERROR_WANT_READ. And it fixed the problem.
Here is my code.
## elogd.c "server_loop" function L30031
if (FD_ISSET(_sock, &readfds)) {
#ifdef HAVE_SSL
if (_ssl_flag){
i = SSL_read(_ssl_con, net_buffer + len, net_buffer_size - len);
if(i<=0){
int ssl_error=SSL_get_error(_ssl_con,i); ## check ssl error code
if(ssl_error==SSL_ERROR_WANT_READ||ssl_error==SSL_ERROR_WANT_WRITE) continue; ## if ssl wants more, continue
}
}
else
#endif
i = recv(_sock, net_buffer + len, net_buffer_size - len, 0);
I am ignorant about networking. Some experts on ssl connection would know a better way to deal with this problem.
Best,
HyonSan Seo
|
|
67244
|
Wed Apr 11 16:43:37 2012 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 2.9.1-2435 | Re: SSL |
Thomas Kleeb wrote: |
I'm slowly able to see the finish line 
Now all I need to do is get SSL to work. My server name is hf-info-elog and I'm not sure what the correct values for Port= and URL= should be.
thank
Tom (the green-horn)
|
All you need is a SSL=1 in the config file, then the default port of 443 will be used. The URL is the one seen from outside, like
https://hf-info-elog.psi.ch
or so. The certificate from the distribution is self-signed and therefore the browser will complain. Go to AIT to obtain an official certificate.
- Stefan |
66901
|
Wed Sep 15 00:21:10 2010 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.7.6-2230 | Re: SQL Database |
lance wrote: |
We have been running elog for a few years now and its solid. The only thing is we are getting to 140k entries over a few books and its starting to slow down whist searching. My questions is can we go to an SQL type database rather than a flat file? Is it worth it? Is anyone running this type of configuration?
|
Running through a SQL database requires a major rework of the software. I'm planning this in the long run, but not for this year. I'm also not sure how much this would buy you. If you do a full-text search on 140k entries in a SQL database (not index search), this might also take some time.
But what you can do is to "archive" part of your logbooks. Since the files are named YYMMDDa.log, you can move all 09XXXXXa.log files into a separate "archive" which you then do not include in your search. |
66915
|
Thu Sep 23 17:22:43 2010 |
| Bill Pier | bpier@clove.org | Question | Windows | 2.7.6-2230 | Re: SQL Database |
What about using something like MySQLfs to get a db backend transparently to ELOG? I use ENCFS, (a FUSE backend), currently to achieve encrypted logbooks and it works fine -- ELOG never knows anything other than reading and writing to logbook files. From what I've read, the MySQLfs backend would work the same, and you likely would gain some of the caching benefits of MySQL, which might help with your read/search times, given the memory requirements of the database of course.
Bill
lance wrote:
|
We have been running elog for a few years now and its solid. The only thing is we are getting to 140k entries over a few books and its starting to slow down whist searching. My questions is can we go to an SQL type database rather than a flat file? Is it worth it? Is anyone running this type of configuration?
|
|
66148
|
Tue Jan 13 00:14:37 2009 |
| Michael Ambrus | ambrmi09@gmail.com | Question | Linux | 2.7.5-2130 | Re: SMTP problems - Error sending Email via "smtp.glocalnet.net" |
Michael Ambrus wrote: |
Hello, I'm having problems with e-mail notifications.
When I try submitting a new post, I get the following error:
Error sending Email via "smtp.glocalnet.net"
The error message doesn't give a lot of hints...
My config file contains the following lines:
[global]
SMTP host = smtp.glocalnet.net
SMTP username = rhj764h@tninet.se
SMTP Password = xxx
...
[BugZ]
...
Email All = somebody@gmail.com
Use Email From = theproject@kato.homelinux.org
The password was created by invoking elogd with the -t option containing the true password. I've tried enter the correct password manually in the config, but the error message is the same.
Below follows a cut&paste of the console output when invoking with the -v option (addresses manually edited to avoid spam):
Email ALL to somebody@gmail.com
timezone: -3600, offset: 3600
Email from theproject@kato.homelinux.org to somebody@gmail.com, SMTP host smtp
.glocalnet.net:
220 mta3.glocalnet.net ESMTP Service ready
EHLO kato.homelinux.org
250-mta3.glocalnet.net
250-DSN
250-8BITMIME
250-PIPELINING
250-HELP
250-AUTH=LOGIN
250-AUTH LOGIN CRAM-MD5 PLAIN
250-X-CP-DELIVER-AFTER
250-DELIVERBY 300
250 SIZE
==== Return ================================
HTTP/1.1 302 Found
Server: ELOG HTTP 2.6.3-1762
Connection: Keep-Alive
Keep-Alive: timeout=60, max=10
Location: http://kato.homelinux.org/elog-tinker/BugZ/6?error=Error+sending+Email
+via+<i>"smtp.glocalnet.net"</i>
Content-Length: 20
I can't make any sense of this. Please advise.
Regards
/Michael Ambrus
|
An update:
I got rid of the version from the Ubuntu repo and installed the latest source release instead (2.7.5-2130).
The error is now a little bit different:
Error sending Email via "smtp.glocalnet.net": Syntax error in parameters or arguments to MAIL command
A snippet from the console output:
250-DELIVERBY 300
250 SIZE
AUTH LOGIN
`±è· ♦Username:
cmhqNzY0aEB0bmluZXQuc2U=
Password:
ajh6N2E4
235 LOGIN authentication successful
MAIL FROM: theproject@kato.homelinux.org
501 Syntax error in parameters or arguments to MAIL command
==== Return ================================
BR /Michael |
66150
|
Wed Jan 14 16:39:38 2009 |
| Michael Ambrus | ambrmi09@gmail.com | Question | Linux | 2.7.5-2130 | Re: SMTP problems - Error sending Email via "smtp.glocalnet.net" |
Michael Ambrus wrote: |
Michael Ambrus wrote: |
Hello, I'm having problems with e-mail notifications.
When I try submitting a new post, I get the following error:
Error sending Email via "smtp.glocalnet.net"
The error message doesn't give a lot of hints...
My config file contains the following lines:
[global]
SMTP host = smtp.glocalnet.net
SMTP username = rhj764h@tninet.se
SMTP Password = xxx
...
[BugZ]
...
Email All = somebody@gmail.com
Use Email From = theproject@kato.homelinux.org
The password was created by invoking elogd with the -t option containing the true password. I've tried enter the correct password manually in the config, but the error message is the same.
Below follows a cut&paste of the console output when invoking with the -v option (addresses manually edited to avoid spam):
Email ALL to somebody@gmail.com
timezone: -3600, offset: 3600
Email from theproject@kato.homelinux.org to somebody@gmail.com, SMTP host smtp
.glocalnet.net:
220 mta3.glocalnet.net ESMTP Service ready
EHLO kato.homelinux.org
250-mta3.glocalnet.net
250-DSN
250-8BITMIME
250-PIPELINING
250-HELP
250-AUTH=LOGIN
250-AUTH LOGIN CRAM-MD5 PLAIN
250-X-CP-DELIVER-AFTER
250-DELIVERBY 300
250 SIZE
==== Return ================================
HTTP/1.1 302 Found
Server: ELOG HTTP 2.6.3-1762
Connection: Keep-Alive
Keep-Alive: timeout=60, max=10
Location: http://kato.homelinux.org/elog-tinker/BugZ/6?error=Error+sending+Email
+via+<i>"smtp.glocalnet.net"</i>
Content-Length: 20
I can't make any sense of this. Please advise.
Regards
/Michael Ambrus
|
An update:
I got rid of the version from the Ubuntu repo and installed the latest source release instead (2.7.5-2130).
The error is now a little bit different:
Error sending Email via "smtp.glocalnet.net": Syntax error in parameters or arguments to MAIL command
A snippet from the console output:
250-DELIVERBY 300
250 SIZE
AUTH LOGIN
`±è· ♦Username:
cmhqNzY0aEB0bmluZXQuc2U=
Password:
ajh6N2E4
235 LOGIN authentication successful
MAIL FROM: theproject@kato.homelinux.org
501 Syntax error in parameters or arguments to MAIL command
==== Return ================================
BR /Michael
|
I think I found out what the problem was and e-mail notification now works.
Apparently 'MAIL FROM' syntax used by my ISP expects the address to be within <>.
Adding those in the config file fixes the problem:
Use Email From = <user@domain>
Note that the documentation indicates that the brackets should not be there and I'm not sure if this is a bug or not yet. According to this link the brackets should be there but I think to be consistent with other e-mail related attributes in the config file, they should be added by ELOG.
The 'Email' attibute however seems to work fine without the brackests. I.e.
Email All = user@doman
is OK.
I'm not very familiar with SMTP but I was fiddling around with this some time ago setting up a postfix MT. I eventually succeeded with my ISP, but not with gmail's SMTP. Apperently there are differences with the log-in procedure.
Maybe various differences in login procedure could be handled by allowing ELOG to optionally to use an external program like mailto to handle it's mailing?
SMTP external = 0|1
I think I understand (and actually appreciate) the policy of not depending on external programs. Just a suggestion...
BR
/Michael |
66162
|
Tue Jan 20 17:18:06 2009 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 2.7.5-2130 | Re: SMTP problems - Error sending Email via "smtp.glocalnet.net" |
Michael Ambrus wrote: |
Apparently 'MAIL FROM' syntax used by my ISP expects the address to be within <>.
Adding those in the config file fixes the problem:
Use Email From = <user@domain>
Note that the documentation indicates that the brackets should not be there and I'm not sure if this is a bug or not yet. According to this link the brackets should be there but I think to be consistent with other e-mail related attributes in the config file, they should be added by ELOG.
The 'Email' attibute however seems to work fine without the brackests. I.e.
Email All = user@doman
is OK.
I'm not very familiar with SMTP but I was fiddling around with this some time ago setting up a postfix MT. I eventually succeeded with my ISP, but not with gmail's SMTP. Apperently there are differences with the log-in procedure.
|
I added some code to elogd which always places <> around the "MAIL FROM:" in the SMTP communication. So I hope that problem should be solved from now on. Thank you for your detailed analysis and your hints. |
|