Code Monkey home page Code Monkey logo

Comments (9)

jmattheis avatar jmattheis commented on May 22, 2024 1

See also #82 in there proxy_read_timeout and proxy_send_timeout where mentioned too.

from server.

jmattheis avatar jmattheis commented on May 22, 2024

Thanks for your issue!

Do you use a reverse proxy like nginx? Which Browser do you use?
Could you have a look at your Gotify Android-App log (it is the last option in the drawer in the app).
The WebSocket status and reconnect attempts will be logged there with messages like: WebSocket: opened or WebSocket: failure.

from server.

chris-aeviator avatar chris-aeviator commented on May 22, 2024

@jmattheis thx for your quick feedback!

I'm using an nginx-reverse proxy on the server. Here's my Gotify Android log (as screenshot :) )

image

I'm running on Mozilla Firefox 62.0.3 (Arch) on the Desktop & can replicate the behaviour by letting the Gotify UI rest for some minutes in an not active tab. A project running with the same nginx config, that's using websockets, will display notifications for an (inactive) tab in my browser.

from server.

jmattheis avatar jmattheis commented on May 22, 2024

@chris-aeviator Could you show your nginx config? I've left a firefox tab with Gotify open for around 2 hours (on Windows) and it still works as expected.

The multiple "WebSocket opened"-messages in the log are probably a bug, could you try to force stop the Gotify app? Have you disabled the battery optimization for the Gotify android app?

from server.

jmattheis avatar jmattheis commented on May 22, 2024

I'm closing this for now because I can't reproduce the problem.

from server.

dugite-code avatar dugite-code commented on May 22, 2024

I've encountered the same error and believe I have found myself solution. It looks like it might have something to do with the keep proxy_read_timeout and proxy_send_timeout. I've changed it to a whole day but I plan to crank it down to test where it actually needs to be.

My nginx config:

upstream gotify {
  keepalive 60;
  server 127.0.0.1:9980;
}


  location = /gotify {
        return 301 /gotify/;
  }

server {
  listen 443 ssl http2;

[...]

  location ^~ /gotify/ {
        rewrite ^/gotify/(.*) /$1  break;
        proxy_redirect ~^/(.*)$ /gotify/$1;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
        proxy_buffering off;

        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;
        proxy_pass http://gotify$uri$is_args$args;
  }

  location ^~ /gotify/stream {
        rewrite ^/gotify/(.*) /$1  break;
        access_log /var/log/nginx/access.log;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
        proxy_buffering off;

        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;

        proxy_pass http://gotify$uri$is_args$args;
  }
}

from server.

theAkito avatar theAkito commented on May 22, 2024

See also #82 in there proxy_read_timeout and proxy_send_timeout where mentioned too.

I am not sure if my issue is related to this, but here we go. When I connect to the Gotify Web-UI within Firefox on my computer, I constantly get an error in the bottom right corner saying WebSocket connection closed, trying again in 30 seconds. The thing is:

  1. I don't use a reverse proxy, I connect directly to the server.
  2. Everything is working fine, I don't have any issues with the service itself. The only thing that is bugging me is this (unnecessary?) message appearing every 30 seconds. I wonder if there is an actual problem behind the scenes. At the very least, this message constantly is appearing, which is a problem.

from server.

eternal-flame-AD avatar eternal-flame-AD commented on May 22, 2024

@Akito13 Have you upgraded your server to v2.0.3? We have recently fixed an issue( #150 ) which might cause this problem.

from server.

theAkito avatar theAkito commented on May 22, 2024

@Akito13 Have you upgraded your server to v2.0.3? We have recently fixed an issue( #150 ) which might cause this problem.

Indeed, this solves it, thank you.

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.