nextcloud / whiteboard

Create & collaborate on an infinite canvas!
https://apps.nextcloud.com/apps/whiteboard
GNU Affero General Public License v3.0
58 stars 7 forks source link

Failed to verify the connection: timeout #173

Closed whahn1983 closed 4 weeks ago

whahn1983 commented 1 month ago

In the Whiteboard administration settings, after setting up the URL and secret, receiving error "Failed to verify the connection: timeout".

Confirmed docker container for whiteboard is set up correctly with the below log:

> whiteboard@1.0.2 server:start
> node websocket_server/main.js

Using default in-memory adapter
Listening on port: 3002
Server started successfully on port 3002

From within the Nextcloud container, I can successfully get a response from the whiteboard server using curl and receive a response from the whiteboard server:

curl whiteboard:3002
Excalidraw collaboration server is up :)

I am using the same exact address from the curl command in the URL settings for the whiteboard administration.

tinklelit commented 1 month ago

I deployed Nextcloud and Whiteboard (latest version on the 18th) using Docker and encountered the same issue: “Failed to verify the connection: timeout.” Nextcloud uses a domain name, while Whiteboard uses an IP + port (access shows: Excalidraw collaboration server is up :))

juliusknorr commented 1 month ago

Please make sure that the url you are entering is also accessible in the browser. You might need to configure your webserver as a reverse proxy as described in the readme.

tinklelit commented 1 month ago

I added HTTPS to Whiteboard and it connected just fine

whahn1983 commented 1 month ago

If I add https the error changed to a web socket error.

whahn1983 commented 1 month ago

Please make sure that the url you are entering is also accessible in the browser. You might need to configure your webserver as a reverse proxy as described in the readme.

Ah this may be the issue however, my web server is internet facing so that now exposes whiteboard needlessly to the internet instead of just a linked network between docker containers. It would be more secure to just bundle a web server into the whiteboard container so it can be simply linked to the Nextcloud container without exposing externally.

rafaelmr2 commented 1 month ago

I have the same problem. I create a URL with a valid https and I'm getting "Bad Gateway". If I use only docker internal "http://app:3002" I got "timeout".

juliusknorr commented 1 month ago

I think there is some misunderstanding in how the whiteboard backend server needs to be exposed. It is required to be reachable by both the Nextcloud server itself as well as the users browser, which means that you need to expose it to the public (or internally to any user accessing Nextcloud).

Ah this may be the issue however, my web server is internet facing so that now exposes whiteboard needlessly to the internet instead of just a linked network between docker containers. It would be more secure to just bundle a web server into the whiteboard container so it can be simply linked to the Nextcloud container without exposing externally.

Bundling a webserver doesn't change anything. The whiteboard container already exposes a webserver but you need to ensure it is properly reachable not just from the Nextcloud server as mentioned above. Therefore the most straight forward way is through an existing webserver or reverse proxy as documented in the readme.