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

heyongboke 2018-04-25 原文

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

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

 

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

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

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

#cd /opt/atlassian/confluence/logs
#tail -f -n 100 catalina.out
......................
24-Apr-2018 20:56:32.242 ҏט [http-nio-18090-exec-7] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 20:56:47.580 ҏט [http-nio-18090-exec-9] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 20:58:38.132 ҏט [http-nio-18090-exec-5] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 20:58:59.103 ҏט [http-nio-18090-exec-7] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 21:00:09.113 ҏט [http-nio-18090-exec-4] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 21:00:27.122 ҏט [http-nio-18090-exec-7] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 21:00:47.117 ҏט [http-nio-18090-exec-5] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 21:02:02.103 ҏט [http-nio-18090-exec-2] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 21:02:17.137 ҏט [http-nio-18090-exec-6] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 21:02:32.096 ҏט [http-nio-18090-exec-4] org.springframework.web.socket.server.support.DefaultHandshakeHandler.handleInvalidUpgradeHeader Handshake failed due to invalid Upgrade header: null
24-Apr-2018 21:02:48.099 ҏט [http-nio-18090-exec-6] 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  1;
        events {
                worker_connections  1024;
        }
        http {
              include       mime.types;
              default_type  application/octet-stream;
              sendfile        on;
              keepalive_timeout  65;
    listen 80;
    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  1;
        events {
                worker_connections  1024;
        }
        http {
              include       mime.types;
              default_type  application/octet-stream;
              sendfile        on;
              keepalive_timeout  65;
    listen 80;
    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中进行日志提交,成功,完美解决!

 

发表于 2018-04-25 10:58 hy何勇 阅读() 评论() 编辑 收藏

 

版权声明:本文为heyongboke原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/heyongboke/p/8940947.html

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

  1. 3Ds Max FTL:Virtual device creation failed.

    1.在安装完成并激活3DsMax2017中文版后,启动提示:渲染错误消息:FTL: Virtual devic […]...

  2. xsd to javabean

    1. cd jdk/bin 2. xjc -p com.skyecho.product.air.ibe.api […]...

  3. 关于 JavaScript 中 null 的一切

    原文地址:Everything about null in JavaScript原文作者:Dmitri Pavlutin译者:GopalJavaScript 有两种类型:原始类型(strings, booleans, numbers, sy...

  4. MySQL错误:2003-Can\’t connect to MySQL server on \’localhost\'(10061 \”unknown error\”)

    数据库错误代码16001解决方案   今天数据库出了一点错误之后决定重装一下,结果卡在了一个问题上,连装了5遍 […]...

  5. Raspberry Pi

    Raspberry Pi – Huawei HiLink E3256 3G modem to et […]...

  6. [Qt] this application failed to start because it could not find or load the Qt platform plugin

    {相关信息}该问题出现在在没有安装Qt的计算机上运行Qt程序。这里假设我们把缺少的库文件已经添加到了exe相同 […]...

  7. eclipse启动时 failed to create the java virtual machine 解决办法

    有的时候安装了eclipse,启动会遇到这样的问题“failed to create the java vir […]...

  8. java.lang.IllegalStateException: Failed to load ApplicationContext

    摘要 在配置spring aop的时候总是出现下面的错误,找了很多种办法,这篇文字给了自己点灵感,通过这种方式 […]...

随机推荐

  1. brew mac osx 上软件包管理工具

    brew mac osx 上软件包管理工具 2015-10-07 20:48  馒头加鸡腿  阅读(711)  […]...

  2. linux升级nginx版本

    一、环境系统:CentOS Linux release 7.9.2009 (Core)old version: nginx/1.20.1new version:nginx/1.21.6升级原因:安全扫描扫出1.20.1版本漏洞二、...

  3. SecureCRT使用教程

    Secure CRT是一款支持 SSH2、SSH1、Telnet、Telnet/SSH、Relogin、Ser […]...

  4. OOP_由C到C++

    由C到C++ OOP第一课 C语言的局限 类型检查机制相对较弱,使得程序中的一些错误不能在编译时由编译器检查出 […]...

  5. flex兼容

    flex { display: flex; display: box; display: -webkit-bo […]...

  6. 用Windows远程桌面连接树莓派的方法

    转载自:http://shumeipai.nxez.com/2013/10/06/windows-remote […]...

  7. RabbitMQ面试题集锦(精选)(另附思维导图)

    1.使用RabbitMQ有什么好处? 1.解耦,系统A在代码中直接调用系统B和系统C的代码,如果将来D系统接入 […]...

  8. python爬虫基础之一(爬淘宝)

     没想到python如此强大, 今天看一会视频学会了一段python爬虫 这就是我今天学到的内容爬去淘宝网关于 […]...

展开目录

目录导航