问题:
将项目使用Docker-Compose部署到Linux服务器上,出现了不能解压theme文件的问题(后台并未修改,只修改了主题)
已尝试:
- 项目本地运行,能正常运行;
- 将theme.zip部署到linux使用unzip解压,能正常解压;
- 将原官方的theme.zip打包进项目进行重新部署,也是解压失败;
报错信息:
halo | 2024-03-05T21:23:39.986+08:00 ERROR 7 --- [oundedElastic-3] r.h.app.core.extension.theme.ThemeUtils : Failed to unzip theme
halo |
halo | java.lang.IllegalArgumentException: malformed input off : 39, length : 1
halo | at java.base/java.lang.String.throwMalformed(Unknown Source) ~[na:na]
halo | at java.base/java.lang.String.decodeUTF8_UTF16(Unknown Source) ~[na:na]
halo | at java.base/java.lang.String.newStringUTF8NoRepl(Unknown Source) ~[na:na]
halo | at java.base/java.lang.Access.newStringUTF8NoRepl(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipCoder$UTF8ZipCoder.toString(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipCoder.toString(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipInputStream.readLOC(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipInputStream.getNextEntry(Unknown Source) ~[na:na]
halo | at run.halo.app.infra.utils.FileUtils.unzip(FileUtils.java:100) ~[classes/:na]
halo | at run.halo.app.infra.utils.FileUtils.lambda$unzip$0(FileUtils.java:57) ~[classes/:na]
halo | at reactor.core.publisher.MonoUsingWhen.deriveMonoFromResource(MonoUsingWhen.java:115) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoUsingWhen.access$000(MonoUsingWhen.java:46) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoUsingWhen$ResourceSubscriber.onNext(MonoUsingWhen.java:182) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:176) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at run.halo.app.infra.utils.DataBufferUtils.lambda$toInputStream$1(DataBufferUtils.java:37) ~[classes/:na]
halo | at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:61) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoUsingWhen.subscribe(MonoUsingWhen.java:96) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:264) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.Mono.subscribe(Mono.java:4512) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
halo | at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo | Caused by: java.nio.charset.MalformedInputException: Input length = 1
halo | ... 28 common frames omitted
halo |
halo | 2024-03-05T21:23:40.042+08:00 INFO 7 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :
halo |
halo | Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
halo | 2024-03-05T21:23:40.095+08:00 ERROR 7 --- [ main] o.s.boot.SpringApplication : Application run failed
halo |
halo | org.springframework.web.server.ServerWebInputException: 400 BAD_REQUEST "Failed to unzip theme"
halo | at run.halo.app.core.extension.theme.ThemeUtils.lambda$unzipThemeTo$8(ThemeUtils.java:109) ~[classes/:2.12.0-SNAPSHOT]
halo | at reactor.core.publisher.Mono.lambda$onErrorMap$27(Mono.java:3785) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.Mono.lambda$onErrorResume$29(Mono.java:3875) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoUsingWhen$MonoUsingWhenSubscriber.deferredError(MonoUsingWhen.java:278) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.FluxUsingWhen$RollbackInner.onComplete(FluxUsingWhen.java:476) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:254) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
halo | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
halo | at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
halo | Suppressed: java.lang.IllegalArgumentException: malformed input off : 39, length : 1
halo | at java.base/java.lang.String.throwMalformed(Unknown Source) ~[na:na]
halo | at java.base/java.lang.String.decodeUTF8_UTF16(Unknown Source) ~[na:na]
halo | at java.base/java.lang.String.newStringUTF8NoRepl(Unknown Source) ~[na:na]
halo | at java.base/java.lang.Access.newStringUTF8NoRepl(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipCoder$UTF8ZipCoder.toString(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipCoder.toString(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipInputStream.readLOC(Unknown Source) ~[na:na]
halo | at java.base/java.util.zip.ZipInputStream.getNextEntry(Unknown Source) ~[na:na]
halo | at run.halo.app.infra.utils.FileUtils.unzip(FileUtils.java:100) ~[classes/:na]
halo | at run.halo.app.infra.utils.FileUtils.lambda$unzip$0(FileUtils.java:57) ~[classes/:na]
halo | at reactor.core.publisher.MonoUsingWhen.deriveMonoFromResource(MonoUsingWhen.java:115) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoUsingWhen.access$000(MonoUsingWhen.java:46) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoUsingWhen$ResourceSubscriber.onNext(MonoUsingWhen.java:182) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:176) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at run.halo.app.infra.utils.DataBufferUtils.lambda$toInputStream$1(DataBufferUtils.java:37) ~[classes/:na]
halo | at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:61) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoUsingWhen.subscribe(MonoUsingWhen.java:96) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:264) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.Mono.subscribe(Mono.java:4512) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.6.0.jar:3.6.0]
halo | ... 5 common frames omitted
halo | Caused by: java.nio.charset.MalformedInputException: Input length = 1
halo | ... 28 common frames omitted
halo | Suppressed: java.lang.Exception: #block terminated with an error
halo | at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:103) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at reactor.core.publisher.Mono.block(Mono.java:1728) ~[reactor-core-3.6.0.jar:3.6.0]
halo | at run.halo.app.infra.DefaultThemeInitializer.onApplicationEvent(DefaultThemeInitializer.java:55) ~[classes/:2.12.0-SNAPSHOT]
halo | at run.halo.app.infra.DefaultThemeInitializer.onApplicationEvent(DefaultThemeInitializer.java:18) ~[classes/:2.12.0-SNAPSHOT]
halo | at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:178) ~[spring-context-6.1.1.jar:6.1.1]
halo | at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:171) ~[spring-context-6.1.1.jar:6.1.1]
halo | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:149) ~[spring-context-6.1.1.jar:6.1.1]
halo | at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:445) ~[spring-context-6.1.1.jar:6.1.1]
halo | at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) ~[spring-context-6.1.1.jar:6.1.1]
halo | at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:103) ~[spring-boot-3.2.0.jar:3.2.0]
halo | at org.springframework.boot.SpringApplicationRunListeners.lambda$started$5(SpringApplicationRunListeners.java:76) ~[spring-boot-3.2.0.jar:3.2.0]
halo | at java.base/java.lang.Iterable.forEach(Unknown Source) ~[na:na]
halo | at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) ~[spring-boot-3.2.0.jar:3.2.0]
halo | at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) ~[spring-boot-3.2.0.jar:3.2.0]
halo | at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:76) ~[spring-boot-3.2.0.jar:3.2.0]
halo | at org.springframework.boot.SpringApplication.run(SpringApplication.java:329) ~[spring-boot-3.2.0.jar:3.2.0]
halo | at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:149) ~[spring-boot-3.2.0.jar:3.2.0]
halo | at run.halo.app.Application.main(Application.java:28) ~[classes/:2.12.0-SNAPSHOT]
halo | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
halo | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
halo | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
halo | at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
halo | at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91) ~[application/:na]
halo | at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53) ~[application/:na]
halo | at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:58) ~[application/:na]