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

[BUG] 使用 数据透视 的 IP查询 查询部分有本地记录的IP后结果缺失本地记录 #559

Closed
6 of 16 tasks
CreeperAWA opened this issue Oct 5, 2024 · 6 comments
Labels
bug 程序错误,有什么东西无法正常工作

Comments

@CreeperAWA
Copy link
Contributor

版本号 - Version

v6.4.1

操作系统平台和系统架构 - OS and CPU Arch

Windows 11专业工作站版 23H2 22635.4300 x64

部署方式 - Deploy methods

  • Windows .exe 安装程序 (Windows .exe Installer)
  • Windows .zip 绿色部署包 (Windows .zip Portable)
  • Docker
  • JAR 包直接启动 (Start via .JAR directly)
  • 群晖 DSM 套件 (Synology .spk package)
  • Debian 软件包 (Debian .deb package)
  • RedHat/Fedora 软件包 (RedHat/Fedora .rpm package)

添加的下载器 - Added Downloaders

  • qBittorrent
  • BiglyBT/Azureus/Vuze
  • Deluge
  • Transmission

问题描述 - Issue Description

使用 数据透视 的 IP查询 查询 IPV6 后没有任何结果,main 部分都是空白的,如图
image
我确定我查询的 IPV6 是正确的,因为那是我刚从封禁名单里复制的

复现步骤 - Reproduce steps

1.找到 数据透视-IP查询
2.输入一个 IPV6 地址,点击查询
3.出现BUG

GIF演示:
recording

截图/日志文件 - Screenshot / Logs

[21:23:20] [JettyServerThreadPool-Virtual-5687/ERROR]: Unable to get ipaddress from ip 223.108.192.30:24552
java.util.concurrent.ExecutionException: inet.ipaddr.AddressStringException: 223.108.192.30:24552 IP Address error: invalid position of IPv6 separator
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:596) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:555) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:111) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:247) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2349) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2189) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2079) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache.get(LocalCache.java:4017) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4898) ~[PeerBanHelper.jar:6.4.1]
	at com.ghostchu.peerbanhelper.util.IPAddressUtil.getIPAddress(IPAddressUtil.java:44) ~[PeerBanHelper.jar:6.4.1]
	at com.ghostchu.peerbanhelper.module.impl.webapi.PBHPeerController.handleInfo(PBHPeerController.java:66) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.router.Endpoint.handle(Endpoint.kt:52) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.router.ParsedEndpoint.handle(ParsedEndpoint.kt:15) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.DefaultTasks.HTTP$lambda$9$lambda$7$lambda$6(DefaultTasks.kt:52) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.handleTask(JavalinServlet.kt:99) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.handleSync(JavalinServlet.kt:64) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.handle(JavalinServlet.kt:50) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.service(JavalinServlet.kt:30) ~[PeerBanHelper.jar:6.4.1]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:52) ~[PeerBanHelper.jar:6.4.1]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:529) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1580) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1381) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1553) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1303) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:173) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.Server.handle(Server.java:563) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) ~[PeerBanHelper.jar:6.4.1]
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:309) ~[?:?]
Caused by: inet.ipaddr.AddressStringException: 223.108.192.30:24552 IP Address error: invalid position of IPv6 separator
	at inet.ipaddr.format.validate.Validator.validateAddress(Validator.java:1314) ~[PeerBanHelper.jar:6.4.1]
	at inet.ipaddr.format.validate.Validator.validateIPAddress(Validator.java:166) ~[PeerBanHelper.jar:6.4.1]
	at inet.ipaddr.format.validate.Validator.validateIPAddressStr(Validator.java:140) ~[PeerBanHelper.jar:6.4.1]
	at inet.ipaddr.format.validate.Validator.validateAddress(Validator.java:133) ~[PeerBanHelper.jar:6.4.1]
	at inet.ipaddr.IPAddressString.validate(IPAddressString.java:531) ~[PeerBanHelper.jar:6.4.1]
	at inet.ipaddr.IPAddressString.validate(IPAddressString.java:480) ~[PeerBanHelper.jar:6.4.1]
	at inet.ipaddr.IPAddressString.toAddress(IPAddressString.java:1039) ~[PeerBanHelper.jar:6.4.1]
	at com.ghostchu.peerbanhelper.util.IPAddressUtil.lambda$getIPAddress$0(IPAddressUtil.java:45) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4903) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3574) ~[PeerBanHelper.jar:6.4.1]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316) ~[PeerBanHelper.jar:6.4.1]
	... 41 more
[21:23:20] [JettyServerThreadPool-Virtual-5687/ERROR]: 500 Internal Server Error
java.lang.NullPointerException: Cannot invoke "inet.ipaddr.IPAddress.toString()" because the return value of "com.ghostchu.peerbanhelper.util.IPAddressUtil.getIPAddress(String)" is null
	at com.ghostchu.peerbanhelper.module.impl.webapi.PBHPeerController.handleInfo(PBHPeerController.java:66) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.router.Endpoint.handle(Endpoint.kt:52) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.router.ParsedEndpoint.handle(ParsedEndpoint.kt:15) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.DefaultTasks.HTTP$lambda$9$lambda$7$lambda$6(DefaultTasks.kt:52) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.handleTask(JavalinServlet.kt:99) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.handleSync(JavalinServlet.kt:64) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.handle(JavalinServlet.kt:50) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.http.servlet.JavalinServlet.service(JavalinServlet.kt:30) ~[PeerBanHelper.jar:6.4.1]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587) ~[PeerBanHelper.jar:6.4.1]
	at io.javalin.jetty.JavalinJettyServlet.service(JavalinJettyServlet.kt:52) ~[PeerBanHelper.jar:6.4.1]
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:529) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1580) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1381) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1553) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1303) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:173) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.Server.handle(Server.java:563) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) ~[PeerBanHelper.jar:6.4.1]
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) ~[PeerBanHelper.jar:6.4.1]
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:309) ~[?:?]

额外信息 - Addition Information

No response

