qaiu / netdisk-fast-download

各类网盘直链解析, 已支持蓝奏云/奶牛快传/移动云云空间/QQ邮箱中转站/小飞机盘/亿方云/123云盘等. 体验地址: https://lz.qaiu.top
https://blog.qaiu.top
MIT License
1.47k stars 112 forks source link

请教个jdk 弱智问题 #54

Closed renwfy closed 1 month ago

renwfy commented 1 month ago

centos 服务端部署, jdk是直接安装,还是把提供的那个jdk放什么路径??

renwfy commented 1 month ago

WX20240920-231605@2x

qaiu commented 1 month ago

在安装服务之前可以将服务脚本里jdk改为实际路径,截图所示路径应该是默认路径

。。既然已经安装了,所以可以把jdk安装到截图指定路径

renwfy commented 1 month ago

002

奇怪了,还是报错呢!!!

renwfy commented 1 month ago

[root@ht2024092041433 netdisk-fast-download]# /root/java/jdk-17.0.2/bin/java -server -Xmx128m -jar /root/java/netdisk-fast-download/netdisk-fast-download.jar Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.security.Security at java.base/sun.security.util.SecurityProperties.getOverridableProperty(SecurityProperties.java:57) at java.base/sun.security.util.SecurityProperties.privilegedGetOverridable(SecurityProperties.java:48) at java.base/sun.security.util.SecurityProperties.includedInExceptions(SecurityProperties.java:72) at java.base/sun.security.util.SecurityProperties.(SecurityProperties.java:36) at java.base/sun.security.util.FilePermCompat.(FilePermCompat.java:45) at java.base/java.security.AccessControlContext.(AccessControlContext.java:269) at java.base/java.security.AccessController.createWrapper(AccessController.java:647) at java.base/java.security.AccessController.doPrivileged(AccessController.java:460) at java.logging/java.util.logging.LogManager.initStatic(LogManager.java:2751) at java.logging/java.util.logging.LogManager.(LogManager.java:2746) at java.logging/java.util.logging.Logger.demandLogger(Logger.java:649) at java.logging/java.util.logging.Logger.getLogger(Logger.java:718) at java.logging/java.util.logging.Logger.getLogger(Logger.java:702) at io.vertx.core.logging.JULLogDelegate.(JULLogDelegate.java:28) at io.vertx.core.logging.JULLogDelegateFactory.createDelegate(JULLogDelegateFactory.java:51) at io.vertx.core.logging.LoggerFactory.(LoggerFactory.java:36) at io.vertx.core.impl.logging.LoggerFactory.getLogger(LoggerFactory.java:26) at io.vertx.core.impl.AddressResolver.(AddressResolver.java:40) at io.vertx.core.dns.AddressResolverOptions.(AddressResolverOptions.java:94) at io.vertx.core.VertxOptions.(VertxOptions.java:140) at io.vertx.core.Vertx.vertx(Vertx.java:140) at cn.qaiu.vx.core.Deploy.(Deploy.java:34) at cn.qaiu.vx.core.Deploy.(Deploy.java:30) at cn.qaiu.lz.AppMain.main(AppMain.java:22) Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.InternalError: Error loading java.security file [in thread "main"] at java.base/java.security.Security.initialize(Security.java:106) at java.base/java.security.Security$1.run(Security.java:84) at java.base/java.security.Security$1.run(Security.java:82) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at java.base/java.security.Security.(Security.java:82) at java.base/java.security.Policy$1.run(Policy.java:210) at java.base/java.security.Policy$1.run(Policy.java:207) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at java.base/java.security.Policy.loadPolicyProvider(Policy.java:207) at java.base/java.security.Policy.getPolicyNoCheck(Policy.java:191) at java.base/java.security.ProtectionDomain.implies(ProtectionDomain.java:325) at java.base/java.security.ProtectionDomain.impliesWithAltFilePerm(ProtectionDomain.java:357) at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:463) at java.base/java.security.AccessController.checkPermission(AccessController.java:1068) at ch.qos.logback.core.util.Loader$1.run(Loader.java:48) at ch.qos.logback.core.util.Loader$1.run(Loader.java:45) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at ch.qos.logback.core.util.Loader.(Loader.java:45) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:73) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:66) at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:52) at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:183) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:170) at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:453) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:439) at io.vertx.core.logging.SLF4JLogDelegateFactory.(SLF4JLogDelegateFactory.java:35) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:467) at io.vertx.core.logging.LoggerFactory.configureWith(LoggerFactory.java:63) at io.vertx.core.logging.LoggerFactory.initialise(LoggerFactory.java:52) at io.vertx.core.logging.LoggerFactory.(LoggerFactory.java:34) ... 8 more Exception in thread "Logging-Cleaner" java.lang.NoClassDefFoundError: Could not initialize class java.util.logging.LogManager at java.logging/java.util.logging.LogManager$Cleaner.run(LogManager.java:271) Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.NoClassDefFoundError: Could not initialize class java.security.Security [in thread "main"] at java.base/sun.security.util.SecurityProperties.getOverridableProperty(SecurityProperties.java:57) at java.base/sun.security.util.SecurityProperties.privilegedGetOverridable(SecurityProperties.java:48) at java.base/sun.security.util.SecurityProperties.includedInExceptions(SecurityProperties.java:72) at java.base/sun.security.util.SecurityProperties.(SecurityProperties.java:36) at java.base/sun.security.util.FilePermCompat.(FilePermCompat.java:45) at java.base/java.security.AccessControlContext.(AccessControlContext.java:269) at java.base/java.security.AccessController.createWrapper(AccessController.java:647) at java.base/java.security.AccessController.doPrivileged(AccessController.java:460) at java.logging/java.util.logging.LogManager.initStatic(LogManager.java:2751) at java.logging/java.util.logging.LogManager.(LogManager.java:2746) at java.logging/java.util.logging.Logger.demandLogger(Logger.java:649) at java.logging/java.util.logging.Logger.getLogger(Logger.java:718) at java.logging/java.util.logging.Logger.getLogger(Logger.java:702) at io.vertx.core.logging.JULLogDelegate.(JULLogDelegate.java:28) at io.vertx.core.logging.JULLogDelegateFactory.createDelegate(JULLogDelegateFactory.java:51) at io.vertx.core.logging.LoggerFactory.(LoggerFactory.java:36) at io.vertx.core.impl.logging.LoggerFactory.getLogger(LoggerFactory.java:26) at io.vertx.core.impl.AddressResolver.(AddressResolver.java:40) at io.vertx.core.dns.AddressResolverOptions.(AddressResolverOptions.java:94) at io.vertx.core.VertxOptions.(VertxOptions.java:140) at io.vertx.core.Vertx.vertx(Vertx.java:140) at cn.qaiu.vx.core.Deploy.(Deploy.java:34) at cn.qaiu.vx.core.Deploy.(Deploy.java:30) at cn.qaiu.lz.AppMain.main(AppMain.java:22)

