在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. linux下xargs和管道的区别

    管道将前面的标准输出作为后面的标准输入,xargs则将标准输入作为命令的参数 一.简介 1.背景 之所以能用到这个命令,关键是由于很多命令不支持|管道来传递参数,而日常工作中有有这个必要,所以就有了x ...

  2. Python系列之 - 面向对象(1)

    python是一门面向对象的编程语言,python中的一切均是对象. 有对象就提到类,对象和类就像是儿子和老子的关系,是不可分的一对. 什么是类     类就是具有一些共同特性的事物的统称.好比人类, ...

  3. hdu 6205 card card card

    https://vjudge.net/contest/184514#problem/L题意:排成一行的一堆牌,每堆牌都有一定数量的牌,然后每堆牌对应有一个惩罚值.一开始所有的牌都是正面向下的,并且在游 ...

  4. SpringMVC(十三):SpringMVC 与fastjson集成

    1)fastjson jar包下载地址:https://sourceforge.net/projects/fastjson/下载完成后需要把jar包拷贝到WEB-INF/lib文件夹中.2)使用pom ...

  5. sort()与sorted()区分开

    列表的排序方法是sort 可用list.sort() sorted()是BIF不能用list.sorted() 引发的异常AttributeError: 'list' object has no at ...

  6. vscode设置出错, 无法自动补全

    问题: 之前设置的没问题, vscode重装后, 发现vscode里面的设置还在, 但敲代码却无法识别虚拟环境中的包了, 因此相关的内容也无法自动补全. 解决: 后来发现, 实际上设置没有出错, 但重 ...

  7. Java集合框架之四大接口、常用实现类

    Java集合框架 <Java集合框架的四大接口> Collection:存储无序的.不唯一的数据:其下有List和Set两大接口. List:存储有序的.不唯一的数据: Set:存储无序的 ...

  8. C# GetValue 正则获取开始结束代码

    /// <summary> /// 获得字符串中开始和结束字符串中间得值 /// </summary> /// <param name="str"&g ...

  9. Django REST framework+Vue 打造生鲜超市(十)

    十一.pycharm远程代码调试 第三方登录和支付,都需要有服务器才行(回调url),我们可以用pycharm去远程调试服务器代码 服务器环境搭建 以全新阿里云centos7系统为例: 11.1.阿里 ...

  10. kafka知识体系

    最近一直在整理kafka相关资料,以构建自己的知识体系. 主要分为五大方面: Kafka设计与原理分析 Kafka配置分析 Kafka运维手册 Kafka编程开发 kafka源码分析