检查清单 - Check list

  • PeerBanHelper 已更新到最新版本,非最新版本不接受任何错误反馈 (I'm running the latest version of PBH that can be found in Github Relases, non-latest release won't receive any support)
  • 所添加的下载器已满足 README 中的前置要求(如版本号和插件)(The downloaders that I've added already satisfied the requirements (E.g install plugins/adapters))
  • 我已检查过 PBH 文档(特别是常见问题),且即使使用了搜索也没有找到与此有关的内容 (This not a question/or the question that not listed in README's FAQ or PBH WIKI)
  • 我没有检查这个检查清单,只是闭眼选中了所有的复选框,请关闭这个 Issue (I have not read these checkboxes and therefore I just ticked them all, Please close this issue)
  • 这不是一个安全漏洞,它可以被安全的公开报告。若需要报告安全漏洞,请在此报告 (This not a security related issue, can be safe report in public. If you want report a security exploit, please report it here)
@Ghost-chu
Copy link
Collaborator

把端口号去掉,端口不属于IP的一部分

@CreeperAWA
Copy link
Contributor Author

有结果了,但是没有封禁信息,这是刚刚(21:33)封禁的IP
image

@Ghost-chu
Copy link
Collaborator

有结果了,但是没有封禁信息,这是刚刚(21:33)封禁的IP image

请等待一段时间后再查询。为了保护磁盘,减少IO次数,PBH会先将数据在内存中缓存,然后再写入数据库中。只有写入了数据库中的数据才能被查询。

@CreeperAWA
Copy link
Contributor Author

有结果了,但是没有封禁信息,这是刚刚(21:33)封禁的IP image

请等待一段时间后再查询。为了保护磁盘,减少IO次数,PBH会先将数据在内存中缓存,然后再写入数据库中。只有写入了数据库中的数据才能被查询。

我查看了日志,已经写入了数据库,而且我翻了几个小时前的,不管是IPV4还是V6都没有记录

@CreeperAWA
Copy link
Contributor Author

我上面的测试可能出现了一些问题,我重新使用了两个几个小时前且相隔仅几分钟的IPV4地址,我发现:
没有客户端名称的IP这个地方会为空,且显示 这个 IP 没有被观测到过,但你仍然可以在这里查看他的部分信息
有客户端名称的IP则有正确的查询结果
不好意思,因为我的疏忽可能麻烦到您了

@Ghost-chu Ghost-chu added the bug 程序错误,有什么东西无法正常工作 label Oct 5, 2024
@CreeperAWA
Copy link
Contributor Author

CreeperAWA commented Oct 5, 2024

补充:使用IPV6地址同样有该问题

而且我发现了一个客户端名称为Freebox BitTorrent 0.2.0的封禁记录无法被查询,提示这个 IP 没有被观测到过,但你仍然可以在这里查看他的部分信息
image
image

22:14:40补充:我的报告似乎正确但又不完全正确,有的客户端查的到,有的则不行,比如Transmission 2.94的IPV4就可以查到,IPV6就不行,Xunlei 0.0.1.9的IPV4和IPV6都可以,这个东西未免有些奇怪了(

@CreeperAWA CreeperAWA changed the title [BUG] 使用 数据透视 的 IP查询 查询 IPV6 后没有任何结果 [BUG] 使用 数据透视 的 IP查询 查询部分有本地记录的IP后结果缺失本地记录 Oct 5, 2024
Gaojianli added a commit that referenced this issue Oct 10, 2024
* Update README.md

* Update README.md

* 替换为 Temurin JDK

* Install4j 支持最高到 Java 23

* install4j 的换成 JB 家的 JDK

* change license and arch

* Update build_pkg.yml

* refact pkg

* add matrix for freebsd

* fix build

* 山不就我,我来就山

* 暂时移除 Windoes aarch64 支持,JDK 发行版不支持

* Update docker/build-push-action action to v6.9.0

* Update all devDependencies to v8.8.0

* 用户提交空白参数时拒绝其操作

* 在 batchTasks 中操作保持原子性(需要测试)

* 不对 PeerRecord 使用 ObjectCache

* 查询前强制缓存刷写,更改found条件 fix #559

* Update default

* Update bug_report.yml

* 输入 PBH Plus Key 时,trim key

* Update dependency vue-i18n to v10.0.4

* Update all devDependencies

* upgrade deps

* Bump rollup from 4.21.3 to 4.24.0 in /webui

Bumps [rollup](https://github.com/rollup/rollup) from 4.21.3 to 4.24.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.21.3...v4.24.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump elliptic from 6.5.5 to 6.5.7 in /webui

Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.5 to 6.5.7.
- [Commits](indutny/elliptic@v6.5.5...v6.5.7)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix #564

* 缓解规则缓存导致的内存泄漏问题

* 升级 Java23

* Java 23

* Revert "Java 23"

This reverts commit 0cd7cd7.

* Revert "升级 Java23"

This reverts commit 8aa6fd3.

* 修复构建

* 适配 BitComet 2.10 正式版预览

* 适配 BitComet 2.10 正式版预览

添加 PCB 对 BitComet 的支持

* 不再自带 BouncyCastle 依赖

* 端口监听失败时,输出本地化的错误信息

* bump version

* 版本号之前不小心写死了

* bump webui version

* Update dependency org.jetbrains:annotations to v26

* fix web build

* rename ci

* 行为tm的竟然不一致

* don't collect debug pkg

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: 高渐离 <[email protected]>
Co-authored-by: Gaojianli <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 程序错误,有什么东西无法正常工作
Projects
None yet
Development

No branches or pull requests

2 participants