Git Product home page Git Product logo

Comments (15)

ggogel avatar ggogel commented on July 29, 2024

Hi,

how are you testing the functionality of the notification server? I only tested the ping endpoint and assumed it was working. The client does not show whether it is using the notification server, so it is hard to retrace if it is functional.

from seafile-containerized.

FluffyDiscord avatar FluffyDiscord commented on July 29, 2024

I am using https://mitmproxy.org/ to proxy calls from windows desktop client to the seafile instance.

Steps:

  1. download mitmproxy
  2. run mitmproxy --mode upstream:machineip:8068 where machineip is my local network seafile instance (homeserver)
  3. change seafile client server address to http://localhost:8080/ or whichever port mitmproxy binds to (shown bottom right in the terminal), the desktop client must run on the same machine as mitmproxy
  4. see that /ping does return 200, but /notification returns error 400
  5. see that desktop client is retrying the connection, unsuccessfully every time

image

image

image

image

from seafile-containerized.

ggogel avatar ggogel commented on July 29, 2024

Ok, but you are just sending a GET request without any parameters. The server might expect another type of request, like POST and some parameters.

from seafile-containerized.

FluffyDiscord avatar FluffyDiscord commented on July 29, 2024

I am not sending any request, the request is comming from the desktop client, through the mitmproxy, what you see it what the official app sends, as I have stated. The desktop client is this:
Screenshot_20230813_163026_Yuzu Browser

from seafile-containerized.

ggogel avatar ggogel commented on July 29, 2024

I see...

I just checked on my setup and the client logs:

[07/26/23 20:42:20] Notification server is enabled on the remote server **URL**

The path is:
C:\Users\$USERNAME\ccnet\logs\seafile.log

Can you see the same?

According to the documentation, this means that the notification server works.

from seafile-containerized.

FluffyDiscord avatar FluffyDiscord commented on July 29, 2024

Yes, I can see that. But it logs at the time it sends the ping command, not the actual /notification

Websockets open once, then they no longer reconnect if everything works correctly. The ever repeating error 400 suggests that the connection cannot seem to be established.

It might support, but be blocked by caddy

from seafile-containerized.

ggogel avatar ggogel commented on July 29, 2024

I also tried to debug it with mitmproxy but I can see just a request to the ping endpoint. No other requests to any notification-related endpoint.

from seafile-containerized.

FluffyDiscord avatar FluffyDiscord commented on July 29, 2024

You mean, you do not see the /notification endpoint requests that I posted?

from seafile-containerized.

ggogel avatar ggogel commented on July 29, 2024

Exactly, I start the client and see one /notification/ping request and that's it. Not a single /notification request.

Regarding WebSocket, Caddy apparently supports upgrading connections to WebSocket by default without any additional config. So I doubt that the error lies there.

from seafile-containerized.

FluffyDiscord avatar FluffyDiscord commented on July 29, 2024

Would it be possible to post your whole seafile.conf ?

from seafile-containerized.

ggogel avatar ggogel commented on July 29, 2024

Here you go:

[fileserver]
port = 8082
max_upload_size=100000
max_download_dir_size=100000
use_go_fileserver = false

[database]
type = mysql
host = db
port = 3306
user = seafile
password = ...
db_name = seafile_db
connection_charset = utf8

[notification]
enabled = true
host = 0.0.0.0
port = 8083
log_level = debug
jwt_private_key = ...

from seafile-containerized.

FluffyDiscord avatar FluffyDiscord commented on July 29, 2024

except for the max_upload_size and max_download_dir_size, the only difference is that I have use_go_fileserver = true. When I changed it to false nothing changed. I am still getting the failed request to /notification

I dont have any blocked ports in my local network. Well, this is weird.

Do you have current seafile client version - 9.0.3 ?

from seafile-containerized.

ggogel avatar ggogel commented on July 29, 2024

In your screenshot, the error 400 seems to occur exactly every 60 seconds. Maybe Nginx is terminating the WebSocket session every 60 seconds?

Yes, I'm also running 9.0.3

from seafile-containerized.

FluffyDiscord avatar FluffyDiscord commented on July 29, 2024

I connected directly to the seafile caddy, skipping nginx and I have the same issue. The 60s interval seems to be just a reconnect behavior

from seafile-containerized.

stale avatar stale commented on July 29, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from seafile-containerized.

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.