• onlyoffice报 error self signed certificate导致download failed错误处理


    安装nextcloud+onlyoffice,打开onlyoffice报错
    在这里插入图片描述
    进入容器看out.log报错信息

    [root@nextcloud ~]# docker ps -a
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    CONTAINER ID  IMAGE                                       COMMAND     CREATED       STATUS           PORTS                                        NAMES
    a7c97fb93556  docker.io/onlyoffice/documentserver:latest              30 hours ago  Up 30 hours ago  0.0.0.0:8080->80/tcp, 0.0.0.0:9000->443/tcp  onlyoffice
    [root@nextcloud ~]# docker exec -it a7c97fb93556 /bin/bash
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    root@a7c97fb93556:/# cd /var/log/onlyoffice/documentserver/converter/
    root@a7c97fb93556:/var/log/onlyoffice/documentserver/converter# ls
    err.log  out.log-20220729
    root@a7c97fb93556:/var/log/onlyoffice/documentserver/converter#
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

    禁用Document Server 访问验证
    接下来禁用Document Server的访问验证,Document Server默认拒绝未认证的请求(也就是自签名的HTTPS请求)。

    我现在是用的Docker跑的Document Server,使用docker exec命令登入到容器中。

    容器中好像只有nano编辑器,不过也够用了。

    打开/etc/onlyoffice/documentserver/default.json,向下找到rejectUnauthorized字段,将其值改为false。

    重启容器。
    修改default.json

    root@a7c97fb93556:/var/log/onlyoffice/documentserver/converter# cd /etc/onlyoffice/
    root@a7c97fb93556:/etc/onlyoffice# ls
    documentserver  documentserver-example
    root@a7c97fb93556:/etc/onlyoffice# cd documentserver
    root@a7c97fb93556:/etc/onlyoffice/documentserver# ls
    default.json              local.json  production-linux.json
    development-linux.json    log4js      production-windows.json
    development-mac.json      logrotate   supervisor
    development-windows.json  nginx
    root@a7c97fb93556:/etc/onlyoffice/documentserver# pwd
    /etc/onlyoffice/documentserver
    root@a7c97fb93556:/etc/onlyoffice/documentserver#
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    修改如下: “rejectUnauthorized”: false

                         "requestDefaults": {
                                    "headers": {
                                            "User-Agent": "Node.js/6.13",
                                            "Connection": "Keep-Alive"
                                    },
                                    "gzip": true,
                                    "rejectUnauthorized": false
                            },
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9

    重启容器

    root@a7c97fb93556:/etc/onlyoffice/documentserver# exit
    exit
    [root@nextcloud ~]# docker stop a7c97fb93556
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    Error: given PIDs did not die within timeout
    [root@nextcloud ~]# docker start a7c97fb93556
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    Error: unable to start container "a7c97fb93556650c83dd763f9578705a82f34b2673f9759e8d0ce62afc63e77c": container a7c97fb93556650c83dd763f9578705a82f34b2673f9759e8d0ce62afc63e77c must be in Created or Stopped state to be started: container state improper
    [root@nextcloud ~]# reboot
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    重启nextcloud

    login as: root
    root@192.168.182.130's password:
    Activate the web console with: systemctl enable --now cockpit.socket
    
    Last login: Fri Jul 29 15:59:59 2022 from 192.168.182.1
    [root@nextcloud ~]# setenforce 0
    [root@nextcloud ~]# systemctl start https
    Failed to start https.service: Unit https.service not found.
    [root@nextcloud ~]# systemctl start httpd
    Enter TLS private key passphrase for localhost:443 (RSA) : ******
    [root@nextcloud ~]# docker ps -a
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    CONTAINER ID  IMAGE                                       COMMAND     CREATED       STATUS      PORTS                                        NAMES
    a7c97fb93556  docker.io/onlyoffice/documentserver:latest              31 hours ago  Created     0.0.0.0:8080->80/tcp, 0.0.0.0:9000->443/tcp  onlyoffice
    [root@nextcloud ~]# docker start a7c97fb93556
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    a7c97fb93556
    [root@nextcloud ~]#
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19

    启动onlyoffice
    在这里插入图片描述
    按照提示运行

    [root@nextcloud ~]# sudo docker exec a7c97fb93556 sudo supervisorctl start ds:example
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    sudo: unable to send audit message: Operation not permitted
    ds:example: started
    
    
    • 1
    • 2
    • 3
    • 4
    • 5

    成功打开word文档在这里插入图片描述

  • 相关阅读:
    Vue_Bug VUE-ELEMENT-ADMIN默认是英文模式
    基于Python的网络爬虫爬取天气数据可视化分析
    SSM - Springboot - MyBatis-Plus 全栈体系(十八)
    spring6-国际化:i18n | 数据校验:Validation
    geteway我的一些记录
    Nginx实现负载均衡
    24、D-NeRF: Neural Radiance Fields for Dynamic Scenes
    Linux awk命令
    wsl2安装百度apollo及其基本配置
    docker 使用Ubuntu作为基础镜像:安装jdk1.8一直停留,怎么选择都不能跳过去
  • 原文地址:https://blog.csdn.net/weixin_44048054/article/details/126057999