文件服务器常见问题合集
# 文件服务器常见问题合集
基于使用标品默认文件服务器的场景,不适用二开存储的客户。
### 1、文件服务不可用:The config of server is unavailable
**问题描述**:日志中看到 The config of server is unavailable 提示
此类问题一般常见于项目刚开始搭建,没有配置好文件服务器,或者苍穹与文件服务器之间的网络问题( ping不通 、端口未开放等原因)
**排查步骤:**
(1)检查文件服务配置,登录 monitor (注册中心》系统属性)搜索配置(如果是容器部署通常的配置是:http://fileserver:8100/fielserver)
![1.webp](/download/0100379b593ce31f4338ab9ff282114ea5f9.webp)
(2)确认配置正确,根据服务地址查看,文件服务器是否正常启动。(检查进程、服务状态)。
(3)检查 web 、mservice 节点与文件服务器所在机器之间的网络(ip、端口)的连通性。
以上检查都通过,基本上问题已经解决。
### 2、上传文件:403
**问题描述:**上传文件失败,F12 查看响应状态码为 403
![2.webp](/download/01008d7879026d374ffabedda5b6f19b3336.webp)
**排查步骤:**
此问题基本上都是因为服务代理层做的限制,用户所在的网段被限制上传文件。
### 3、上传文件:413
**问题描述:**上传文件时,http 响应报文中提示 413
**排查步骤:**
该问题常出现在上传大文件时。通过检查 Nginx 的日志,会发现 Nginx 限制上传文件大小。可以调整 Nginx 的参数,设置允许上传文件的大小。![3.webp](/download/01005cfe570399a344c8b2a76e994c0f0969.webp)
### 4、上传文件:net::ERR_CONNECTION_RESET
**问题描述:**上传时,可以看到请求的 Status 报错 net::ERR_CONNECTION_RESET。
![4.webp](/download/01009283544ae2c8453397d1466159881215.webp)
**排查步骤:**
(1)检查代理 nginx 是否有拦截。
(2)客户的网络环境做了限制,找客户运维检查网络限制。
基本上都是上诉两种情况的一种,需要仔细检查确认。
### 5、上传文件:No such file or directory
**问题描述:**上传时,发现日志堆栈中出现类似错误堆栈(No such file or directory)
![5.webp](/download/0100dd541f7c6c2b4910b0ec57c19cdd315c.webp)
**排查步骤:**
通过堆栈看到 kd.bos.fileserver.api.impl.FileDiskServiceImpl 包名知道是文件服务器返回给苍穹的错误日志。
该问题是文件服务器配置(挂载)的磁盘没有写权限导致。联系运维老师检查权限,正确授权即可。
### 6、上传文件:No space left on device
**问题描述:**上传报错:No space left on device
**排查步骤:**报错是指,fileserver容器上的/kddata目录挂载的存储满了,需要检查:
* 容器根目录是否满了
* 是否挂载有问题
* 挂载的存储满了
### 7、下载文件:Idle timeout expired: 30000/30000 ms
**问题描述:**下载文件失败,在 monitor 日志中查询发现以下日志(关键词:Idle timeout expired: 30000/30000 ms)
```
org.eclipse.jetty.io.EofException: Closed
at org.eclipse.jetty.server.HttpOutput.checkWritable(HttpOutput.java:768)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:792)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at kd.bos.actiondispatcher.ActionUtil.writeResponseResult(ActionUtil.java:85)
at kd.bos.web.actions.AttachmentAction.download(AttachmentAction.java:476)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at kd.bos.actiondispatcher.Invoker.invoke(Invoker.java:23)
at kd.bos.actiondispatcher.ActionFilter.doFilter(ActionFilter.java:170)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.login.filter.LoginFilter.doFilter(LoginFilter.java:706)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.metric.instruments.servlet.MetricFilter.doFilter(MetricFilter.java:95)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.trace.instrument.web.TraceFilter.generateTraceId(TraceFilter.java:139)
at kd.bos.trace.instrument.web.TraceFilter.doFilter(TraceFilter.java:103)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.framework.filter.ThreadLifeCycleFilter.doFilter(ThreadLifeCycleFilter.java:36)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.mservice.circuitbreaker.filter.web.CircuitbreakerFilter.lambda$doFilter$0(CircuitbreakerFilter.java:46)
at kd.bos.mservice.circuitbreaker.noop.NoopCircuitbreaker.call(NoopCircuitbreaker.java:41)
at kd.bos.mservice.circuitbreaker.filter.web.CircuitbreakerFilter.doFilter(CircuitbreakerFilter.java:45)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.service.web.filter.KDCommonFilter.doFilter(KDCommonFilter.java:96)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
at java.lang.Thread.run(Thread.java:745)
/dcc.pxwsemi.com/1251557215718867968/202201/hw_baseservice/hw_filesign/1278369073301831680/attachments/1641879953076.ziperror
kd.bos.exception.KDException: /dcc.pxwsemi.com/1251557215718867968/202201/hw_baseservice/hw_filesign/1278369073301831680/attachments/1641879953076.ziperror
at kd.bos.fileservice.impl.AbstractFileService.download(AbstractFileService.java:549)
at kd.bos.web.actions.AttachmentAction.download(AttachmentAction.java:460)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at kd.bos.actiondispatcher.Invoker.invoke(Invoker.java:23)
at kd.bos.actiondispatcher.ActionFilter.doFilter(ActionFilter.java:170)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.login.filter.LoginFilter.doFilter(LoginFilter.java:706)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.metric.instruments.servlet.MetricFilter.doFilter(MetricFilter.java:95)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.trace.instrument.web.TraceFilter.generateTraceId(TraceFilter.java:139)
at kd.bos.trace.instrument.web.TraceFilter.doFilter(TraceFilter.java:103)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.framework.filter.ThreadLifeCycleFilter.doFilter(ThreadLifeCycleFilter.java:36)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.mservice.circuitbreaker.filter.web.CircuitbreakerFilter.lambda$doFilter$0(CircuitbreakerFilter.java:46)
at kd.bos.mservice.circuitbreaker.noop.NoopCircuitbreaker.call(NoopCircuitbreaker.java:41)
at kd.bos.mservice.circuitbreaker.filter.web.CircuitbreakerFilter.doFilter(CircuitbreakerFilter.java:45)
at kd.bos.service.web.filter.KFilterConfig$2.doFilter(KFilterConfig.java:277)
at kd.bos.service.web.filter.KDCommonFilter$2.doFilter(KDCommonFilter.java:69)
at kd.bos.service.web.filter.KDCommonFilter.doFilter(KDCommonFilter.java:96)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:257)
at org.eclipse.jetty.server.HttpOutput.channelWrite(HttpOutput.java:270)
at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:868)
at kd.bos.fileservice.impl.AbstractFileService.download(AbstractFileService.java:543)
... 64 common frames omitted
Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms
at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:171)
at org.eclipse.jetty.io.IdleTimeout.idleCheck(IdleTimeout.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 common frames omitted
```
**问题排查:**
客户端拿到文件流对象,长时间不 write 超过空闲时间导致服务端 jetty 关闭了连接。
[eclipse/jetty.project#4280](/tolink?target=https://github.com/eclipse/jetty.project/issues/4280)
[@Vod9nou](/tolink?target=https://github.com/Vod9nou) the stack trace indicates that the server was writing some content, but the TCP connection got congested, so the write blocked.
To unblock the congestion, the client must read (and communicate that to the server via TCP ACKs).
Apparently this did not happen for 30 seconds, so Jetty closed the connection due to idle timeout.
As for configuring the idle timeout to a larger value, you should ask to the Spring Boot Project.
Using the code you would do:
在【浏览器 -> 苍穹】过程中出现异常。由于网络波动原因,或者下载过程客户端长时间不进行读写,苍穹服务关闭了连接。这种情况可以尝试调整苍穹的参数(org.eclipse.jetty.http.timeout=300000,默认是 30000)
### 8、下载文件:Truncated chunk
下载文件出现文件不完整,在 Monitor 上查看日志发现 Truncated chunk。
【苍穹 -> 文件服务】过程中出现异常,可能是苍穹端处理文件流阻塞,再通过查看文件服务器的日志(查看是否有Idle timeout expired: 30000/30000 ms异常)如果有,可通过升级到最新的文件服务器解决问题,新版文件服务器延长了默认的空闲超时时间 30s -> 300s 。
![6.webp](/download/010009212ccc23b04d9a82c5f18f563f448e.webp)
Caused by: org.apache.http.TruncatedChunkException: Truncated chunk (expected size: 32,768; actual size: 2,056)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:197)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:135)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:148)
at kd.bos.fileservice.impl.AbstractFileService.download(AbstractFileService.java:626)
... 74 common frames omitted
### 9、下载文件:附件不存在
**问题排查:**
基于文件服务器或者二开的(对象存储服务)一般都是高可靠的。附件丢失问题的根因一般是两类
**第一类:配置问题 **
系统最开始搭建时的基础配置就不对,一般都是容器部署的情况居多。这里以容器部署举例。
【文件服务单实例场景】
单实例场景,重点关注是否配置了本地存储或者 NFS 存储。如果没有,容器重启文件就全丢了。
【文件服务多实例场景】
第一步:检查是否使用 gPass 平台的 NFS 存储。
第二步:不使用 NFS 时,文件服务数据存储主机路径配置的不是共享存储。
![7.webp](/download/0100d898f9d6ab184f429840241df4f3d029.webp)
![8.webp](/download/01008129d06c3b44412e89d1823c4f202dd1.webp)
**第二类:业务使用问题**
* 一个url被复制到多个单据,导致多个单据指向文件服务器里的同一个文件。则其中一个单据删除附件,会导致其他单据下载时提示附件不存在。
* 单据下推,附件url被下推到下游单据。下游(或上游)单据删除附件,则上游(或下游)单据下载时提示附件不存在。
* 二开,将附件url同时写到多个单据中。
* 二开,将文件放到缓存中,然后持久化到文件服务器。缓存默认超时为2h,超时则获取不到文件,导致文件没有持久化到文件服务器。
### 10、Read timed out
可能的原因及解决方式:
* 文件服务器不稳定。重启文件服务器试试。
* 网络拥堵。
### 11、临时文件
苍穹临时文件支持两种模式 redis 与 disk 模式,默认是 redis。
(苍穹版本 5.0.011 及以上,老版本配置有差异)
**Redis 模式**
redis 模式(tempfile.cachetype=redis,系统默认该配置不需要主动配置),默认最大限制上传的文件大小为 1.5 G。(该模式下,不建议上传大文件)
**Disk 模式**
使用 disk 模式(tempfile.cachetype=disk),需要进行以下操作(重要):
(1) 容器上配置共享存储路径,这个有两种方式(配置后建议做一下检查,在不同容器里创建测试文件,看其他容器是否能查看到测试文件)
第一种:使用节点挂载的共享磁盘,每个节点上的服务都能访问。然后在每个容器上配置主机磁盘路径与容器的路径映射。
(注意这种方式,配置的主机路径是虚拟机上挂载的共享磁盘,所有物理节点都挂载,能正常访问)
![9.webp](/download/01003e693b688555463f830e193437928512.webp)
第二种:使用 NFS 文件存储,在每个容器的配置中,配置容器的路径与 NFS 文件存储某个路径的映射。
![10.webp](/download/01004890e7d0a773467a877da8afcf9791c4.webp)
(2)配置MC参数(配置发布后,建议在 monitor 进行检查参数配置是否成功)。
tempfile.cachetype=disk
diskcache.path=容器的路径(这里的路径就是上面配置的容器路径)
文件服务器常见问题合集
# 文件服务器常见问题合集基于使用标品默认文件服务器的场景,不适用二开存储的客户。### 1、文件服务不可用:The config of server ...
点击下载文档
上一篇:文件预览常见问题合集下一篇:苍穹Monitor独立部署,让监控服务更靠谱
本文2024-09-23 00:27:50发表“云苍穹知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-cangqiong-139624.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章