[JBoss JIRA] (WFLY-11458) Timed - difference between Prometheus and JSON format
by Jan Martiska (Jira)
[ https://issues.jboss.org/browse/WFLY-11458?page=com.atlassian.jira.plugin... ]
Jan Martiska edited comment on WFLY-11458 at 12/14/18 7:11 AM:
---------------------------------------------------------------
I guess the problem is here https://github.com/smallrye/smallrye-metrics/blob/1.1.2/implementation/sr... - IIUC {{scaleToBase}} is for converting to seconds (which is the unit in which we should always be presenting snapshot summaries), but as the input unit param, it is being given {{md.getUnit()}} which denotes the base unit of the metric, but it should instead be NANOSECONDS because that's the unit in which the data is internally stored. So in our case it converts to seconds, but converts from the wrong input unit.
I suppose the {{scaleToBase}} method be rather named {{convertToSecondsOrBytes}} which is what it really does. I was confused at first because I thought "base" referred to the base unit that the metric uses.
Current proposal for fix, but will need some more testing (and adding some more comments because the code is very hard to read IMO): https://github.com/jmartisk/smallrye-metrics/commits/issue-40
Surprisingly this does not seem to be covered in the TCKs either, I will consider adding some tests for that
was (Author: jmartisk):
I guess the problem is here https://github.com/smallrye/smallrye-metrics/blob/1.1.2/implementation/sr... - IIUC {{scaleToBase}} is for converting to seconds (which is the unit in which we should always be presenting snapshot summaries), but as the input unit param, it is being given {{md.getUnit()}} which denotes the base unit of the metric, but it should instead be NANOSECONDS because that's the unit in which the data is internally stored. So in our case it converts to seconds, but converts from the wrong input unit.
I suppose the {{scaleToBase}} method be rather named {{convertToSecondsOrBytes}} which is what it really does.
Current proposal for fix, but will need some more testing (and adding some more comments because the code is very hard to read IMO): https://github.com/jmartisk/smallrye-metrics/commits/issue-40
Surprisingly this does not seem to be covered in the TCKs either, I will consider adding some tests for that
> Timed - difference between Prometheus and JSON format
> -----------------------------------------------------
>
> Key: WFLY-11458
> URL: https://issues.jboss.org/browse/WFLY-11458
> Project: WildFly
> Issue Type: Bug
> Components: MP Metrics
> Affects Versions: 15.0.0.Final
> Reporter: Rostislav Svoboda
> Assignee: Bartosz Baranowski
> Priority: Critical
>
> There are differences in reported results between Prometheus and JSON format.
> When using the same deployment with OpenLiberty there are no differences in reported results between Prometheus and JSON format.
> https://github.com/smallrye/smallrye-metrics/issues/40
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-11517) Exception while running reports java.lang.StringIndexOutOfBoundsException: String index out of range: 10
by Suganya Rajeswaran (Jira)
[ https://issues.jboss.org/browse/WFLY-11517?page=com.atlassian.jira.plugin... ]
Suganya Rajeswaran commented on WFLY-11517:
-------------------------------------------
[~baranowb]-In my case, its a crystal report. When I try to run a report without selecting any field values, I am getting this exception.
Where as I am getting data while running the same in JBoss AS 7.
Waiting for your response...
> Exception while running reports java.lang.StringIndexOutOfBoundsException: String index out of range: 10
> ---------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11517
> URL: https://issues.jboss.org/browse/WFLY-11517
> Project: WildFly
> Issue Type: Bug
> Reporter: Suganya Rajeswaran
> Assignee: Jason Greene
> Priority: Major
>
> Hi,
>
> I tried running a report in my application which is running on WildFly 14 server. I am getting the following exception,
>
> java.lang.StringIndexOutOfBoundsException: String index out of range: 10
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:473)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
> at in.textech.common.SessionFilter.doFilter(SessionFilter.java:86)
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
> at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 10
> at java.lang.String.substring(String.java:1963)
> at in.textech.library.FormatModifier.dbFormat(FormatModifier.java:79)
> at org.apache.jsp.reportViewers.EmployeePermission_002dviewer_jsp._jspService(EmployeePermission_002dviewer_jsp.java:204)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
> ... 50 more
>
> But the same works on JBoss AS 7. Kindly help me out to rectify this.
> Is there anything that I am missing out?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (WFLY-7795) org.jboss.sasl classes still making it into jboss-client.jar
by Darran Lofthouse (Jira)
[ https://issues.jboss.org/browse/WFLY-7795?page=com.atlassian.jira.plugin.... ]
Darran Lofthouse resolved WFLY-7795.
------------------------------------
Resolution: Out of Date
Subsequent changes were added to filter the correct mechanisms, once we commence the removal of legacy security all of these legacy classes will be removed from the application server anyway so will no longer be an issue.
> org.jboss.sasl classes still making it into jboss-client.jar
> ------------------------------------------------------------
>
> Key: WFLY-7795
> URL: https://issues.jboss.org/browse/WFLY-7795
> Project: WildFly
> Issue Type: Bug
> Components: Build System
> Reporter: Darran Lofthouse
> Assignee: Darran Lofthouse
> Priority: Major
>
> The dependencies should have been removed but maybe this is still coming in as a transitive dependency from elsewhere.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (JGRP-2311) tshark/wireshark support
by Bela Ban (Jira)
[ https://issues.jboss.org/browse/JGRP-2311?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-2311:
--------------------------------
Perhaps a function could be passed to ParseMessages, that is given the payload of a message and can read it. This could for example be used to read Infinispan messages.
> tshark/wireshark support
> ------------------------
>
> Key: JGRP-2311
> URL: https://issues.jboss.org/browse/JGRP-2311
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Major
> Fix For: 4.0.17
>
> Attachments: tshark-convert.py
>
>
> 1. Dump contents of wireshark/tahsrk/tcpdump-generated (PCAP) files (using {{ParseMessages}}
> 2. Do this dynamically, e.g. `tshark -Tfields -e data` | java ParseMessages
> In the second instantiation, ParseMessages would read packets from stdin.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (JGRP-2311) tshark/wireshark support
by Bela Ban (Jira)
[ https://issues.jboss.org/browse/JGRP-2311?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-2311:
---------------------------
Fix Version/s: 4.0.17
(was: 4.0.16)
> tshark/wireshark support
> ------------------------
>
> Key: JGRP-2311
> URL: https://issues.jboss.org/browse/JGRP-2311
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Major
> Fix For: 4.0.17
>
> Attachments: tshark-convert.py
>
>
> 1. Dump contents of wireshark/tahsrk/tcpdump-generated (PCAP) files (using {{ParseMessages}}
> 2. Do this dynamically, e.g. `tshark -Tfields -e data` | java ParseMessages
> In the second instantiation, ParseMessages would read packets from stdin.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (JGRP-2288) S3_PING: Under certain conditions, subclusters fail to merge after network partition
by Bela Ban (Jira)
[ https://issues.jboss.org/browse/JGRP-2288?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-2288:
---------------------------
Fix Version/s: 4.0.16
(was: 4.0.17)
> S3_PING: Under certain conditions, subclusters fail to merge after network partition
> ------------------------------------------------------------------------------------
>
> Key: JGRP-2288
> URL: https://issues.jboss.org/browse/JGRP-2288
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.6.15
> Reporter: Nick Sawadsky
> Assignee: Bela Ban
> Priority: Major
> Fix For: 4.0.16, 3.6.17
>
>
> Repro steps:
> 1. Set up a cluster of four nodes, two on one machine (Host 1) and two on another (Host 2). Let's call the nodes A, B, C, and D.
> 2. Configure all 4 nodes with S3_PING as the discovery mechanism. Set remove_all_files_on_view_change to true.
> 3. Start up nodes in the order A, B, C, D.
> 4. In the S3 bucket, there should be a single file with all four nodes listed. Node A should be flagged as the coordinator. Ensure that the UUID for node B is larger than the UUID for node C, when compared as two's complement integers. If this is not the case, shut down all nodes and restart in order. Repeat until the desired relationship is achieved. Note that with two's complement, a UUID having a first hex digit of 8 or higher is treated as negative for comparison purposes. So, for example, a UUID starting with 'a' is less than a UUID starting with 'b' which is less than a UUID starting with '1'.
> 5. On Host 1, use iptables to block all traffic going to and coming from Host 2.
> sudo iptables -A INPUT -s <Host 2 IP addr> -j DROP
> sudo iptables -A OUTPUT -d <Host 2 IP addr> -j DROP
> 6. Allow a few minutes for the nodes to detect the network partition. Eventually you should see two files in the S3 bucket.
> 7. Using Ctrl-C, stop node A.
> 8. You should soon find only a single file in the bucket, containing a single entry for node B. This is a result of the remove_all_files_on_view_change setting on S3_PING, which we set to true to avoid accumulation of old files in the bucket.
> 9. Resolve the network partition:
> sudo iptables -F OUTPUT
> sudo iptables -F INPUT
> 10. You will find that, even after many minutes, the subclusters are not merged.
> I believe the reason why the subclusters are never merged is as follows:
> - MERGE3 on nodes B, C and D uses S3_PING to find members to send INFO messages to. Each one finds only node B in the discovery file. As a result, only node B's view consistency checker has anything to work with.
> - On node B, the consistency checker can see that there are two coordinators, B and C. However, node C has a lower UUID, so node B defers to it to perform the merge. Node C never performs the merge because, as mentioned above, it is not receiving any INFO messages.
> I this this problem would affect FILE_PING as well, and other protocols derived from FILE_PING. Looking at the latest 4.x code, it appears the problem still exists there.
> I think the crux of the issue is that the coordinator on Host 2 (node C) does not re-create its discovery file after it is deleted by node B. Would it be reasonable for FILE_PING.findMembers() to create the discovery file if the node is a coordinator and the file doesn't exist?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months
[JBoss JIRA] (JGRP-2288) S3_PING: Under certain conditions, subclusters fail to merge after network partition
by Bela Ban (Jira)
[ https://issues.jboss.org/browse/JGRP-2288?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-2288:
--------------------------------
{quote}
I'm thinking that in the typical case, the writeAll() call will not be made, because the coordinator will find its own address in the responses: data == null || !data.isCoord() will be false. So my hope is that there shouldn't be a noticeable increase in writes to the cloud store with this change.
{quote}
Why? The writeAll() happens _outside_ the if-else clause, and is goverened by its own if-condition!
> S3_PING: Under certain conditions, subclusters fail to merge after network partition
> ------------------------------------------------------------------------------------
>
> Key: JGRP-2288
> URL: https://issues.jboss.org/browse/JGRP-2288
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.6.15
> Reporter: Nick Sawadsky
> Assignee: Bela Ban
> Priority: Major
> Fix For: 4.0.17, 3.6.17
>
>
> Repro steps:
> 1. Set up a cluster of four nodes, two on one machine (Host 1) and two on another (Host 2). Let's call the nodes A, B, C, and D.
> 2. Configure all 4 nodes with S3_PING as the discovery mechanism. Set remove_all_files_on_view_change to true.
> 3. Start up nodes in the order A, B, C, D.
> 4. In the S3 bucket, there should be a single file with all four nodes listed. Node A should be flagged as the coordinator. Ensure that the UUID for node B is larger than the UUID for node C, when compared as two's complement integers. If this is not the case, shut down all nodes and restart in order. Repeat until the desired relationship is achieved. Note that with two's complement, a UUID having a first hex digit of 8 or higher is treated as negative for comparison purposes. So, for example, a UUID starting with 'a' is less than a UUID starting with 'b' which is less than a UUID starting with '1'.
> 5. On Host 1, use iptables to block all traffic going to and coming from Host 2.
> sudo iptables -A INPUT -s <Host 2 IP addr> -j DROP
> sudo iptables -A OUTPUT -d <Host 2 IP addr> -j DROP
> 6. Allow a few minutes for the nodes to detect the network partition. Eventually you should see two files in the S3 bucket.
> 7. Using Ctrl-C, stop node A.
> 8. You should soon find only a single file in the bucket, containing a single entry for node B. This is a result of the remove_all_files_on_view_change setting on S3_PING, which we set to true to avoid accumulation of old files in the bucket.
> 9. Resolve the network partition:
> sudo iptables -F OUTPUT
> sudo iptables -F INPUT
> 10. You will find that, even after many minutes, the subclusters are not merged.
> I believe the reason why the subclusters are never merged is as follows:
> - MERGE3 on nodes B, C and D uses S3_PING to find members to send INFO messages to. Each one finds only node B in the discovery file. As a result, only node B's view consistency checker has anything to work with.
> - On node B, the consistency checker can see that there are two coordinators, B and C. However, node C has a lower UUID, so node B defers to it to perform the merge. Node C never performs the merge because, as mentioned above, it is not receiving any INFO messages.
> I this this problem would affect FILE_PING as well, and other protocols derived from FILE_PING. Looking at the latest 4.x code, it appears the problem still exists there.
> I think the crux of the issue is that the coordinator on Host 2 (node C) does not re-create its discovery file after it is deleted by node B. Would it be reasonable for FILE_PING.findMembers() to create the discovery file if the node is a coordinator and the file doesn't exist?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 7 months