Skip to content
This repository has been archived by the owner on Dec 6, 2020. It is now read-only.

Failed to Start Kimchi after Updating to ver.1.1.8-1 #4

Open
techana opened this issue Dec 8, 2017 · 3 comments
Open

Failed to Start Kimchi after Updating to ver.1.1.8-1 #4

techana opened this issue Dec 8, 2017 · 3 comments

Comments

@techana
Copy link

techana commented Dec 8, 2017

Kimchi was running normally after updating the app to 1.1.8-1. I then stoped it from the app UI (inside clearos webconfig) and it refused to start again. Here is /log/messages when trying to start the app:

Dec 8 09:21:48 gateway engine: exception: error: /usr/clearos/apps/base/libraries/Shell.php (227): Command execution failed.
Dec 8 09:21:48 gateway engine: exception: debug backtrace: /usr/clearos/apps/base/libraries/Daemon.php (598): execute
Dec 8 09:21:48 gateway engine: exception: debug backtrace: /usr/clearos/apps/kimchi/controllers/server.php (114): set_running_state
Dec 8 09:21:48 gateway engine: exception: debug backtrace: GUI (0): start
Dec 8 09:21:48 gateway engine: exception: debug backtrace: /usr/clearos/framework/system/core/CodeIgniter.php (535): call_user_func_array
Dec 8 09:21:48 gateway engine: exception: debug backtrace: /usr/clearos/framework/htdocs/app/index.php (224): require_once

Wokd and libvirted daemons are working fine, but nginx is not. Here is nginx -t -c /etc/nginx/nginx.conf output:

nginx: [emerg] BIO_new_file("/etc/wok/dhparams.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/wok/dhparams.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

The file was in the server /etc/wok/dhparams.pem (it's still in locate database), but it has been deleted somehow during the update.

I regenerated the certificates using:
openssl req -x509 -newkey rsa:4096 -keyout /etc/wok/wok-key.pem -out /etc/wok/wok-cert.pem -days 365 -nodes -subj "/C=US/CN=wok/O=kimchi-project.org" >/dev/null 2>&1 || :
openssl dhparam 2048 -out /etc/wok/dhparams.pem

And now the app can start normally.

@pcbaldwin
Copy link
Contributor

Hey techana. That was a bug in the wok 2.3.0 RPM packaging: WikiSuite/wok#1

The updated package (wok 2.5.0) is sitting in the test yum repositories (yum --enablerepo=clearos-contribs-testing), but I'll see if I can get the update pushed through to the live yum repositories.

@techana
Copy link
Author

techana commented Dec 9, 2017

Yes, this issue described above occurred to me after upgrading from wok 2.3.0 to wok 2.5.0, which comes with app-kimchi 1.1.8-1.

@pcbaldwin
Copy link
Contributor

This type of RPM packaging issue is always a bit messy. When the wok package is upgraded from 2.3.0 to 2.5.0, this is the order of the install:

Running transaction
  Updating   : wok-2.5.0-1.v7.noarch    
  Installing : spice-html5-0.1.7-1.el7.noarch           
  Updating   : kimchi-2.5.0-0.v7.noarch                 
  Updating   : 1:app-kimchi-core-1.1.9-1.gloo7.noarch   
  Updating   : 1:app-kimchi-1.1.9-1.gloo7.noarch        
  Cleanup    : 1:app-kimchi-1.1.7-1.v7.noarch           
  Cleanup    : 1:app-kimchi-core-1.1.7-1.v7.noarch      
  Cleanup    : kimchi-2.3.1-0.v7.noarch                 
  Cleanup    : wok-2.3.1-0.v7.noarch      <-- this is where dhparams.pem is deleted

Adding a post-install check for dhparams.pem in wok 2.5.0 won't work since that file still exists at that point of the RPM upgrade process. I'm sure there's a good reason for this RPM behavior, but it makes things a bit more challenging.

More to come.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants