在confluence中出现Handshake failed due to invalid Upgrade header: null

昨天晚上同事说confluence写完日志保存不了,然后我登陆confluence写日志进行保存,竟然真的保存不了,报错信息如下:

与服务器失去连接,请联系confluence管理员。

当时就进行排查,首先找到confluence的日志

#cd /opt/atlassian/confluence/logs
#tail -f -n catalina.out
......................
-Apr- ::32.242 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::47.580 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::38.132 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::59.103 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::09.113 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::27.122 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::47.117 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::02.103 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::17.137 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::32.096 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
-Apr- ::48.099 ҏט [http-nio--exec-] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null

可以看到确实是confluence日志里有报错,首先看到http-nio-18090-exec-6,当时就想到我在阿里云上面做了域名解析,然后在本地服务器上做了nginx的代理转发,查看nginx的配置文件:

#cd /application/nginx/conf
#vim nginx.conf
worker_processes ;
events {
worker_connections ;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout ;
listen ;
server_name wiki.gong-hui.com;
location / {
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.3.175:18090;
}
}

接着在网上搜索confluence日志文件中的报错信息,发现需要在nginx配置文件location中加入两行信息:

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection  "upgrade";
worker_processes  ;
events {
worker_connections ;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout ;
listen ;
server_name wiki.gong-hui.com;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://192.168.3.175:18090;
}
}

再次到confluence中进行日志提交,成功,完美解决!

在confluence中出现Handshake failed due to invalid Upgrade header: null的更多相关文章

  1. Handshake failed due to invalid Upgrade header: null 解决方案

    Handshake failed due to invalid Upgrade header: null 解决方案 解决方案,在 Nginx ,location 中添加以下代码: proxy_set_ ...

  2. Android 模拟机出现Installation failed due to invalid URI!错误

    [2017-03-28 09:52:13 - DataVDemo06] Installation failed due to invalid URI![2017-03-28 09:52:13 - Da ...

  3. Android开发问题之Installation failed due to invalid URI!

    真机调试遇到以下问题: [2017-07-20 13:43:53 - VCL02PANEL] Installation failed due to invalid URI![2017-07-20 13 ...

  4. SSL handshake failed: SSL 错误:在证书中检测到违规的密钥用法。

    问题:在WINDOWS中创建的SVN Server,在Linux client中无法连接.原因:WINDOWS中的证书无法被Linux正确识别,因此需要修改证书,以使双方都可以正确识别. 修改方法如下 ...

  5. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

    Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} fai ...

  6. tomcat bug之部署应用的时候经常会发上startup failed due to previous errors

    在tomcat上部署应用的时候经常会发上startup failed due to previous errors错误.这个错误产生以后经常会让人摸不到头脑.以下是几点查找经验: 1.web.xml文 ...

  7. evernote出现“Sync failed due to unexpected problem at server side”的问题

    继上次的"Invalid username and/or password"问题之后,evernote又出现了“Sync failed due to unexpected prob ...

  8. Retrieving the COM class factory for component with CLSID XX failed due to the following error: 80070005 拒绝访问。

    环境及异常信息说明 环境说明: Win2008 R2 企业版 x64 .IIS 7.0 功能说明:服务端操作Excel,(上传Excel到服务器,并在服务器端读取Excel中的数据) 异常信息:Ret ...

  9. Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问

    异常信息:Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046 ...

随机推荐

  1. SpringBoot+Angular2 开发环境搭建

    https://segmentfault.com/a/1190000007921675

  2. SpringBoot应用的属性管理

    一.properties 配置文件 1.src/main/application.properties spring.profiles.active=dev spring.application.na ...

  3. Docker学习笔记 - Docker的简介

    传统硬件虚拟化:虚拟硬件,事先分配资源,在虚拟的硬件上安装操作系统,虚拟机启动起来以后资源就会被完全占用. 操作系统虚拟化:docker是操作系统虚拟化,借助操作系统内核特性(命名空间.cgroups ...

  4. GIT入门笔记(7)- 修改文件并向版本库提交

    1.修改文件vi readme.txt git status 发现被修改的文件列表git diff readme.txt 2.git add readme.txt git status  --注意gi ...

  5. GIT入门笔记(5)- 创建版本库

    版本库又名仓库,英文名repository,可以简单理解成一个目录, 这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删除,Git都能跟踪,以便任何时刻都可以追踪历史,或者在将来某个时刻 ...

  6. 新概念英语(1-53)An interesting climate

    新概念英语(1-53)An interesting  climate What's the favourite subject of conversation in England? A:Where ...

  7. 复习HTML+CSS(3)

    n  超级链接 l  语法格式:<a 属性 = "值">---</a> l  常用属性: n  Href:目标文件的地址URL,该URL可以是相对地址,也可 ...

  8. Python生成随机验证码

    Python生成随机验证码,需要使用PIL模块. 安装: pip3 install pillow 基本使用 1.创建图片 from PIL import Image img = Image.new(m ...

  9. Git Bash

    Git Bash是Git的命令行工具,可以执行Git的所有命令,但是当我们想把一个URL粘贴到Git Blash时,Ctrl+V或者右键粘贴不起作用了 方法1-使用快捷键"Insert&qu ...

  10. JavaScript数据结构与算法(七) 双向链表的实现

    TypeScript方式实现源码 // 双向链表和普通链表的区别在于, 在链表中, // 一个节点只有链向下一个节点的链接,而在双向链表中,链接是双向的:一个链向下一个元素, // 另一个链向前一个元 ...