Giter Club home page Giter Club logo

Comments (7)

jmattheis avatar jmattheis commented on June 4, 2024

Does the webapp work? Add your gotify/server log. Add your nginx config. Add the gotify/android log.

from server.

bcurran3 avatar bcurran3 commented on June 4, 2024

Webapp works fine.
Android app works fine, except the notification.
Android app notification shows "Connected" when on LAN. Error shows on WAN only.
Nginx config is default from the container gotify/server:latest
Server is v2.4.0. App is v2.7.1

This is the server log from after rebooting my phone and connecting via WAN:

2024-04-28T01:33:12-07:00 | 200 |     177.749µs | 0.0.0.0 | GET      "/"
WebSocket: ReadError read tcp 172.17.0.26:80->172.17.0.1:44658: i/o timeout
2024-04-28T01:34:12-07:00 | 200 |     128.024µs | 0.0.0.0 | GET      "/"
2024-04-28T01:35:12-07:00 | 200 |     554.686µs | 0.0.0.0 | GET      "/"
2024-04-28T01:36:12-07:00 | 200 |     163.781µs | 0.0.0.0 | GET      "/"
2024-04-28T01:36:14-07:00 | 200 |     556.768µs | 0.0.0.0 | GET      "/current/user"
2024-04-28T01:36:15-07:00 | 200 |     549.158µs | 0.0.0.0 | GET      "/application"
2024-04-28T01:36:15-07:00 | 200 |     565.204µs | 0.0.0.0 | GET      "/message?limit=1&since=0"
2024-04-28T01:36:15-07:00 | 200 |     470.738µs | 0.0.0.0 | GET      "/application"
2024-04-28T01:36:15-07:00 | 400 |     395.414µs | 0.0.0.0 | GET      "/stream?token=[masked]"
Error #01: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
2024-04-28T01:36:15-07:00 | 200 |      13.759µs | 0.0.0.0 | GET      "/version"
2024-04-28T01:36:15-07:00 | 400 |     121.932µs | 0.0.0.0 | GET      "/stream?token=[masked]"
Error #01: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
2024-04-28T01:36:15-07:00 | 200 |     402.336µs | 0.0.0.0 | GET      "/message?limit=1&since=0"
2024-04-28T01:36:16-07:00 | 200 |     970.597µs | 0.0.0.0 | GET      "/application"
2024-04-28T01:36:16-07:00 | 200 |    3.965202ms | 0.0.0.0 | GET      "/message?limit=100&since=0"
2024-04-28T01:36:17-07:00 | 200 |      94.579µs | 0.0.0.0 | GET      "/static/defaultapp.png"

Need to set GOTIFY_SERVER_RESPONSEHEADERS={X-Custom-Header: "custom value", x-other: value} ??????

I'm having some trouble with getting the app logs. First they were April 8 through 9 only. I deleted and rebooted. Log started filling with current reconnection info, but when I try to copy the app freezes with Android popping up a close/wait choice. I managed to get a screenshot:

Details

Screenshot_20240428-015100

from server.

jmattheis avatar jmattheis commented on June 4, 2024

Nginx config is default from the container gotify/server:latest

There is no nginx config in the gotify container. The logs indicate a misconfigured reverse proxy. If you are using nginx, you need to configured the settings listed in https://gotify.net/docs/nginx

from server.

bcurran3 avatar bcurran3 commented on June 4, 2024

I'm not (knowingly) using nginx. As mentioned I've got a Traefik container running the reverse proxy.

Do I need to modify my Traefik config pointing to the Gotify container or create a nginx config in the Gotify container?

from server.

jmattheis avatar jmattheis commented on June 4, 2024

Sorry misread about nginx. Show your full treafik config. Do you have anything else between the reverse proxy and your phone? Cloudflare tunnel or similar?

from server.

bcurran3 avatar bcurran3 commented on June 4, 2024

No Cloudflare tunnel, just Traefik. I do use Cloudflare DNS. I just checked it and gotify is going through a proxy wildcard record to the domain. I'm going to create a non-proxied CNAME for it and see if it makes a difference. Doing now, will check and report back later.

I'm going to guess the labels for Traefik in the container are of more interest:

    labels:
      traefik.enable: "{{ gotify_available_externally | string }}"
      traefik.http.routers.gotify.rule: "Host(`{{ gotify_hostname }}.{{ domain_name }}`)"
      traefik.http.routers.gotify.tls.certresolver: "letsencrypt"
      traefik.http.routers.gotify.tls.domains[0].main: "{{ domain_name }}"
      traefik.http.routers.gotify.tls.domains[0].sans: "*.{{ domain_name }}"
      traefik.http.routers.frontend.middlewares: "{{ gotify_hostname }}"
      traefik.http.routers.gotify.middlewares: "{{ gotify_hostname }}@docker"
      traefik.http.middlewares.gotify.ipwhitelist.sourcerange: "{{ gotify_traefik_whitelist }}"
      traefik.http.services.gotify.loadbalancer.server.port: "80"

from server.

bcurran3 avatar bcurran3 commented on June 4, 2024

Happy to report that turning off Cloudflare proxying solved the problem!

Any additions to the documentation on this and how to make it work via CF proxy would be welcome.

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.