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

Files not found: Error 502 Bad gateway #3628

Closed
edgarvenom opened this issue Mar 3, 2021 · 25 comments
Closed

Files not found: Error 502 Bad gateway #3628

edgarvenom opened this issue Mar 3, 2021 · 25 comments

Comments

@edgarvenom
Copy link

Issue

Email settings:

Add these issues to elsewhere:

Other Wekan issues can be added here.

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?:

  • Did you test in newest Wekan?: No

  • For new Wekan install, did you configure root-url correctly so Wekan cards open correctly https://github.com/wekan/wekan/wiki/Settings ?

  • Wekan version:
    snap.wekan.wekan.service - Service for snap application wekan.wekan
    Loaded: loaded (/etc/systemd/system/snap.wekan.wekan.service; enabled; vendor preset: disabled)
    Active: active (running) since Wed 2021-03-03 14:19:02 CST; 1min 23s ago
    Main PID: 6739 (wekan-control)
    CGroup: /system.slice/snap.wekan.wekan.service
    ├─6739 /bin/bash /snap/wekan/1394/bin/wekan-control
    └─7555 /snap/wekan/1394/bin/node main.js

Mar 03 14:19:04 prdbambu01.cloud wekan.wekan[6739]: SAML_PRIVATE_KEYFILE= (default value)
Mar 03 14:19:04 prdbambu01.cloud wekan.wekan[6739]: SAML_PUBLIC_CERTFILE= (default value)
Mar 03 14:19:04 prdbambu01.cloud wekan.wekan[6739]: SAML_IDENTIFIER_FORMAT= (default value)
Mar 03 14:19:04 prdbambu01.cloud wekan.wekan[6739]: SAML_LOCAL_PROFILE_MATCH_ATTRIBUTE= (default value)
Mar 03 14:19:04 prdbambu01.cloud wekan.wekan[6739]: SAML_ATTRIBUTES= (default value)
Mar 03 14:19:04 prdbambu01.cloud wekan.wekan[6739]: ORACLE_OIM_ENABLED=false (default value)
Mar 03 14:19:04 prdbambu01.cloud wekan.wekan[6739]: MONGO_URL=mongodb://127.0.0.1:27019/wekan
Mar 03 14:19:08 prdbambu01.cloud wekan.wekan[6739]: Presence started serverId=uJmuzibNkFfXznMHk
Mar 03 14:19:11 prdbambu01.cloud wekan.wekan[6739]: {"line":"87","file":"percolate_synced-cron.js","message":"SyncedCron: Scheduled "notification_cleanup" next run @Wed Mar 03 2021 14:19:11 GMT-0600 (Central Standard Time)","time":{"$date":161480...67},"level":"info"}
Mar 03 14:19:28 prdbambu01.cloud wekan.wekan[6739]: (node:7555) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Hint: Some lines were ellipsized, use -l to show in full.

  • If this is about old version of Wekan, what upgrade problem you have?:

  • Operating System: Centos 7

  • Deployment Method(snap/docker/sandstorm/mongodb bundle/source): Snap

  • Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): Nginx

  • MongoDB Version: MongoDB shell version v4.2.12

  • Wekan only works on newest desktop Firefox/Chromium/Chrome/Edge/Chromium Edge and mobile Chrome. What webbrowser version are you using? : Chrome , firefox

Problem description:

I upload files in pdf or xml to my created tasks but after a few days when I want to download the file it shows me a 502 on the server, this happens with only some files that we upload

@xet7
Copy link
Member

xet7 commented Mar 3, 2021

Maybe related to #2759 or #2635 or #3583 or #142 or #3273 or #3580

@edgarvenom
Copy link
Author

This time it has nothing to do with the aforementioned.

Sometimes the socket is disconnected and the board can no longer be seen

in other occasions mongodb stops responding

To solve all the cases that he mentions, wekan had to be reinstalled, and I can't continue for another year reinstalling every time something stops working correctly.

Nor is it a solution that changes or moves to ubuntu server since the server where it lives is from a client and they have centos.

I have not been able to follow up on the previous cases due to time zone.

Now I understand a little more about how wekan works with snap and this time I will give it a timely follow-up

@xet7
Copy link
Member

xet7 commented Mar 4, 2021

Sometimes the socket is disconnected and the board can no longer be seen

in other occasions mongodb stops responding

Ok, so probably related to In Progress speedups #3345

Nor is it a solution that changes or moves to ubuntu server since the server where it lives is from a client and they have centos.

Many use Wekan on CentOS.

@edgarvenom
Copy link
Author

edgarvenom commented Mar 4, 2021

Good day

I reviewed in detail what they comment but it did not help me to solve my problem.

I have loaded my previous backups and even so the document has been lost, in the path that wekan is looking for, it cannot download it and it is with some files

I connect correctly to the mongo database locally on the centos server but I don't know what to do

I have renewed wekan following this guide but I have not been successful
https://computingforgeeks.com/install-wekan-kanban-on-centos-7-nginx-letsencrypt/#ex1
wekan-error

Apparently the error is that the socket lost the path of the document link

Attached document screen when I try to download it
It is currently installed on a centos 7 with nginx

@xet7
Copy link
Member

xet7 commented Mar 4, 2021

@edgarvenom

