Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant Loading Message at Top of Board #3334

Closed
Mythotical opened this issue Nov 8, 2020 · 19 comments
Closed

Constant Loading Message at Top of Board #3334

Mythotical opened this issue Nov 8, 2020 · 19 comments

Comments

@Mythotical
Copy link

Mythotical commented Nov 8, 2020

Issue

I used Docker and Docker-Compose to get my Wekan installation working. Right now I'm having an issue that sometimes on page load I get a message at the top "Loading, please wait. Refreshing the page will cause data loss. If loading does not work, please check that server has not stopped." which I have checked and the server has not stopped. I inspect elements then click console and have a lot of WebSocket errors.

Problem description:
Here is the current error and it repeats indefinitely until I refresh the page then it either loads or starts over.
WebSocket connection to 'wss:https://roadmap.goblin-technologies.com/sockjs/280/l4eo0tji/websocket' failed: Error during WebSocket handshake: Unexpected response code: 404 k.websocket @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true k._try_next_protocol @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true k._didClose @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true o._ir.onfinish @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true i.emit @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true i.onfinish @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true i.emit @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true s.xhr.onreadystatechange @ .../5f9479366b85e62aa966ae99a10b5af47f7741b1.js?meteor_js_resource=true

I run mine installation through a port and use Rewrite rules to leave out the port number when accessing it. Could that be causing the issue? Also, I run OpenLiteSpeed but I had this issue on Apache as well as OpenLiteSpeed.

Log:
Docker-Compose-Logs.zip

Server Setup Information:

  • Note: Please anonymize info, and do not add to this public issue any of your Wekan board URLs, passwords, API tokens etc, do you understand?: Yes
  • Did you test in newest Wekan?: Yes
  • For new Wekan install, did you configure root-url correctly so Wekan cards open correctly https://github.com/wekan/wekan/wiki/Settings ? Yes
  • Wekan version: 4.49
  • If this is about old version of Wekan, what upgrade problem you have?: No upgrade issues
  • Operating System: CentOS 7.6
  • Deployment Method(snap/docker/sandstorm/mongodb bundle/source): Docker
  • Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): OpenLiteSpeed
  • Node Version: Unknown
  • MongoDB Version: 4.2
  • Wekan only works on newest desktop Firefox/Chromium/Chrome/Edge/Chromium Edge and mobile Chrome. What webbrowser version are you using? 86.0.4240.183 64-bit
@xet7
Copy link
Member

xet7 commented Nov 8, 2020

@ Mythotical

Do you have websockets enabled in webserver that is at front of Wekan, like Caddy/Nginx/Apache ? See config examples at right menu of https://github.com/wekan/wekan/wiki

@Mythotical
Copy link
Author

@xet7

I don't use any of those. I use OpenLiteSpeed. I think I have everything configured but I'm not sure about websockets.

@xet7
Copy link
Member

xet7 commented Nov 8, 2020

@Mythotical
Copy link
Author

Probably not. I'll follow the guide and hopefully that fixes it.

@Mythotical
Copy link
Author

Mythotical commented Nov 9, 2020

@xet7

I checked into it and I'm using OpenLiteSpeed with DirectAdmin so going to the LiteSpeed panel does me no good because of how DirectAdmin handles things with configuration files and vhost files I am unable to add or do anything in the panel. So what I would need is instructions for setting up a websocket proxy using SSH.

However I did follow this guide: https://forum.directadmin.com/threads/how-to-reverse-proxy-openlitespeed-on-directadmin-working-with-net-core-blazor.60218/

But I'm sure there is more I didn't do as I'm sure I still need to install a WebSocket proxy. If you can't tell I'm new to this whole WebSocket proxy stuff.

@xet7
Copy link
Member

xet7 commented Nov 10, 2020

@Mythotical

In that guide that websocket upgrade part looks like what is missing. It should work, if at your Wekan docker-compose.yml is port number like this:

export ROOT_URL=https://boards.example.com
export PORT=5000

@xet7
Copy link
Member

xet7 commented Nov 10, 2020

Usually those setting should go where your website config file is. I don't know at what directories config files are stored at OpenLiteSpeed.

@Mythotical
Copy link
Author

@xet7
Nope, my docker-compose.yml isn't set that way but I will set it now and try again.

Yeah, those settings do go where my website config file is, I can actually alter that file in DirectAdmin no problem. I'll give a proper ROOT_URL and PORT a try.

@Mythotical
Copy link
Author

