- 已编辑
很老的版本了。。最近按照文档做了迁移先升级到0.4.4然后导出json,也复制了upload文件夹。安装最新版本导入json显示成功,后台报错“Caused by: java.nio.file.NoSuchFileException: /tmp/undertow3568791523374871132upload”。
应该是找不到路径已经确认upload在~/.halo
文件夹下。请问这种情况下可能是什么原因?怎么解决~~感谢感谢
@
很老的版本了。。最近按照文档做了迁移先升级到0.4.4然后导出json,也复制了upload文件夹。安装最新版本导入json显示成功,后台报错“Caused by: java.nio.file.NoSuchFileException: /tmp/undertow3568791523374871132upload”。
应该是找不到路径已经确认upload在~/.halo
文件夹下。请问这种情况下可能是什么原因?怎么解决~~感谢感谢
@
Sunird 你好,可以提供完整的错误栈么?
错误是这个。
2019-09-18 09:19:31.097 ERROR 20221 --- [ task-1] .a.i.SimpleAsyncUncaughtExceptionHandler : Unexpected exception occurred invoking async method: public void run.halo.app.service.impl.RecoveryServiceImpl.migrateFromV0_4_3(org.springframework.web.multipart.MultipartFile)
run.halo.app.exception.ServiceException: 备份文件 halo_data.json 读取失败
at run.halo.app.service.impl.RecoveryServiceImpl.migrateFromV0_4_3(RecoveryServiceImpl.java:140) ~[classes!/:1.1.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) ~[spring-aop-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_191]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
Caused by: java.nio.file.NoSuchFileException: /tmp/undertow161303156308945841upload
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_191]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_191]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_191]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[na:1.8.0_191]
at java.nio.file.Files.newByteChannel(Files.java:361) ~[na:1.8.0_191]
at java.nio.file.Files.newByteChannel(Files.java:407) ~[na:1.8.0_191]
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[na:1.8.0_191]
at java.nio.file.Files.newInputStream(Files.java:152) ~[na:1.8.0_191]
at io.undertow.server.handlers.form.FormData$FileItem.getInputStream(FormData.java:240) ~[undertow-core-2.0.23.Final.jar!/:2.0.23.Final]
at io.undertow.servlet.spec.PartImpl.getInputStream(PartImpl.java:63) ~[undertow-servlet-2.0.23.Final.jar!/:2.0.23.Final]
at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile.getInputStream(StandardMultipartHttpServletRequest.java:250) ~[spring-web-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
at run.halo.app.service.impl.RecoveryServiceImpl.migrateFromV0_4_3(RecoveryServiceImpl.java:107) ~[classes!/:1.1.0]
... 12 common frames omitted
Sunird 稍等,我们看看。
Sunird 应该是文件上传失败了。你可以考虑用 1.0.3 版本进行迁移试试呢?
问题解决了,感谢~不想造轮子halo真的好用,赞一个。
duia 你当前的 halo 版本是多少呢?
duia 具体错误信息可以给出么?或者上传文件的时候看看 http code 是多少,如果是 417,也应该是 nginx 的 client_max_body 需要扩大。
duia 好的,我们排查一下这个问题。初步判断是因为异步造成的。