Did you configure websockets?

@xet7
Copy link
Member

xet7 commented Mar 4, 2021

@xet7
Copy link
Member

xet7 commented Mar 4, 2021

If Nginx does not work, try Caddy
https://github.com/wekan/wekan-snap/wiki/CentOS-7

@xet7
Copy link
Member

xet7 commented Mar 4, 2021

You seem to use CloudFlare. Caddy CloudFlare config is here:
https://github.com/wekan/wekan/wiki/Caddy-Webserver-Config

@xet7
Copy link
Member

xet7 commented Mar 4, 2021

Backup restore info is here:
https://github.com/wekan/wekan/wiki/Backup

@xet7
Copy link
Member

xet7 commented Mar 4, 2021

When you used Nginx, did you allow bigger attachment size like info here?
https://github.com/wekan/wekan/wiki/Nginx-Webserver-Config

@edgarvenom
Copy link
Author

on the server I have centos 7 and mongo is installed there
I have nosql on my computer but I don't know where to get the credentials to connect remotely, if I run mongo or mongo --port 27019 in the shell I access without problems
and if I have configured my * .cof with the socket as the documentation says and configured my nginx conf file as recommended

I'll try the caddy links you sent me
nxing confi
I let you know the result

@edgarvenom
Copy link
Author

I looked for my document by its name and I found it in a collection

grep -r -l "Ajustes" .
./collection-12-9150179879948486729.wt
./index-14-9150179879948486729.wt
./collection-60--1259195183350448156.wt
./collection-36--1259195183350448156.wt
./collection-48--1259195183350448156.wt
./collection-56--1259195183350448156.wt

When I run mongo and I want my databases ready, the following appears (Image mongo.jpg)
mongo

I know that my wekan is well configured as indicated in the manuals and the links that I indicated

I know my file is there in the default / var / snap / wekan / common path

How do I retrieve the links so that they are displayed correctly on my dashboard?

@xet7
Copy link
Member

xet7 commented Mar 5, 2021

You did show above empty database that is at port 27017 when you installed MongoDB 4.2.x. That empty raw database files could be at /var/lib/mongodb/

But real Wekan database is included in Wekan Snap at port 27019, with raw database files at /var/snap/wekan/common , you can connect to it this way:

mongo --port 27019

show dbs

use wekan

show collections

db.users.find()

Or by connecting to it with nosqlbooster GUI

But I don't know why you should access database directly. With Wekan you can at All Boards page move mouse to top of board icon and click star to make it your bookmark link at top.

@xet7
Copy link
Member

xet7 commented Mar 5, 2021

Are you trying to use API ? Or what are you trying to do?

@edgarvenom
Copy link
Author

I was trying to connect on my server locally to mongo to explore the database and know if it was connected correctly.

I still can't see my documents that were uploaded to the board

@xet7
Copy link
Member

xet7 commented Mar 6, 2021

Attachments can be seen with nosqlbooster

@edgarvenom
Copy link
Author

Good day
I have already been reviewing again everything that has been commented in this incident but the problem persists

Random files cannot be viewed within wekan, the file exists in the database but the web application cannot find it, it seems that the path of the document changed or was modified

@xet7
Copy link
Member

xet7 commented Mar 9, 2021

@edgarvenom

Is the same errors also with only Wekan http, without Nginx/Caddy in front of Wekan?

I'm just thinking, could it be some misconfiguration in Nginx.

Are there any other errors in browser inspect console? Can you copy all that content to comment of this issue, anonymized by removing your server domain and IP addresses?

@xet7
Copy link
Member

xet7 commented Mar 9, 2021

Do you have in same Nginx config also other settings for some other website, like some PHP website like Drupal? Those settings could prevent Wekan from accessing files. That Error 502 Bad gateway feels like it's Nginx error.

@xet7
Copy link
Member

xet7 commented Mar 9, 2021

Are there any special charaters in attachment filenames, like chinese, russian, scandinavian öÖäÄåÅ, or other non-Latin characters? Because currently Wekan has bug that uploading those files works, but downloading crashes Wekan.

@xet7
Copy link
Member

xet7 commented Mar 9, 2021

For fixing that filename bug, there is #3273 but I have not tested it well enough yet, it's not yet merged to Wekan. Previously there was fix to this issue, but that fix stopped working after I upgraded to newer version of Meteor www.meteor.com full stack Javascript web framework. Wekan is coded with Meteor.

@xet7
Copy link
Member

xet7 commented Mar 9, 2021

I don't know is it possible that you would send your MongoDB database Backup as .zip or .7z archive to me by you creating free Protonmail account https://protonmail.com (Protonmail automatically end-to-end encrypts email between protonmail email addresses) to my paid Protonmail address [email protected] so that I would try to find that bug and fix it. Those that have previously sent their database to me have made it easy for me to find that bug and release fix fast, because problem in general is reproducing bug locally, so I can make code changes and see does code change fix that bug. After fixing bug I delete received database.

@xet7
Copy link
Member

xet7 commented Mar 9, 2021

For non-Protonmail email addresses, it's possible to use PGP to send encrypted email to me.

@edgarvenom
Copy link
Author

Sure, I will send you an email with the request

@edgarvenom
Copy link
Author

I send you my database from the email [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants