Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log DB-connection error #2047

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ function configureMasterTenant(callback) {
installHelpers.showSpinner('Starting server');
// run the app
app.run({ skipVersionCheck: true });
app.on('serverStartError', function(error) {
return exit(1, error.message || error);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this just replicates the error handling in lib/application.js

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also logs the error message that connection failed.
Without that I don't get this message.

app.on('serverStarted', function() {
installHelpers.hideSpinner();
database.checkConnection(function(error) {
Expand Down
1 change: 1 addition & 0 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ Origin.prototype.startServer = function (options) {
};
app.createServer(serverOptions, function (error, server) {
if (error) {
app.emit('serverStartError', error);
logger.log('fatal', 'error creating server', error);
return process.exit(1);
}
Expand Down