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

File upload problem #6679

Closed
Ukas9 opened this issue Apr 13, 2017 · 15 comments · Fixed by #7395
Closed

File upload problem #6679

Ukas9 opened this issue Apr 13, 2017 · 15 comments · Fixed by #7395

Comments

@Ukas9
Copy link

Ukas9 commented Apr 13, 2017

Hey there,

I've got problem with file upload.

Quick info:

Rocket.Chat Version: 0.55.0-rc.3
Running Instances: 1
DB Replicaset OpLog: Disabled
Node Version: v4.5.0
Debian 9.0
Apache v.2.4.25

Apache SSL Reverse Proxy conf file:

<VirtualHost *:443>

ServerName domain.com

SSLEngine On
SSLCertificateFile /etc/ssl/certs/domain.com.crt
SSLCertificateKeyFile /etc/ssl/private/domain.com.key

<Location /var/www/Rocket.Chat/>
        Order allow,deny
        Allow from all
</Location>

RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /chat/(.*)           ws://localhost:3000/chat/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /chat/(.*)           http://localhost:3000/chat/$1 [P,L]

ProxyPass /chat/ http://localhost:3000/chat/
ProxyPassReverse /chat/ http://localhost:3000/chat/
</VirtualHost>

I tried to use GridFS and FileSystem but nothing works well. All time file stucks on 0%.
I also tried to edit jalik_ufs.js file, in order to change storesPath to chat/ufs according to https://github.com/jalik/jalik-ufs/tree/v0.6.4#configuration. After that the progress bar comes to 100%, but after I receive internal server error and nothing happens.

Rocket.Chat logs with storesPath = chat/ufs:

{ [Error: ENOENT: no such file or directory, open '/tmp/ufs/naTNBxCzPkxCM8T55']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/tmp/ufs/naTNBxCzPkxCM8T55' }
[Error: FileNotFound: no file with id naTNBxCzPkxCM8T55 found]
Exception while invoking method 'ufsComplete' Error: ENOENT: no such file or directory, open '/tmp/ufs/naTNBxCzPkxCM8T55'
  at Object.Future.wait (/var/www/Rocket.Chat/programs/server/node_modules/fibers/future.js:449:15)
  at [object Object].Meteor.methods.ufsComplete (/var/www/Rocket.Chat/programs/server/packages/jalik_ufs.js:818:24)
  at [object Object].methodsMap.(anonymous function) (/var/www/Rocket.Chat/programs/server/packages/rocketchat_lib.js:1069:26)
  at [object Object].methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30)
  at maybeAuditArgumentChecks (/var/www/Rocket.Chat/programs/server/packages/ddp-server.js:1823:12)
  at /var/www/Rocket.Chat/programs/server/packages/ddp-server.js:905:20
  at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
  at /var/www/Rocket.Chat/programs/server/packages/ddp-server.js:904:41
  at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
  at /var/www/Rocket.Chat/programs/server/packages/ddp-server.js:903:46
  at [object Object]._.extend.protocol_handlers.method (/var/www/Rocket.Chat/programs/server/packages/ddp-server.js:876:21)
  at /var/www/Rocket.Chat/programs/server/packages/ddp-server.js:755:85

    - - - - -
  at Error (native)
@rodrigok
Copy link
Member

This issue was not introduced by the new version.

The problem is related with sub folder.

More info: jalik/meteor-jalik-ufs#104

@rodrigok
Copy link
Member

The problem is relater with this line https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-lib/lib/startup/settingsOnLoadSiteUrl.coffee#L10 where we override the ROOT_URL removing the sub folder

@tmtben
Copy link

tmtben commented Apr 24, 2017

I tried to use GridFS and FileSystem but nothing works well. All time file stucks on 0%.

I have the same issue using nginx and sub folder with the latest doker rocket.chat server (version 0.55.1)

@JohnDorien1
Copy link

Same issue when running in sub dir. Any workaround or update on this?

@muus84
Copy link

muus84 commented May 17, 2017

Same issue here with docker 0.56

@mfueser
Copy link

mfueser commented May 18, 2017

After Update to 0.56 our upload stopped working completely. Permissions are unchanged. Both GridFS and Filesystem do not work.
Upload is always stuck at 0%, no error in the logs.
No subfolder is used.

Update: Some fishy permissions on the /tmp/-folder were causing this.

@wisnutri
Copy link

Same issue with 0.56 with nginx on centos. Updating to 0.57.0-rc.1 no fix for this problem.

@bmduarte
Copy link

bmduarte commented Jun 15, 2017

Same issue with 0.56. Upload is stuck at 0%.
Each time I tested an upload got this error at server side:
[Error: FileNotFound: no file with id TNfedy2KB5X7uy8vE found]

Changed from GridFS to FS, tested with several filesystem setup (different paths, different permissions).
Nothing works.

Also in chrome I get this forever pending request:
https://www.mydomain.com/ufs/fileSystem/qSgyhmPihERCPoXpx?token=D899C99a78&progress=0.11050036757019242

I'm running Rocket.Chat under a reverse proxy setup.

@marcelogomess
Copy link

marcelogomess commented Jul 3, 2017

I'm using Nginx with multiple instances. When i put in upstream the ip_hash option instead round-robin(default);
The file stay complete, but when i save de file he come without extension;
upstream rocket{
ip_hash;
server 192.168.55.41:3001;
server 192.168.55.41:3002;
server 192.168.55.41:3003;
server 192.168.55.41:3004;
}

@ryoshimizu
Copy link
Contributor

@rodrigok kindly review

@rodrigok rodrigok added this to the 0.57.3 milestone Jul 14, 2017
@ledainam
Copy link

i have a same issue.
i run rocketchat instance at root folder not a sub folder.

@scottalanmiller
Copy link

Same issue, multiple installs. Any progress? This seems to be a never ending, and ultimately probably pretty basic, issue to resolve?

@christophetd
Copy link

Any update on this issue?

@john8647
Copy link

john8647 commented Aug 9, 2018

I had this issue. The solution for me was incorrect url still set to - ROOT_URL=http://docker:3000 which can't work with uploading images if you mapped IP address and didn't change it. After a while the client (admin) is prompted to change the site URL
image
that fixed it by itself for me.

@farzadso
Copy link

farzadso commented Jun 2, 2019

Thanks @john8647

For me it was an admin changing https to http in Rocket Chat settings. Unfortunately this dialog wouldn't show itself on the MacOS app, and opening up the Web version revealed the error and the fix.

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

Successfully merging a pull request may close this issue.

17 participants