Windows 开机自检后在seafile中找不到资料库了


#1

版本是5.1.3。
11.5号下班时还在上传数据,6号早上来服务器的阵列出了问题,经过修复后阵列恢复。
启动windows系统后要求自检,正常自检,因为文件数量较多,自检时间较长。
自检完成后进入桌面,seafile服务开启(判断依据是在任务管理器中有进程)。
客户端连接后获取资料库信息失败,进入web页面在“我拥有的”中显示错误,进入后台资料库显示为0。
log:seahub_djiango_request

log:seahub
2018-11-08 09:26:46,318 [ERROR] seahub.api2.endpoints.admin.sysinfo:40 get Error received: 511 Unknown service (In _start_service)
2018-11-08 09:31:32,920 [INFO] root:292 runwsgiserver starting server with options:
{‘adminserve’: ‘Deprecated’,
‘autoreload’: False,
‘daemonize’: False,
‘host’: ‘0.0.0.0’,
‘pidfile’: None,
‘port’: ‘80’,
‘server_group’: ‘www-data’,
‘server_name’: ‘localhost’,
‘server_user’: ‘www-data’,
‘servestaticdirs’: True,
‘ssl_certificate’: None,
‘ssl_private_key’: None,
‘staticserve’: False,
‘threads’: 10,
‘workdir’: None}
2018-11-08 09:48:04,513 [ERROR] seahub.api2.endpoints.admin.sysinfo:40 get Error received: 511 Unknown service (In _start_service)
2018-11-08 09:48:06,036 [ERROR] seahub.api2.endpoints.admin.sysinfo:40 get Error received: 511 Unknown service (In _start_service)
2018-11-08 09:49:08,201 [ERROR] seahub.api2.endpoints.admin.sysinfo:40 get Error received: 511 Unknown service (In _start_service)
2018-11-08 10:28:48,447 [ERROR] seahub.api2.endpoints.admin.sysinfo:40 get Error received: 511 Unknown service (In _start_service)

log:seafserv-applet
[11/08/18 09:12:20] applet/seafserv-applet.c(462): SetMenuItemInfoW failed with error 1456
[11/08/18 09:12:35] applet/seafserv-applet.c(462): SetMenuItemInfoW failed with error 1456
[11/08/18 09:13:19] applet/seafserv-applet.c(462): SetMenuItemInfoW failed with error 1456
[11/08/18 09:30:31] applet/seafserv-applet.c(462): SetMenuItemInfoW failed with error 1456
[11/08/18 09:30:37] applet/seafserv-applet.c(578): ask seafserv to shutdown…
[11/08/18 09:30:37] applet/seafserv-applet.c(221): Connection to daemon is down.
[11/08/18 09:31:26] applet/service-install.c(157): Successfully launched seafile service
[11/08/18 09:31:29] applet/seafserv-applet.c(237): trying to connect to ccnet-sever…
[11/08/18 09:31:29] applet/seafserv-applet.c(263): connected to ccnet server

log:seafserv
[11/08/18 09:44:49] seafserv/seafserv.c(90): starting seaf-server …
[11/08/18 09:44:49] created “seaf-server.exe -c “E:/seafile-server\ccnet” -d “E:/seafile-server\seafile-data” -l “E:/seafile-server\logs\seafile.log” -F “E:/seafile-server\conf””, pid 4428
[11/08/18 09:45:39] seafserv/seafserv.c(516): seaf-server has exited with code 1

log:seafile
[11/08/18 09:33:59] …/common/seaf-db.c(205): Error exec query CREATE TABLE IF NOT EXISTS Branch (name VARCHAR(10), repo_id CHAR(41), commit_id CHAR(41),PRIMARY KEY (repo_id, name)): file is encrypted or is not a database.

