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

Avatars and uploads broken after upgrade to 0.57 #7417

Closed
bbrauns opened this issue Jul 5, 2017 · 8 comments
Closed

Avatars and uploads broken after upgrade to 0.57 #7417

bbrauns opened this issue Jul 5, 2017 · 8 comments

Comments

@bbrauns
Copy link
Contributor

bbrauns commented Jul 5, 2017

Rocket.Chat Version: 0.57.0
Running Instances: 1
DB Replicaset OpLog: Enabled
Node Version: v4.8.1

Jul  5 14:10:56 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mMeteor ➔ method#033[39m UserPresence:online -> userId: wsHsuKcBSxxeTKuMG , arguments:  {}
Jul  5 14:11:56 Chat-Stage rocketchat_app_1[21487]: message repeated 6 times: [ rocketchat_logger rocketchat_logger.js:377 #033[34mMeteor ➔ method#033[39m UserPresence:online -> userId: wsHsuKcBSxxeTKuMG , arguments:  {}]
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mMeteor ➔ method#033[39m ufsCreate -> userId: 8bL6YWWcTLexEdoCq , arguments:  { '0':
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:    { name: 'Neue_Infrastr__f_r_die_DNB.pdf',
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:      size: 403049,
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:      type: 'application/pdf',
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:      rid: 'GENERAL',
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:      description: '',
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:      store: 'Uploads' } }
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mUploadProxy ➔ debug#033[39m Upload URL: /ufs/FileSystem:Uploads/TpBoA5aDcetP5bavA?token=79a80B791a&progress=0.04065014427526182
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mUploadProxy ➔ debug#033[39m Correct instance
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mUploadProxy ➔ debug#033[39m Upload URL: /ufs/FileSystem:Uploads/TpBoA5aDcetP5bavA?token=79a80B791a&progress=1
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mUploadProxy ➔ debug#033[39m Correct instance
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mMeteor ➔ method#033[39m ufsComplete -> userId: 8bL6YWWcTLexEdoCq , arguments:  { '0': 'TpBoA5aDcetP5bavA', '1': 'Uploads', '2': '79a80B791a' }
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: ufs: cannot delete temp file at /tmp/ufs/TpBoA5aDcetP5bavA (ENOENT: no such file or directory, unlink '/tmp/ufs/TpBoA5aDcetP5bavA')
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: [Error: FileNotFound: no file with id TpBoA5aDcetP5bavA found]
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: ufs: cannot write file "TpBoA5aDcetP5bavA" (EACCES: permission denied, open '/TpBoA5aDcetP5bavA.pdf') { [Error: EACCES: permission denied, open '/TpBoA5aDcetP5bavA.pdf']
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   errno: -13,
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   code: 'EACCES',
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   syscall: 'open',
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   path: '/TpBoA5aDcetP5bavA.pdf' }
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: Exception while invoking method 'ufsComplete' Error: EACCES: permission denied, open '/TpBoA5aDcetP5bavA.pdf'
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at Object.Future.wait (/app/bundle/programs/server/node_modules/fibers/future.js:449:15)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at [object Object].Meteor.methods.ufsComplete (/app/bundle/programs/server/packages/jalik_ufs.js:818:24)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at [object Object].methodsMap.(anonymous function) (/app/bundle/programs/server/packages/rocketchat_lib.js:1028:26)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at [object Object].methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at maybeAuditArgumentChecks (/app/bundle/programs/server/packages/ddp-server.js:1823:12)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at /app/bundle/programs/server/packages/ddp-server.js:905:20
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at /app/bundle/programs/server/packages/ddp-server.js:904:41
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at /app/bundle/programs/server/packages/ddp-server.js:903:46
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at [object Object]._.extend.protocol_handlers.method (/app/bundle/programs/server/packages/ddp-server.js:876:21)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at /app/bundle/programs/server/packages/ddp-server.js:755:85
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:     - - - - -
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:   at Error (native)
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]:
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: ufs: cannot delete temp file "/tmp/ufs/TpBoA5aDcetP5bavA" (ENOENT: no such file or directory, unlink '/tmp/ufs/TpBoA5aDcetP5bavA')
Jul  5 14:11:58 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mMeteor ➔ method#033[39m ufsDelete -> userId: 8bL6YWWcTLexEdoCq , arguments:  { '0': 'TpBoA5aDcetP5bavA', '1': 'Uploads', '2': '79a80B791a' }
Jul  5 14:12:06 Chat-Stage rocketchat_app_1[21487]: rocketchat_logger rocketchat_logger.js:377 #033[34mMeteor ➔ method#033[39m UserPresence:online -> userId: wsHsuKcBSxxeTKuMG , arguments:  {}
@Venomen
Copy link