qaiu commented 1 month ago

哪个版本?

qaiu commented 1 month ago

建议下载最新发行版,解压后,去解压目录下netdisk-fast-download.jar所在目录

先手动启动 执行命令 /root/java/jdk-17.0.2/bin/java -jar netdisk-fast-download.jar 看下有无报错 如果有报错可能是jdk问题 如果没问题再安装服务

renwfy commented 1 month ago

好的,我试试。我下载的应该是最新版本

renwfy commented 1 month ago

sdk用的这个 https://lz.qaiu.top/ec/6ebc9f2e0bbd53b4c4d5b11013f40a80NHvcYU

renwfy commented 1 month ago

003

qaiu commented 1 month ago

OK,我验证一下,稍等

qaiu commented 1 month ago

查看一下java版本 /root/java/jdk-17.0.2/bin/java --version 正常是

openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (Alibaba Dragonwell Standard Edition)-17.0.7.0.7+7-GA (build 17.0.8+7)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell Standard Edition)-17.0.7.0.7+7-GA (build 17.0.8+7, mixed mode, sharing)

如果版本没问题,看下是否是下载的0.1.8版本,我这边测试是OK的,应该和操作系统没关系

如果服务跑不起来,建议先按我上面发的命令,单独启动试试 来排除是服务脚本的问题

qaiu commented 1 month ago

上面的报错信息,看不出啥原因来

renwfy commented 1 month ago

好,我再试一下

renwfy commented 1 month ago
image image
renwfy commented 1 month ago

难道是服务器环境问题

qaiu commented 1 month ago

难道是服务器环境问题

是网上找一下,试一下别的jdk17,或者直接下载个最新的jdk21 应该都兼容的,我用的是阿里的jdk17,不排除和服务器不兼容的情况

还有种可能就是看看系统里有没有配置java相关的环境变量,有的话就去除,那个安全类找不到,我怀疑是服务器自带了java8环境,而环境变量又写入了类路径,导致jdk17运行环境出了问题,如果是这种情况,可以直接在别的目录执行java -version看看有没有预装java

renwfy commented 1 month ago

我换了一个服务器同样的操作可以正常工作,我再找找原因吧。麻烦了

renwfy commented 1 month ago

跑起来后,缓存之类的配置,是需要单独处理的吗?我看每次刷新结果不一样,好像缓存没生效呢?

qaiu commented 1 month ago

默认配置好了,调用json接口复制过来我看一下

renwfy commented 1 month ago

这里 http://xxx:6400/json/parser?url=

每次请求结果都是变的

qaiu commented 1 month ago

这里 http://154.83.12.153:6400/json/parser?url=

每次请求结果都是变的 http://154.83.12.153:6400/json/parser?url=https://share.feijipan.com/s/GOCGlUWe

{"code":200,"msg":"success","success":true,"count":0,"data":"https://d.feijix.com/storage/files/2024/08/19/2/18695672/17240648907455.gz?t=66f62733&rlimit=20&us=VKpdr7WyVc&sign=2c6115c7106b75edbde3d22553613fc5&download_name=DrvCeonwLite_2.17_20240815.exe","timestamp":1727406123389}

你下的是0.1.7版本,0.1.8有缓存有效期字段

{ "code": 200, "msg": "success", "success": true, "count": 0, "data": { "shareKey": "fj:GOCGlUWe", "directLink": "https://d.feijix.com/storage/files/2024/08/19/2/18695672/17240648907455.gz?t=66f62790&rlimit=20&us=jYqrEYbCfT&sign=18ee8e2425eb5c5f2693097315070254&download_name=DrvCeonwLite_2.17_20240815.exe", "cacheHit": true, "expires": "2024-09-27 11:23:36", "expiration": 1727407416821 }, "timestamp": 1727406219106 }

renwfy commented 1 month ago

好的,我重新部署下

renwfy commented 1 month ago

0.1.8 可以了