Stackify Prefix sfclient ERR_CONNECTION_REFUSED

huangapple go评论73阅读模式
英文:

Stackify Prefix sfclient ERR_CONNECTION_REFUSED

问题

Part 1:

在访问我们应用程序的任何页面时,我会得到两个无法加载JS文件的失败请求:

  • http://127.0.0.1:2/scripts/sfclient.xhr.min.js
  • http://127.0.0.1:2/scripts/sfclient.perf.prefix.min.js

这两个请求都以ERR_CONNECTION_REFUSED失败。我在我的JSP页面中没有找到这些脚本引用,所以我认为它们是由Prefix注入的。

以下是尝试加载这两个脚本的原始HTML:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><script src="http://127.0.0.1:2/scripts/sfclient.xhr.min.js"></script>
    <script>var SPerfLib = window.SPerfLib || {}; SPerfLib.RequestId = '54fd58d1-7f7e-d3a4-0001-331676a83598'; if(!SPerfLib.isAttached) { document.addEventListener('DOMContentLoaded', function() { var l = document.createElement('script'); l.src = 'http://127.0.0.1:2/scripts/sfclient.perf.prefix.min.js'; document.body.appendChild(l);}); SPerfLib.isAttached = true;}</script>

我已经尝试查找配置选项,但没有找到。我不确定脚本是否应该从端口2提供。Prefix的跟踪输出来自端口2012,这似乎是正确的。

我尝试卸载并重新安装Prefix,但结果相同。似乎没有更新的Prefix版本可供尝试。

我该如何使这些脚本成功加载?

Part 2:

在特定页面上,我们有一个XHR用于检索一些JSON数据。服务器正确返回数据,但在数据到达浏览器之前,数据被某种方式删除了。响应头显示状态码为200,但content-length为0字节,这导致页面上的一些JS代码失败。如果我在没有使用Prefix的情况下运行相同的操作,一切都按预期工作 - 状态仍然是200,但content-length为37,并且JSON有效载荷可见。

这是在使用Prefix时XHR的响应头(注意content-length: 0):

cache-control: no-cache, must-revalidate
content-language: en-US
content-length: 0
content-type: text/html
date: Mon, 31 Aug 2020 14:19:24 GMT
expires: Thu, 01 Jan 1970 00:00:00 GMT
last-modified: Mon, 31 Aug 2020 14:19:24 GMT
pragma: no-cache
server: WildFly/10
status: 200
x-powered-by: Undertow/1
x-powered-by: JSP/2.3
x-stackifyid: V1|8bbdce1c-a507-bbdc-0001-3378bff33740|

如果我从JVM选项中删除Stackify代理并禁用分析器,响应头将如下所示:

cache-control: no-cache, must-revalidate
content-language: en-US
content-length: 37
content-type: text/html;charset=UTF-8
date: Mon, 31 Aug 2020 14:25:12 GMT
expires: Thu, 01 Jan 1970 00:00:00 GMT
last-modified: Mon, 31 Aug 2020 14:25:12 GMT
pragma: no-cache
server: WildFly/10
status: 200
x-powered-by: Undertow/1

非常感谢您的任何建议!

英文:

Two part question that may or may not be related to each other.

I am running Stackify Prefix v3.0.28 for a Java application on Win10 and it generally seems to work OK: I can see the traces of various actions in our application.

Part 1:

When navigating to any page of our application I get two failed requests to load JS files:

http://127.0.0.1:2/scripts/sfclient.xhr.min.js
http://127.0.0.1:2/scripts/sfclient.perf.prefix.min.js

Both of these requests fail with ERR_CONNECTION_REFUSED. Those script references are not in my JSP page so I assume they are injected by Prefix.

Here is the raw HTML that tries to load the 2 scripts:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><script src="http://127.0.0.1:2/scripts/sfclient.xhr.min.js"></script>
    <script>var SPerfLib = window.SPerfLib || {}; SPerfLib.RequestId = '54fd58d1-7f7e-d3a4-0001-331676a83598'; if(!SPerfLib.isAttached) { document.addEventListener('DOMContentLoaded', function() { var l = document.createElement('script'); l.src = 'http://127.0.0.1:2/scripts/sfclient.perf.prefix.min.js'; document.body.appendChild(l);}); SPerfLib.isAttached = true;}</script>

I have tried looking for configuration options, but found none. I was not sure if the scripts should be server from port 2 or not. The Prefix trace output is from port 2012 and that seems correct.

I tried uninstalling and re-installing Prefix, but with the same results. There does not seem to be any later version of Prefix to try.

How do I get those scripts to load successfully?

Part 2:

On one particular page we have an XHR to retrieve some JSON data. The server is returning data correctly, but it is somehow deleted before it arrives at the browser. The response headers show status 200 but 0 bytes content-length, which then causes some of our JS on the page to fail. If I run the same thing w/o Prefix everything works as expected - status is still 200, but content-length is 37 and JSON payload is visible.

This is the response header for the XHR when Prefix is in play (note content-length: 0)

cache-control: no-cache, must-revalidate
content-language: en-US
content-length: 0
content-type: text/html
date: Mon, 31 Aug 2020 14:19:24 GMT
expires: Thu, 01 Jan 1970 00:00:00 GMT
last-modified: Mon, 31 Aug 2020 14:19:24 GMT
pragma: no-cache
server: WildFly/10
status: 200
x-powered-by: Undertow/1
x-powered-by: JSP/2.3
x-stackifyid: V1|8bbdce1c-a507-bbdc-0001-3378bff33740|

If I remove the Stackify agent from the JVM options and disable the profiler, then the response header looks like this:

cache-control: no-cache, must-revalidate
content-language: en-US
content-length: 37
content-type: text/html;charset=UTF-8
date: Mon, 31 Aug 2020 14:25:12 GMT
expires: Thu, 01 Jan 1970 00:00:00 GMT
last-modified: Mon, 31 Aug 2020 14:25:12 GMT
pragma: no-cache
server: WildFly/10
status: 200
x-powered-by: Undertow/1

I'm appreciative of any suggestions!

答案1

得分: 1

这些与 Prefix 相关的问题是已知的问题。我们正在对 Prefix 进行完全重写(这也是自上次发布以来出现如此长时间延迟的原因),这些问题将在新的 Prefix 版本中得到修复。我们距离发布 Prefix Beta 版本非常近了,如果您想加入试用 Prefix Beta 版本的名单,请给 Stackify 支持团队发电子邮件:support@stackify.com。

英文:

These issues you are having with Prefix are known issues with Prefix. We are working on a complete re-write of Prefix (a reason why there has been such a big delay since our last release) and these items are things we are getting fixed in the new Prefix version. We are getting very close to releasing a Beta for Prefix, if you would like to be on the list to give the Prefix beta a try email the Stackify Support Team <support@stackify.com>

huangapple
  • 本文由 发表于 2020年8月29日 08:45:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/63642430.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定