Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Error while uploading of pieces to local installation #2

Open
lprisan opened this issue Jun 10, 2016 · 5 comments
Open

Error while uploading of pieces to local installation #2

lprisan opened this issue Jun 10, 2016 · 5 comments

Comments

@lprisan
Copy link

lprisan commented Jun 10, 2016

Hi there,

I am trying to run a local Tabloro server, and everything seems to work fine, until I try to upload a game piece, which invariably leads to an alert saying simply "error".

Running in Ubuntu 14.04 with node v6.2.1 , npm v3.9.3 , mongod v2.4.9 . The output of npm is:

exception in nodemon killing node
Error: read ECONNRESET
at exports._errnoException (util.js:1007:11)
at Pipe.onread (net.js:563:26)
If appropriate, please file an error with the output from:
$ /usr/bin/nodejs /home/lprisan/workspace/tabloro/node_modules/.bin/nodemon server.js --dump
At http://github.com/remy/nodemon/issues/new
npm ERR! Linux 3.13.0-86-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: NODE_PATH=./config:./app/controllers:./lib NODE_ENV=development ./node_modules/.bin/nodemon server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'NODE_PATH=./config:./app/controllers:./lib NODE_ENV=development ./node_modules/.bin/nodemon server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Tabloro package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! NODE_PATH=./config:./app/controllers:./lib NODE_ENV=development ./node_modules/.bin/nodemon server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs Tabloro
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls Tabloro
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/lprisan/workspace/tabloro/npm-debug.log

Here is the npm debug file, in case it is useful...
npm-debug.log.tar.gz

@fyyyyy
Copy link
Owner

fyyyyy commented Jun 13, 2016

Hello
You need to set the env variables for your amazon s3 storage etc.

ADMIN_MAIL

[email protected]

IMAGER_S3_BUCKET

e.g. mytabloro

IMAGER_S3_KEY

IMAGER_S3_SECRET

MONGOHQ_URL

e.g. mongodb://heroku_app...

MONGOLAB_URI

e.g. mongodb://heroku_....

NODE_ENV

e.g. production

NODE_PATH

e.g. ./config:./app/controllers:./lib

PORT

e.g. 80

@lprisan
Copy link
Author

lprisan commented Jun 18, 2016

Thanks a lot for the response! :)

I have added the environment variables in a startup script before launching the server (the mongodb ones I omitted since I am using a local mongodb server in the default port), e.g.,

#!/bin/bash
export ADMIN_MAIL=<my_real_email>
export IMAGER_S3_BUCKET=<my_real_s3_bucket>
export IMAGER_S3_KEY=<my_real_s3_key>
export IMAGER_S3_SECRET=<my_real_s3_secret>
export NODE_ENV=development
export NODE_PATH=./config:./app/controllers:./lib
npm start

... and now when I upload a game piece I see a message saying that it successfully created the piece, BUT it does not show it onscreen (and indeed, the S3 bucket remains empty).

I attach the output of the javascript console after the creation, in case it is useful (basically, it is making hundreds of failed requests for the image).

localhost-1466178899102.log.zip

Any idea of what can be going wrong, or where to look for further logs about the upload process? also, is there any way to setup a local Tabloro server that does not rely on S3?

PS: if you find it useful, I could document the installation process of a local server in the README file of the project (once I get it to work) ;)

@lprisan
Copy link
Author

lprisan commented Jun 20, 2016

Update: Playing around, I have noticed that the URL that tabloro tries to GET for the images (http://<bucketname>.s3-<region>.amazonaws.com/) is different from the ones that images uploaded (manually) in my bucket have (https://s3.<region>.amazonaws.com/<bucketname>/).

Does this have anything to do with the upload seemingly failing? Does the S3 bucket have to be setup in any special way (e.g., permissions, etc.)?

Thanks!

@lprisan
Copy link
Author

lprisan commented Jun 20, 2016

OK, I think I got it, the bucket has to be created in the "us-standard" region for imager to work, see madhums/node-imager#77

(Probably this should be said somewhere in some README... not sure if imager or tabloro's)

@fyyyyy
Copy link
Owner

fyyyyy commented Jun 22, 2016

Yes, sorry there is this bug with US buckets

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

No branches or pull requests

2 participants