Skip to content

Commit 87de784

Browse files
authored
Added error handling to give more details (#174)
* Added error handling to give more details when an RPM based httpd fails to start
1 parent 6859ab2 commit 87de784

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

core/src/main/groovy/noe/ews/server/httpd/HttpdRpm.groovy

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,16 @@ class HttpdRpm extends Httpd {
8484
* Stop the server
8585
*/
8686
void start(Map conf = [:]) {
87-
super.start(conf)
88-
Library.letsSleep(5000)
87+
try {
88+
super.start(conf)
89+
Library.letsSleep(5000)
90+
}
91+
catch(RuntimeException re) {
92+
Map results = Cmd.executeCommandConsumeStreams(["journalctl", "-xeu", "httpd.service"])
93+
log.info(re.getMessage())
94+
log.info(results.stdOut as String)
95+
throw new RuntimeException("${re.getMessage()}\n${results.stdOut as String}")
96+
}
8997
}
9098

9199
/**

0 commit comments

Comments
 (0)