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

PAYARA-2727 Illegal non-String type error in logs when monitoring #2728

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -203,18 +203,18 @@ public Object run(Protocol param) throws TransactionFailure {
http.setServerName(serverName);

// HTTP2 options
http.setHttp2Enabled(http2Enabled);
http.setHttp2Enabled(http2Enabled.toString());
if (http2MaxConcurrentStreams != null) {
http.setHttp2MaxConcurrentStreams(http2MaxConcurrentStreams);
http.setHttp2MaxConcurrentStreams(http2MaxConcurrentStreams.toString());
}
if (http2InitialWindowSizeInBytes != null) {
http.setHttp2InitialWindowSizeInBytes(http2InitialWindowSizeInBytes);
http.setHttp2InitialWindowSizeInBytes(http2InitialWindowSizeInBytes.toString());
}
if (http2MaxFramePayloadSizeInBytes != null) {
http.setHttp2MaxFramePayloadSizeInBytes(http2MaxFramePayloadSizeInBytes);
http.setHttp2MaxFramePayloadSizeInBytes(http2MaxFramePayloadSizeInBytes.toString());
}
if (http2MaxHeaderListSizeInBytes != null) {
http.setHttp2MaxHeaderListSizeInBytes(http2MaxHeaderListSizeInBytes);
http.setHttp2MaxHeaderListSizeInBytes(http2MaxHeaderListSizeInBytes.toString());
}
if (http2StreamsHighWaterMark != null) {
http.setHttp2StreamsHighWaterMark(http2StreamsHighWaterMark.toString());
Expand All @@ -223,13 +223,13 @@ public Object run(Protocol param) throws TransactionFailure {
http.setHttp2CleanPercentage(http2CleanPercentage.toString());
}
if (http2CleanFrequencyCheck != null) {
http.setHttp2CleanFrequencyCheck(http2CleanFrequencyCheck);
http.setHttp2CleanFrequencyCheck(http2CleanFrequencyCheck.toString());
}
if (http2DisableCipherCheck != null) {
http.setHttp2DisableCipherCheck(http2DisableCipherCheck);
http.setHttp2DisableCipherCheck(http2DisableCipherCheck.toString());
}
if (http2PushEnabled != null) {
http.setHttp2PushEnabled(http2PushEnabled);
http.setHttp2PushEnabled(http2PushEnabled.toString());
}
param.setHttp(http);
return http;
Expand Down
Expand Up @@ -145,10 +145,10 @@ public void execute(AdminCommandContext context) {

// Write HTTP/2 config options
report.appendMessage("\nHTTP/2:\n");
report.appendMessage(String.format("Enabled: %s\n", protocol.getHttp().isHttp2Enabled()));
if (protocol.getHttp().isHttp2Enabled()) {
report.appendMessage(String.format("Push Enabled: %s\n", protocol.getHttp().isHttp2PushEnabled()));
report.appendMessage(String.format("Cipher Check: %s\n", !protocol.getHttp().isHttp2DisableCipherCheck()));
report.appendMessage(String.format("Enabled: %s\n", protocol.getHttp().getHttp2Enabled()));
if (Boolean.parseBoolean(protocol.getHttp().getHttp2Enabled())) {
report.appendMessage(String.format("Push Enabled: %s\n", protocol.getHttp().getHttp2PushEnabled()));
report.appendMessage(String.format("Cipher Check: %s\n", !Boolean.parseBoolean(protocol.getHttp().getHttp2DisableCipherCheck())));
if (verbose) {
report.appendMessage(String.format("Max Concurrent Streams: %s\n", protocol.getHttp().getHttp2MaxConcurrentStreams()));
report.appendMessage(String.format("Initial Window Size: %s bytes\n", protocol.getHttp().getHttp2InitialWindowSizeInBytes()));
Expand All @@ -172,16 +172,16 @@ public void execute(AdminCommandContext context) {
properties.put("timeoutSeconds", protocol.getHttp().getTimeoutSeconds());
properties.put("dnsLookupEnabled", protocol.getHttp().getDnsLookupEnabled());
properties.put("xFrameOptions", protocol.getHttp().getXframeOptions());
properties.put("http2Enabled", protocol.getHttp().isHttp2Enabled());
properties.put("http2Enabled", protocol.getHttp().getHttp2Enabled());
properties.put("http2MaxConcurrentStreams", protocol.getHttp().getHttp2MaxConcurrentStreams());
properties.put("http2InitialWindowSizeInBytes", protocol.getHttp().getHttp2InitialWindowSizeInBytes());
properties.put("http2MaxFramePayloadSizeInBytes", protocol.getHttp().getHttp2MaxFramePayloadSizeInBytes());
properties.put("http2MaxHeaderListSizeInBytes", protocol.getHttp().getHttp2MaxHeaderListSizeInBytes());
properties.put("http2StreamsHighWaterMark", protocol.getHttp().getHttp2StreamsHighWaterMark());
properties.put("http2CleanPercentage", protocol.getHttp().getHttp2CleanPercentage());
properties.put("http2CleanFrequencyCheck", protocol.getHttp().getHttp2CleanFrequencyCheck());
properties.put("http2DisableCipherCheck", protocol.getHttp().isHttp2DisableCipherCheck());
properties.put("http2PushEnabled", protocol.getHttp().isHttp2PushEnabled());
properties.put("http2DisableCipherCheck", protocol.getHttp().getHttp2DisableCipherCheck());
properties.put("http2PushEnabled", protocol.getHttp().getHttp2PushEnabled());
report.setExtraProperties(properties);
}

Expand Down
Expand Up @@ -797,18 +797,18 @@ protected void configureHttp2Support(final ServiceLocator locator,
final FilterChainBuilder builder,
final boolean secure) {
isHttp2Enabled = false;
if (!skipHttp2 && httpElement != null && httpElement.isHttp2Enabled()) {
if (!skipHttp2 && httpElement != null && Boolean.parseBoolean(httpElement.getHttp2Enabled())) {
try {
Http2AddOn http2Addon = new Http2AddOn(Http2Configuration.builder()
.maxConcurrentStreams(httpElement.getHttp2MaxConcurrentStreams())
.initialWindowSize(httpElement.getHttp2InitialWindowSizeInBytes())
.maxFramePayloadSize(httpElement.getHttp2MaxFramePayloadSizeInBytes())
.maxHeaderListSize(httpElement.getHttp2MaxHeaderListSizeInBytes())
.maxConcurrentStreams(Integer.parseInt(httpElement.getHttp2MaxConcurrentStreams()))
.initialWindowSize(Integer.parseInt(httpElement.getHttp2InitialWindowSizeInBytes()))
.maxFramePayloadSize(Integer.parseInt(httpElement.getHttp2MaxFramePayloadSizeInBytes()))
.maxHeaderListSize(Integer.parseInt(httpElement.getHttp2MaxHeaderListSizeInBytes()))
.streamsHighWaterMark(Float.parseFloat(httpElement.getHttp2StreamsHighWaterMark()))
.cleanPercentage(Float.parseFloat(httpElement.getHttp2CleanPercentage()))
.cleanFrequencyCheck(httpElement.getHttp2CleanFrequencyCheck())
.disableCipherCheck(httpElement.isHttp2DisableCipherCheck())
.enablePush(httpElement.isHttp2PushEnabled())
.cleanFrequencyCheck(Integer.parseInt(httpElement.getHttp2CleanFrequencyCheck()))
.disableCipherCheck(Boolean.valueOf(httpElement.getHttp2DisableCipherCheck()))
.enablePush(Boolean.parseBoolean(httpElement.getHttp2PushEnabled()))
.executorService(transport.getWorkerThreadPool())
.build());
// The Http2AddOn requires access to more information compared to the other addons
Expand Down
Expand Up @@ -457,45 +457,46 @@ public interface Http extends ConfigBeanProxy, PropertyBag {
/**
* Controls whether or not HTTP/2 is enabled.
* The default is true.
* @return
*/
@Attribute(defaultValue = "" + HTTP2_ENABLED, dataType = Boolean.class)
boolean isHttp2Enabled();
String getHttp2Enabled();

void setHttp2Enabled(boolean http2Enabled);
void setHttp2Enabled(String http2Enabled);

/**
* Configures the number of concurrent streams allowed per HTTP2 connection.
* The default is 100.
*/
@Attribute(defaultValue = "" + HTTP2_MAX_CONCURRENT_STREAMS, dataType = Integer.class)
int getHttp2MaxConcurrentStreams();
String getHttp2MaxConcurrentStreams();

void setHttp2MaxConcurrentStreams(int maxConcurrentStreams);
void setHttp2MaxConcurrentStreams(String maxConcurrentStreams);

/**
* Configures the initial window size in bytes. The default is 64K - 1.
*/
@Attribute(defaultValue = "" + HTTP2_INITIAL_WINDOW_SIZE_IN_BYTES, dataType = Integer.class)
int getHttp2InitialWindowSizeInBytes();
String getHttp2InitialWindowSizeInBytes();

void setHttp2InitialWindowSizeInBytes(int initialWindowSizeInBytes);
void setHttp2InitialWindowSizeInBytes(String initialWindowSizeInBytes);

/**
* Configures the maximum size of the HTTP2 frame payload to be accepted.
* The default is 2^24 - 1.
*/
@Attribute(defaultValue = "" + HTTP2_MAX_FRAME_PAYLOAD_SIZE_IN_BYTES, dataType = Integer.class)
int getHttp2MaxFramePayloadSizeInBytes();
String getHttp2MaxFramePayloadSizeInBytes();

void setHttp2MaxFramePayloadSizeInBytes(int maxFramePayloadSizeInBytes);
void setHttp2MaxFramePayloadSizeInBytes(String maxFramePayloadSizeInBytes);

/**
* Configures the maximum size, in bytes, of the header list. The default is 4096.
*/
@Attribute(defaultValue = "" + HTTP2_MAX_HEADER_LIST_SIZE_IN_BYTES, dataType = Integer.class)
int getHttp2MaxHeaderListSizeInBytes();
String getHttp2MaxHeaderListSizeInBytes();

void setHttp2MaxHeaderListSizeInBytes(int maxHeaderListSizeInBytes);
void setHttp2MaxHeaderListSizeInBytes(String maxHeaderListSizeInBytes);

/**
* Streams are periodically cleaned when the stream count exceeds this value,
Expand Down Expand Up @@ -525,29 +526,30 @@ public interface Http extends ConfigBeanProxy, PropertyBag {
* The default is 50.
*/
@Attribute(defaultValue = "" + HTTP2_CLEAN_FREQUENCY_CHECK, dataType = Integer.class)
int getHttp2CleanFrequencyCheck();
String getHttp2CleanFrequencyCheck();

void setHttp2CleanFrequencyCheck(int cleanFrequencyCheck);
void setHttp2CleanFrequencyCheck(String cleanFrequencyCheck);

/**
* Controls whether or not insecure cipher suites are allowed to establish TLS connections.
* The default is false.
*/
@Attribute(defaultValue = "" + HTTP2_DISABLE_CIPHER_CHECK, dataType = Boolean.class)
boolean isHttp2DisableCipherCheck();
String getHttp2DisableCipherCheck();

void setHttp2DisableCipherCheck(boolean disableCipherCheck);
void setHttp2DisableCipherCheck(String disableCipherCheck);

/**
* Controls whether or not push is allowed by the server endpoints.
* The default is true.
*/
@Attribute(defaultValue = "" + HTTP2_PUSH_ENABLED, dataType = Boolean.class)
boolean isHttp2PushEnabled();
String getHttp2PushEnabled();

void setHttp2PushEnabled(boolean pushEnabled);
void setHttp2PushEnabled(String pushEnabled);

@DuckTyped
@Override
Protocol getParent();

class Duck {
Expand Down