Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: [Ubuntu 19.10 Server] Stunnel weigert te starten  (gelezen 373 keer)

[Ubuntu 19.10 Server] Stunnel weigert te starten
« Gepost op: 2020/01/21, 11:17:33 »
Hallo iedereen

Ik probeer Stunnel te configureren zodat ik naar de Secure LDAP service van Google kan verbinden. Ik volg deze simpele tutorial: https://support.google.com/a/answer/9089736?hl=en#stunnel

Maar als ik Stunnel start krijg ik dit:

Citaat
    administrator@stunnel:~$ sudo /etc/init.d/stunnel4 restart
    [....] Restarting stunnel4 (via systemctl): stunnel4.serviceJob for stunnel4.service failed because the control process exited with error code.
    See "systemctl status stunnel4.service" and "journalctl -xe" for details.
     failed!


Dus ik heb systemctl status stunnel4.service eens bekeken, en dat geeft dit:
Citaat
    Jan 20 09:42:26 stunnel stunnel4[1438]: [!] error queue: ../ssl/ssl_rsa.c:615: error:140DC002:SSL routines:use_certificate_chain_file:system lib
    Jan 20 09:42:26 stunnel stunnel4[1438]: [!] error queue: ../crypto/bio/bss_file.c:293: error:20074002:BIO routines:file_ctrl:system lib
    Jan 20 09:42:26 stunnel stunnel4[1438]: [!] SSL_CTX_use_certificate_chain_file: ../crypto/bio/bss_file.c:291: error:02001002:system library:fopen:No such file or directory
    Jan 20 09:42:26 stunnel stunnel4[1438]: [!] Service [ldap]: Failed to initialize TLS context
    Jan 20 09:42:26 stunnel stunnel4[1438]: [ ] Deallocating section defaults
    Jan 20 09:42:26 stunnel stunnel4[1438]: failed (no pid=pidfile specified!)
    Jan 20 09:42:26 stunnel stunnel4[1438]: You should check that you have specified the pid= in you configuration file
    Jan 20 09:42:26 stunnel systemd[1]: stunnel4.service: Control process exited, code=exited, status=1/FAILURE
    Jan 20 09:42:26 stunnel systemd[1]: stunnel4.service: Failed with result 'exit-code'.
    Jan 20 09:42:26 stunnel systemd[1]: Failed to start LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons).

Dus dan dacht ik dat ik een pid=pidfile moest configureren, maar als ik dat doe lukt het nog steeds niet.. Dit is mijn google-ldap.conf bestand:
pid = /usr/local/var/run/stunnel.pid
[ldap]
client = yes
accept = 127.0.0.1:1636
connect = ldap.google.com:636
cert = ldap-client.crt
key = ldap-client.key

En deze melding krijg ik:

Citaat
    Jan 20 09:53:03 stunnel stunnel4[15173]: [!] error queue: ../ssl/ssl_rsa.c:615: error:140DC002:SSL routines:use_certificate_chain_file:system lib
    Jan 20 09:53:03 stunnel stunnel4[15173]: [!] error queue: ../crypto/bio/bss_file.c:293: error:20074002:BIO routines:file_ctrl:system lib
    Jan 20 09:53:03 stunnel stunnel4[15173]: [!] SSL_CTX_use_certificate_chain_file: ../crypto/bio/bss_file.c:291: error:02001002:system library:fopen:No such file or directory
    Jan 20 09:53:03 stunnel stunnel4[15173]: [!] Service [ldap]: Failed to initialize TLS context
    Jan 20 09:53:03 stunnel stunnel4[15173]: [ ] Deallocating section defaults
    Jan 20 09:53:03 stunnel stunnel4[15173]: failed
    Jan 20 09:53:03 stunnel stunnel4[15173]: You should check that you have specified the pid= in you configuration file
    Jan 20 09:53:03 stunnel systemd[1]: stunnel4.service: Control process exited, code=exited, status=1/FAILURE
    Jan 20 09:53:03 stunnel systemd[1]: stunnel4.service: Failed with result 'exit-code'.
    Jan 20 09:53:03 stunnel systemd[1]: Failed to start LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons).


Is er een manier om meer te weten te komen over deze errors, die crypto en SSL errors vind ik ook maar raar.

Het rare is, ik heb Stunnel ook eens geïnstalleerd op een Windows machine met exact dezelfde config, en dat werkt wel..

Bedankt voor het meedenken!