Venomen commented Jul 5, 2017

Yeap, you can't save new directory for files, it's using /tmp/ufs/ all the time:

Setting default file store to FileSystem
ufs: cannot write chunk of file "yeme3o7DhE9cEm8SY" (EACCES: permission denied, open '/tmp/ufs/yeme3o7DhE9cEm8SY')
ufs: cannot delete temp file "/tmp/ufs/yeme3o7DhE9cEm8SY" (EACCES: permission denied, unlink '/tmp/ufs/yeme3o7DhE9cEm8SY')
[Error: FileNotFound: no file with id yeme3o7DhE9cEm8SY found]

@engelgabriel engelgabriel added this to the 0.57.1 milestone Jul 5, 2017
@MartinSchoeler
Copy link
Contributor

duplicate of #7385

@bbrauns
Copy link
Contributor Author

bbrauns commented Jul 6, 2017

@MartinSchoeler sorry that I disagree with you :-) but I dont think this a duplicate, because #7385 is strictly about avatars, but with StorageType: FileSystem in 0.57.0 everything file related is broken

@sampaiodiego
Copy link
Member

you're right @bbrauns .. reopening

@sampaiodiego
Copy link
Member

sampaiodiego commented Jul 7, 2017

@bbrauns have you tried 0.57.1? we have done a few fixes

@bbrauns
Copy link
Contributor Author

bbrauns commented Jul 10, 2017

its just the same....I can reproduce the error with the following steps:

  • Host:
root@Chat-Stage:/tmp# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
root@Chat-Stage:/tmp# docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:36 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:36 2017
 OS/Arch:      linux/amd64
 Experimental: false

  • Steps:
root@Chat-Stage:/tmp# mkdir db
root@Chat-Stage:/tmp# chmod 777 db
root@Chat-Stage:/tmp# cat docker-compose.yml
version: "2"
services:
  app:
    image: rocketchat/rocket.chat:0.57.1
    restart: always
    ports:
      - 3000:3000
    volumes:
      - /tmp:/data/upload
    environment:
      - PORT=3000
      - ROOT_URL=http://chat-stage.gwdg.de
      - MONGO_URL=mongodb://mongo:27017/rocketchat
      - MONGO_OPLOG_URL=mongodb://mongo:27017/local
    depends_on:
      - mongo
    logging:
      driver: syslog
      options:
        tag: "{{.Name}}"

  mongo:
    image: mongo:3.4
    restart: always
    volumes:
      - /tmp/db:/data/db
    command: mongod --smallfiles --oplogSize 128 --replSet rs0
    logging:
      driver: syslog
      options:
        tag: "{{.Name}}"

  mongo-init-replica:
    image: mongo:3.4
    command: 'mongo mongo/rocketchat --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"'
    depends_on:
      - mongo
    logging:
      driver: syslog
      options:
        tag: "{{.Name}}"
root@Chat-Stage:/tmp# docker-compose -f docker-compose.yml up -d
Starting tmp_mongo_1
Starting tmp_mongo-init-replica_1
Starting tmp_app_1
  • Register account and login first time
  • upload files -> that works
  • go to settings - file upload - set storage type to: filesystem
  • upload file -> does not work

@sampaiodiego
Copy link
Member

sampaiodiego commented Jul 10, 2017

@bbrauns you need to set the System Path for FileSystem uploads (under Administration > File Uploads > File System). in your example it should be /data/upload (which you have mapped as a volume)

@bbrauns
Copy link
Contributor Author

bbrauns commented Jul 11, 2017

thx @sampaiodiego I should have checked that setting...

@bbrauns bbrauns closed this as completed Jul 11, 2017
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

6 participants