mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-30 13:08:00 +01:00
Added Webserver error case for EOF
This commit is contained in:
parent
f254f605d7
commit
5329db8b30
@ -37,10 +37,7 @@ import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import javax.net.ssl.*;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.*;
|
||||
import java.net.BindException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.nio.file.InvalidPathException;
|
||||
@ -237,8 +234,10 @@ public class WebServer implements SubSystem {
|
||||
} catch (KeyManagementException | NoSuchAlgorithmException e) {
|
||||
logger.error(locale.getString(PluginLang.WEB_SERVER_FAIL_SSL_CONTEXT));
|
||||
errorHandler.log(L.ERROR, this.getClass(), e);
|
||||
} catch (EOFException e) {
|
||||
logger.error(locale.getString(PluginLang.WEB_SERVER_FAIL_EMPTY_FILE));
|
||||
} catch (FileNotFoundException e) {
|
||||
logger.log(L.INFO_COLOR, "§e" + locale.getString(PluginLang.WEB_SERVER_NOTIFY_NO_CERT_FILE, keyStorePath));
|
||||
logger.info(locale.getString(PluginLang.WEB_SERVER_NOTIFY_NO_CERT_FILE, keyStorePath));
|
||||
logger.info(locale.getString(PluginLang.WEB_SERVER_NOTIFY_HTTP));
|
||||
} catch (BindException e) {
|
||||
throw e; // Pass to above error handler
|
||||
|
@ -40,6 +40,7 @@ public enum PluginLang implements Lang {
|
||||
WEB_SERVER_FAIL_PORT_BIND("WebServer FAIL - Port Bind", "WebServer was not initialized successfully. Is the port (${0}) in use?"),
|
||||
WEB_SERVER_FAIL_SSL_CONTEXT("WebServer FAIL - SSL Context", "WebServer: SSL Context Initialization Failed."),
|
||||
WEB_SERVER_FAIL_STORE_LOAD("WebServer FAIL - Store Load", "WebServer: SSL Certificate loading Failed."),
|
||||
WEB_SERVER_FAIL_EMPTY_FILE("WebServer FAIL - EOF", "WebServer: EOF when reading Certificate file. (Check that the file is not empty)"),
|
||||
WEB_SERVER_NOTIFY_NO_CERT_FILE("WebServer - Notify no Cert file", "WebServer: Certificate KeyStore File not Found: ${0}"),
|
||||
WEB_SERVER_NOTIFY_HTTP("WebServer - Notify HTTP", "WebServer: No Certificate -> Using HTTP-server for Visualization."),
|
||||
WEB_SERVER_NOTIFY_USING_PROXY_MODE("WebServer - Notify Using Proxy", "WebServer: Proxy-mode HTTPS enabled, make sure that your reverse-proxy is routing using HTTPS and Plan AlternativeIP.Link points to the Proxy"),
|
||||
|
Loading…
Reference in New Issue
Block a user