@xet7
My docker-compose.yml has this:
ports: # Docker outsideport:insideport. Do not add anything extra here. # For example, if you want to have wekan on port 3001, # use 3001:8080 . Do not add any extra address etc here, that way it does not work. # remove port mapping if you use nginx reverse proxy, port 8080 is already exposed to wekan-tier network - 4001:8080 environment: - MONGO_URL=mongodb:https://wekandb:27017/wekan - ROOT_URL=https://roadmap.goblin-technologies.com # <=== using only at same laptop/desktop where Wekan is installed

Can I instead remove ports: and add - PORT=4001 below ROOT_URL?

@xet7
Copy link
Member

xet7 commented Nov 10, 2020

Well, it depends:

https://github.com/wekan/wekan/wiki/Settings

Websocket addresses should be to 127.0.0.1:4001

a) Only locally on laptop

Wekan at https://localhost:4001

    - ROOT_URL=https://localhost:4001
    ports:
      - 4001:8080

a) At Internet, without SSL/TLS

Wekan at https://roadmap.goblin-technologies.com

    - ROOT_URL=https://roadmap.goblin-technologies.com
    ports:
      - 4001:8080

c) At Internet, with SSL/TLS

Wekan at https://roadmap.goblin-technologies.com

OpenLiteSpeed webserver has SSL/TLC certificate.

    - ROOT_URL=https://roadmap.goblin-technologies.com
    ports:
      - 4001:8080

@Mythotical
Copy link
Author

@xet7
Ok, that means I don't have a WebSocket Proxy installed. I'll have to look into this further or wait for someone with DirectAdmin to reply to my thread on their forum.

@Mythotical
Copy link
Author

@xet7
After some careful consideration, I am thinking of switching to LiteSpeed to take advantage of .htaccess which I think would be best. If that does not work out for install a WebSocket Proxy then I'm going to switch to Nginx which I know I can install Nginx which would allow me to do what I need for a WebSocket Proxy.

@xet7
Copy link
Member

xet7 commented Nov 11, 2020

@Mythotical

Most trouble free for me has been Caddy that is included in Wekan Snap.

@Mythotical
Copy link
Author

@xet7

At first, I was using Wekan snap but kept having the same issue and I had no idea Caddy was included. I already have boards set up, cards, templates, all that. If I can export from Wekan then import to Wekan I'll gladly do that and try Wekan Snap again and utilize Caddy. Honestly, I love Wekan so much I want to get this to work 100%. There is no other kanban out there that is this close to being like Trello.

@xet7
Copy link
Member

xet7 commented Nov 11, 2020

Backup/Restore info is at https://github.com/wekan/wekan/wiki/Backup

Yes, you can use mongodump and mongorestore to move all data, and add same settings with Snap commands.

@Mythotical
Copy link
Author

Awesome thanks.

@Mythotical
Copy link
Author

Mythotical commented Nov 14, 2020

@xet7
I have decided to move from OpenLiteSpeed to Nginx with mod_security because Wekan is not the only software I'm having issues with on OLS and I figure it's best to move to Nginx now before I relaunch my site with wekan accessible by the public.

Thanks for all your help.

@Mythotical
Copy link
Author

Mythotical commented Nov 17, 2020

@xet7
Update: I have returned to Apache utilizing mod_proxy and a few other modules to help keep page load times down and use a good cache system which I haven't decided on yet.

So I added the following to my httpd.conf for my site:

Timeout 2400
ProxyTimeout 2400
ProxyBadHeader Ignore
ProxyPassMatch "^/(sockjs/.*/websocket)$" "ws:https://localhost:4001/$1"
ProxyPass "/" "https://localhost:4001/"
ProxyPassReverse "/" "https://localhost:4001/"

After reloading httpd I'm present with the following error:

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: Error reading from remote server

Not sure what I'm doing wrong but I'm still investigating, if I manage to figure it out, I'll report back the solution that fixes the above and the loading message.

Also: https://github.com/wekan/wekan/wiki/Apache
That is for only systems running on Ubuntu. On CentOS 7 and 8 systems, the modules at the top of that page that need to be enabled are automatically enabled on CentOS 7 and 8.

@Mythotical
Copy link
Author

Mythotical commented Nov 17, 2020

Solution which has fixed my server loading and my loading message at the top of the board, this is for Apache on CentOS 7/8
In your httpd.conf file for your domain or subdomain you're running wekan (NOTE: If you want to run Wekan on a subdomain you MUST add it as a new domain, don't worry it will accept it):

ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Allow from all

ProxyRequests Off
ProxyPassMatch "^/(sockjs/.*/websocket)$" "ws:https://roadmap.goblin-technologies.com:4001/$1"
ProxyPass / https://roadmap.goblin-technologies.com:4001/ retry=1 acquire=3000 timeout=600
ProxyPassReverse / https://roadmap.goblin-technologies.com:4001/

All is fixed and working now.

@xet7 xet7 closed this as completed Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants