问题已经解决:
centos 默认安装的docker,该版本太老了。我描述的问题是一个Bug在新版已经修复。
解决方法是安装最新的docker-CE
系统信息。
[root@seafile ~]# more /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@seafile ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-208.git7d71120.el7_9.x86_64
Go version: go1.10.3
Git commit: 7d71120/1.13.1
Built: Mon Jun 7 15:36:09 2021
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-208.git7d71120.el7_9.x86_64
Go version: go1.10.3
Git commit: 7d71120/1.13.1
Built: Mon Jun 7 15:36:09 2021
OS/Arch: linux/amd64
Experimental: false
centos测试前已经关闭SELinux和防火墙。
Seafile和onlyoffice安装在同一台宿主机上,宿主机IP为:10.10.10.142。
IMAGE | PORTS | NAMES |
---|---|---|
onlyoffice/documentserver | 0.0.0.0:8080->80/tcp,0.0.0.0:8443->443/tcp | onlyoffice |
seafileltd/seafile-mc:latest | 0.0.0.0:80->80/tcp,0.0.0.0:443->443/tcp | seafile |
mariadb:10.5 | 3306/tcp | seafile-mysql |
memcached:1.5.6 | 11211/tcp | seafile-memcached |
onlyoffice已安装好,启用SSL。能正常访问欢迎页面。
Seafile已启用SSL,能正常上传文件。修改 seahub_settings.py
# Enable Only Office
ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = False
# ONLYOFFICE_APIJS_URL = 'http{s}://{your OnlyOffice server's domain or IP}/web-apps/apps/api/documents/api.js'
ONLYOFFICE_APIJS_URL = 'https://10.10.10.142:8443/web-apps/apps/api/documents/api.js'
ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')
ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx')
重启容器后,不能使用onlyoffice打开文件,提示下载失败。
进入 onlyoffice容器后,发现能ping 通10.10.10.142.尝试访问seafile主页出错。
wget https://10.10.10.142/accounts/login/?next=/
--2021-11-27 16:54:00-- https://10.10.10.142/accounts/login/?next=/
Connecting to 10.10.10.142:443... failed: No route to host.
查看 /var/log/onlyoffice/documentserver/converter/out.log也发现有文件下载错误的提示。
[2021-11-27T16:46:29.573] [ERROR] nodeJS - error downloadFile:url=https://10.10.10.142/seafhttp/files/99ca5d66-4417-47ea-bd4a-d82c6786d8a2/seafile
-tutorial.doc;attempt=1;code:EHOSTUNREACH;connect:null;(id=000206f33b7933c256dd)
Error: connect EHOSTUNREACH 10.10.10.142:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
[2021-11-27T16:46:31.583] [ERROR] nodeJS - error downloadFile:url=https://10.10.10.142/seafhttp/files/99ca5d66-4417-47ea-bd4a-d82c6786d8a2/seafile
-tutorial.doc;attempt=2;code:EHOSTUNREACH;connect:null;(id=000206f33b7933c256dd)
Error: connect EHOSTUNREACH 10.10.10.142:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
[2021-11-27T16:46:33.591] [ERROR] nodeJS - error downloadFile:url=https://10.10.10.142/seafhttp/files/99ca5d66-4417-47ea-bd4a-d82c6786d8a2/seafile
-tutorial.doc;attempt=3;code:EHOSTUNREACH;connect:null;(id=000206f33b7933c256dd)
Error: connect EHOSTUNREACH 10.10.10.142:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
[2021-11-27T16:47:35.405] [WARN] nodeJS - update cluster with 1 workers
[2021-11-27T16:47:35.429] [WARN] nodeJS - worker 1260 started.
[2021-11-27T16:47:35.438] [WARN] nodeJS - update cluster with 1 workers
我感觉是什么时候限制了容器间利用宿主机ip互通,查询网上也有类似说法。但是说的很简单,没能看懂。各位大神有详细一点的教程吗?