]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#599,!320] Added log message when premature http timeout occurred.
authorMarcin Siodelski <marcin@isc.org>
Mon, 13 May 2019 15:21:23 +0000 (17:21 +0200)
committerMarcin Siodelski <marcin@isc.org>
Mon, 13 May 2019 15:21:23 +0000 (17:21 +0200)
src/lib/http/client.cc
src/lib/http/http_messages.cc
src/lib/http/http_messages.h
src/lib/http/http_messages.mes

index c2c6b30f5fcb087b1d707eef8fd1655b59b0e860..adfd0ef5c7e1eb27ac1e149e5fee4d45bd693eef 100644 (file)
@@ -535,6 +535,8 @@ Connection::isTransactionOngoing() const {
 bool
 Connection::checkPrematureTimeout() const {
     if (!isTransactionOngoing()) {
+        // The transaction state is was reset, so we need to log a warning message.
+        LOG_WARN(http_logger, HTTP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED);
         return (true);
     }
     return (false);
index cb84e76744607a934dfe54de4dbf0952e83651e6..79a3cb346af9cd85a5f3da5b475fdbfca791b43b 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/lib/http/http_messages.mes on Fri Feb 08 2019 20:32
+// File created from ../../../src/lib/http/http_messages.mes on Mon May 13 2019 17:08
 
 #include <cstddef>
 #include <log/message_types.h>
@@ -20,6 +20,7 @@ extern const isc::log::MessageID HTTP_CONNECTION_STOP = "HTTP_CONNECTION_STOP";
 extern const isc::log::MessageID HTTP_CONNECTION_STOP_FAILED = "HTTP_CONNECTION_STOP_FAILED";
 extern const isc::log::MessageID HTTP_DATA_RECEIVED = "HTTP_DATA_RECEIVED";
 extern const isc::log::MessageID HTTP_IDLE_CONNECTION_TIMEOUT_OCCURRED = "HTTP_IDLE_CONNECTION_TIMEOUT_OCCURRED";
+extern const isc::log::MessageID HTTP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED = "HTTP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED";
 extern const isc::log::MessageID HTTP_REQUEST_RECEIVE_START = "HTTP_REQUEST_RECEIVE_START";
 extern const isc::log::MessageID HTTP_SERVER_RESPONSE_RECEIVED = "HTTP_SERVER_RESPONSE_RECEIVED";
 extern const isc::log::MessageID HTTP_SERVER_RESPONSE_RECEIVED_DETAILS = "HTTP_SERVER_RESPONSE_RECEIVED_DETAILS";
@@ -45,6 +46,7 @@ const char* values[] = {
     "HTTP_CONNECTION_STOP_FAILED", "stopping HTTP connection failed",
     "HTTP_DATA_RECEIVED", "received %1 bytes from %2",
     "HTTP_IDLE_CONNECTION_TIMEOUT_OCCURRED", "closing persistent connection with %1 as a result of a timeout",
+    "HTTP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED", "premature connection timeout occurred, possibly caused by system clock change",
     "HTTP_REQUEST_RECEIVE_START", "start receiving request from %1 with timeout %2",
     "HTTP_SERVER_RESPONSE_RECEIVED", "received HTTP response from %1",
     "HTTP_SERVER_RESPONSE_RECEIVED_DETAILS", "detailed information about well formed response received from %1:\n%2",
index 3f3788489cd6f0cfec237a0a8f79798127507d10..658b0810885f74cdfbbaf68b0041e98565039285 100644 (file)
@@ -1,4 +1,4 @@
-// File created from ../../../src/lib/http/http_messages.mes on Fri Feb 08 2019 20:32
+// File created from ../../../src/lib/http/http_messages.mes on Mon May 13 2019 17:08
 
 #ifndef HTTP_MESSAGES_H
 #define HTTP_MESSAGES_H
@@ -21,6 +21,7 @@ extern const isc::log::MessageID HTTP_CONNECTION_STOP;
 extern const isc::log::MessageID HTTP_CONNECTION_STOP_FAILED;
 extern const isc::log::MessageID HTTP_DATA_RECEIVED;
 extern const isc::log::MessageID HTTP_IDLE_CONNECTION_TIMEOUT_OCCURRED;
+extern const isc::log::MessageID HTTP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED;
 extern const isc::log::MessageID HTTP_REQUEST_RECEIVE_START;
 extern const isc::log::MessageID HTTP_SERVER_RESPONSE_RECEIVED;
 extern const isc::log::MessageID HTTP_SERVER_RESPONSE_RECEIVED_DETAILS;
index 2c8e5cc8ed0ce1e25dfde4179c94a862184780d3..5ba461477705635f11f7bbfe6b01f6cc930055c1 100644 (file)
@@ -83,6 +83,12 @@ produced the data.
 This debug message is issued when the persistent HTTP connection is being
 closed as a result of being idle.
 
+% HTTP_PREMATURE_CONNECTION_TIMEOUT_OCCURRED premature connection timeout occurred, possibly caused by system clock change
+This warning message is issued when unexpected timeout occurred during the
+transaction. This is proven to occur when the system clock is moved manually
+or as a result of synchronization with a time server. Any ongoing transactions
+will be interrupted. New transactions should be conducted normally.
+
 % HTTP_REQUEST_RECEIVE_START start receiving request from %1 with timeout %2
 This debug message is issued when the server starts receiving new request
 over the established connection. The first argument specifies the address