log:ccnet
[11/08/18 09:20:30] …/common/session.c(398): Accepted a local client
[11/08/18 09:20:30] …/common/session.c(398): Accepted a local client
[11/08/18 09:20:56] …/common/session.c(398): Accepted a local client
[11/08/18 09:20:56] …/common/session.c(398): Accepted a local client
[11/08/18 09:20:56] …/common/peer.c(941): libevent got an error! what=33, errno=0 (No error)
[11/08/18 09:20:56] …/common/peer.c(943): Local peer down
[11/08/18 09:20:56] …/common/peer.c(941): libevent got an error! what=33, errno=0 (No error)
[11/08/18 09:20:56] …/common/peer.c(943): Local peer down
[11/08/18 09:21:45] …/common/peer.c(943): Local peer down
[11/08/18 09:21:45] …/common/peer.c(943): Local peer down
[11/08/18 09:21:46] …/common/session.c(398): Accepted a local client
[11/08/18 09:21:46] …/common/session.c(398): Accepted a local client
[11/08/18 09:21:46] …/common/peer.c(941): libevent got an error! what=33, errno=0 (No error)
[11/08/18 09:21:46] …/common/peer.c(943): Local peer down
[11/08/18 09:21:46] …/common/peer.c(941): libevent got an error! what=33, errno=0 (No error)
[11/08/18 09:21:46] …/common/peer.c(943): Local peer down
[11/08/18 09:21:50] …/common/session.c(398): Accepted a local client
[11/08/18 09:22:05] …/common/session.c(398): Accepted a local client
[11/08/18 09:22:05] …/common/peer.c(943): Local peer down
[11/08/18 09:22:05] …/common/peer.c(943): Local peer down
[11/08/18 09:22:12] …/common/session.c(398): Accepted a local client
[11/08/18 09:22:36] …/common/session.c(398): Accepted a local client
[11/08/18 09:22:36] …/common/session.c(398): Accepted a local client

日志中重复性的错误没贴。
这个问题谁碰到过,怎么解决的?


#2

清空缓存也没用,UTC之前已经添加,原来服务器是正常的。


#3

参考这个文档,https://manual-cn.seafile.com/maintain/seafile_fsck.html
尝试修复下底层数据


#4

E:\seafile\seafile-server-5.1.3\seafile\bin>seaf-fsck.exe -r -c E:\seafile-server\ccnet -d e:\seafile-server\seafile-data -F E:\seafile-server\conf
[11/09/18 09:49:20] …/…/common/seaf-db.c(269): Error exec query SELECT repo_id
FROM Repo: file is encrypted or is not a database.
这个 repo_id 怎么得到
我这条应该是修复指令吧,现在是所有的资料库都看不到了,后面跟什么样的repo_id


#5

我看到在seafile-data\storage\blocks目录中有很多文件夹,这些是repoid吗?我试着用了一个,出现下面的提示
E:\seafile\seafile-server-5.1.3\seafile\bin>seaf-fsck.exe -r -c E:\seafile-server\ccnet -d e:\seafile-server\seafile-data -F E:\seafile-server\conf cffe1526-abf7-47ec-b108-ce6419b0ce9c
[11/09/18 10:47:42] fsck.c(586): Running fsck for repo cffe1526-abf7-47ec-b108-ce6419b0ce9c.
[11/09/18 10:47:42] …/…/common/seaf-db.c(232): Error exec query SELECT repo_id FROM Repo WHERE repo_id = ‘cffe1526-abf7-47ec-b108-ce6419b0ce9c’: file is encrypted or is not a database.
[11/09/18 10:47:42] fsck.c(595): Repo cffe1526 doesn’t exist.
[11/09/18 10:47:42] fsck.c(650): Fsck finished for repo cffe1526.


#6

你不要指定某个资料库了,执行全局检测吧


#7

image
直接执行这个就行


#8

这是Linux下面的命令,我这个是Windows平台,用其他什么命令


#9

image
就是你执行的这个命令,不要指定具体的资料库就行


#10

执行完是这样
E:\seafile\seafile-server-5.1.3\seafile\bin>seaf-fsck.exe -r
[11/09/18 11:50:18] seafile-session.c(41): Config dir dir C:\Users\Administrator\ccnet\seafile-data does not exist
[11/09/18 11:50:18] seaf-fsck.c(162): Failed to create seafile session.


网页端我的资料库显示错误
#11

https://manual.seafile.com/deploy_windows/windows_fsck.html
看这个文档吧


#12

哎,照着做也出和上面一样的错误。
没辙了。


#13

帮帮忙啊,20T的数据呢


#14

这些路径你要根据自己的部署环境指定正确,你上边的报错看起来就是这些路径没找对,命令的正确用法就是这样的,这些路径指定是否正确只能靠你自己了,谁也帮不上忙。image


#15

image

路径应该就是上面目录的路径


#16

先备seafile-server 这个目录吧,备完在看看能导出不,修复参数写不对啊。
要备快一个月


#17

目录已备完,正在导出。
导出命令还是seaf-fsck,指定参数后正在导出。
修复时老是报参数错误,导出就没有出错,只不过一个是 -r 一个是 -E,其他没变,不知道为什么?


#18

一看你就是路径不对啊 明明在E 你的路径是C啊


#19

路径是对的,你可以看看上面的回复