Author Topic: [solved]Losing domain.pem in ocsmanager folder  (Read 1486 times)

Jepke

  • Guest
[solved]Losing domain.pem in ocsmanager folder
« on: August 31, 2014, 03:30:35 pm »
Hi there all,

Im playing around on zentyal for a while now, started on 3.4 about 6 months ago. And managed to get a complete AD with folder redirection working in a home environment. But after an upgrade to 3.5 things started to ackting wierd and crash. So i dicided to get new fresh hardware and rebuild. Pretty much everything is working again but today after a reboot i lost de domain.pem file in /etc/ocsmanager, which resulted to fail haproxy to start and all web interfaces (webadmin, sogo) to fail.

Took me 3 hours to find out that i was missing domain.pem after regenerate domain.pem using

Code: [Select]
/usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf ./domain.pem
And starting haproxy

Code: [Select]
/etc/init.d/haproxy start
everything is working again but when haproxy has to be restarted domain.pem is gone again.

Hoping anyone can tell me what to do to solve this.
« Last Edit: August 31, 2014, 05:30:46 pm by Jepke »

Jepke

  • Guest
Re: [solved]Losing domain.pem in ocsmanager folder
« Reply #1 on: August 31, 2014, 05:36:02 pm »
Problem solved.

For some not yet known reason all CA config was lost so no certs where created upon restart.

If i ever find out how this all happend i will post it here  ;D

franzl1006

  • Zen Apprentice
  • *
  • Posts: 15
  • Karma: +1/-0
    • View Profile
Re: [solved]Losing domain.pem in ocsmanager folder
« Reply #2 on: October 01, 2014, 11:24:55 pm »
Hello, i have had exactly the same fault today after a reboot. my ./domain.pem is gone. How can i solve it, because the solution (/usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf ./domain.pem) didn´t work. (/etc/init.d/haproxy start) brings this: 
* Restarting haproxy haproxy
[ALERT] 273/231723 (14544) : parsing [/var/lib/zentyal/conf/haproxy.cfg:72] : 'bind 0.0.0.0:443' : unable to load SSL private key from PEM file '/etc/ocsmanager/domain.pem'.
[ALERT] 273/231723 (14544) : Error(s) found in configuration file : /var/lib/zentyal/conf/haproxy.cfg
[ALERT] 273/231723 (14544) : Fatal errors found in configuration.

Can anybody help me, please?

jbahillo

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1444
  • Karma: +77/-2
    • View Profile
Re: [solved]Losing domain.pem in ocsmanager folder
« Reply #3 on: October 02, 2014, 11:18:57 am »
Hello:

Have you made sure that yu have run

/usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf ./domain.pem

on /etc/ocsmanager/ folder?

franzl1006

  • Zen Apprentice
  • *
  • Posts: 15
  • Karma: +1/-0
    • View Profile
Re: [solved]Losing domain.pem in ocsmanager folder
« Reply #4 on: October 05, 2014, 03:43:58 pm »
Yes, i´m shure. But i have it back!  Please don´t ask me, how. Today i found my domain.pem in the folder, after i setup a new CA-Certificate.