尝试使用LibreOffice Online,打开文件报错


#1

你好:

我在元旦期间尝试部署了Seafile CE版本在一个虚拟机上。并且配置了另外一台虚拟机安装了Dcoker Collabora/Code 和Nginx反向代理。

网络结构如下:

虚拟机1:Seafile 社区版本 6.3.3,seafile.sh 8000 sahub 8082
虚拟机2:Nginx 反向代理,同时安装Docker CODE。同时Nginx负责反向Https反向代理Seafile

在完成配置后,我参考部署文档集成了LibreOffice Online。但是,在我尝试打开文件的时候,提示我“很抱歉,无法连接到您的文档。请重试。”

查看了Dcoker的访问日志提示如下:

wsd-00031-00179 2018-12-31 13:49:32.279068 [ docbroker_023 ] ERR Cannot get file info from WOPI storage uri [https://cloud.SW.com/api2/wopi/files/a8959c79b2d0d1b188b1bf67da748bfdc59704aa?access_token=4fb72c018e4b440f886aa7c89415f709&access_token_ttl=1546265668911&permission=edit]. Error: Connection refused| wsd/Storage.cpp:474
wsd-00031-00179 2018-12-31 13:49:32.279237 [ docbroker_023 ] ERR Failed to add session to [/api2/wopi/files/a8959c79b2d0d1b188b1bf67da748bfdc59704aa] with URI [https://cloud.SW.com/api2/wopi/files/a8959c79b2d0d1b188b1bf67da748bfdc59704aa?access_token=4fb72c018e4b440f886aa7c89415f709&access_token_ttl=1546265668911&permission=edit]: Connection refused| wsd/DocumentBroker.cpp:1093
wsd-00031-00179 2018-12-31 13:49:32.279346 [ docbroker_023 ] ERR Error while loading : Connection refused| wsd/LOOLWSD.cpp:2674
wsd-00031-00179 2018-12-31 13:49:32.288657 [ docbroker_023 ] WRN Child session [0030] not found to forward message: load url=https://cloud.SW.com/api2/wopi/files/a8959c79b2d0d1b188b1bf67da748bfdc59704aa?access_token=4fb72c018e4b440f886aa7c89415f709&access_token_ttl=1546265668911&permission=edit readonly=0 lang=zh-CN| wsd/DocumentBroker.cpp:1738
wsd-00031-00179 2018-12-31 13:49:33.280687 [ docbroker_023 ] ERR Invalid or unknown session [0030] to remove.| wsd/DocumentBroker.cpp:1162 1m
wsd-00031-00179 2018-12-31 13:49:33.281338 [ docbroker_023 ] ERR No socket associated with WebSocketHandler 0x7f7274013510| ./net/WebSocketHandler.hpp:108
wsd-00031-00032 2018-12-31 13:49:33.281516 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_023], started: true, finished: true| ./net/Socket.hpp:622
wsd-00031-00032 2018-12-31 13:49:33.281573 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_023], started: true, finished: true| ./net/Socket.hpp:622
wsd-00031-00032 2018-12-31 13:49:33.281620 [ prisoner_poll ] WRN Prisoner connection disconnected but without valid socket.| wsd/LOOLWSD.cpp:1776
wsd-00031-00032 2018-12-31 13:49:33.281702 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_023], started: false, finished: true| ./net/Socket.hpp:622
wsd-00031-00032 2018-12-31 13:49:33.281775 [ prisoner_poll ] WRN Waking up dead poll thread [docbroker_023], started: false, finished: true| ./net/Socket.hpp:622 kit-00176-00033 2018-12-31 13:49:33.281247 [ loolkit ] WRN Kit connection lost without exit arriving from wsd. Setting TerminationFlag| kit/Kit.cpp:2202

请问Seafile为什么拒绝了连接,但是我尝试用浏览器直接访问API地址,可以返回相关值。

谢谢


#2

问题已经解决。是由于内部反向代理配置的问题。导致原始地址与请求地址不一致