在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. Sequence to Sequence Learning with Neural Networks论文阅读

    论文下载 作者(三位Google大佬)一开始提出DNN的缺点,DNN不能用于将序列映射到序列。此论文以机器翻译 […]...

  2. 如何删除/mnt/cdrom?|如何删除只读文件系统(Read-only files ystem)? failed !bh ? 挂载光盘?挂载usb?

    root权限下 : 首先用umount /mnt/文件夹 卸载文件系统,必要时可以用umount -f(可能丢 […]...

  3. ios unrecognized selector sent to instance出现的原因和解决方案 – Hai_阔天空

    ios unrecognized selector sent to instance出现的原因和解决方案 概述 […]...

  4. 查看Page结构

    SQL Server存储数据的基本单元是Page,每一个Page的大小是8KB,数据文件是由Page构成的。在 […]...

  5. How to pass a input parameter in Script task of SSIS – WebQ

    How to pass a input parameter in Script task of SSIS To […]...

  6. Blocking request failed HttpServerExchange{ GET /ssssssssss/kkk}: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

    错误: 控制台报错: Blocking request failed HttpServerExchange{ […]...

  7. MYSQL登录错误:mysqladmin: connect to server at \’localhost\’ failed

    MYSQL登录错误:mysqladmin: connect to server at \’loca […]...

  8. Oracle数据库冷备份与恢复(救命稻草) Oracle案例04——ORA-39700: database must be opened with UPGRADE option

        说明,只要是同样系统,同样数据库版本,是可以做冷备恢复。冷备份数据必须是数据库不在open状态下。以o […]...

随机推荐

  1. Mysql基础03-函数

    函数 字符串函数 函数 用法 CONCAT(S1,S2,……,Sn) 连接S1,S2, […]...

  2. 带着问题学 python

    爬虫框架还是 python 专业啊,一直在用 java, 现在决定尝尝鲜,先学 python,再学数据采集,爬 […]...

  3. ModelArts微认证零售客户分群知识点总结

    \ 作者:华为云MVP郑永祥...

  4. 关于Intent

    TCP/IP 协议是Internet国际网络的基础,主要包括TCP,IP,UDP和ICMP等协议 要连上int […]...

  5. Docker容器启动失败 Failed to start Docker Application Container Engine的解决办法

    当编辑完daemon.json时,准备systemctl start docker.service启动dock […]...

  6. 据说Java并发很牛逼, 我试了一下, 结果变成了傻逼

    一个用Java写的GUI程序,作用是分析日志, 它会将一定数量的格式相同的文本日志文件读入内存分析处理,然后将 […]...

  7. Selenium ActionChains、TouchAction方法

    ActionChains和TouchAction可以用来模拟点击、双击、滑动等事件。ActionChains用 […]...

  8. Opencv中计算梯度、梯度幅值以及梯度方向的相关函数(转)

       1)计算梯度幅值函数magnitude 该函数根据输入的微分处理后的x和y来计算梯度幅值,x和y可以通过 […]...

展开目录

目录导航