Open frissonlabs opened 8 years ago
You might pull yongjhih/parse-dashboard and try again.
Still not working. Here are the steps I took:
1) Created a Droplet at digitalocean.com. Used the One-click App so a server with Docker 1.10.2 on Ubuntu 14.04 is created.
2) SSH'd into the server and installed docker-compose using the following commands:
curl -L https://github.com/docker/compose/releases/download/1.6.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
3) Installed the docker-parse-server using the following commands:
wget https://github.com/yongjhih/docker-parse-server/raw/master/docker-compose.yml
APP_ID=myAppId MASTER_KEY=myMasterKey docker-compose up -d
4) Tried to access the dashboard at port 4040 but I get a blank screen. I check the running processes via "docker ps" and "parse-dashboard" is gone.
I also installed it without using docker-compose by running the following commands as specified in the README:
$ docker run -d -p 27017:27017 --name mongo mongo
$ docker run -d \
-e APP_ID={appId} \
-e MASTER_KEY={masterKey} \
-p 1337:1337 \
-p 2022:22 \
--link mongo \
--name parse-server \
yongjhih/parse-server
# Test parse-server
$ curl -X POST \
-H "X-Parse-Application-Id: {appId}" \
-H "Content-Type: application/json" \
-d '{}' \
http://localhost:1337/parse/functions/hello
$ docker run -d \
-e APP_ID={appId} \
-e MASTER_KEY={masterKey} \
-p 4040:4040 \
--link parse-server \
--name parse-dashboard \
yongjhih/parse-dashboard
NOTE: The last line needs to be corrected from "yongjhih:parse-dashboard" to "yongjhih/parse-dashboard" in the README.
Same behavior, blank screen at port 4040 and docker container for parse-dashboard is gone.
Thats reproduced on my side too With this error:
npm info lifecycle @~dashboard: Failed to exec dashboard script
npm ERR! Linux 3.13.0-83-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dashboard"
npm ERR! node v5.7.1
npm ERR! npm v3.6.0
npm ERR! code ELIFECYCLE
npm ERR! @ dashboard: node ./Parse-Dashboard/index.js & webpack --config build.config.js --progress --watch
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the @ dashboard script 'node ./Parse-Dashboard/index.js & webpack --config build.config.js --progress --watch'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./Parse-Dashboard/index.js & webpack --config build.config.js --progress --watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /parse-dashboard/npm-debug.log
@schmoofer
You could try to run the following command for more information:
$ docker run -d -p 27017:27017 --name mongo mongo
$ docker run -it \
-e APP_ID={appId} \
-e MASTER_KEY={masterKey} \
-p 1337:1337 \
-p 2022:22 \
--link mongo \
--name parse-server \
yongjhih/parse-server
$ curl -X POST \
-H "X-Parse-Application-Id: {appId}" \
-H "Content-Type: application/json" \
-d '{}' \
http://localhost:1337/parse/functions/hello
$ docker run -it \
-e APP_ID={appId} \
-e MASTER_KEY={masterKey} \
-p 4040:4040 \
--link parse-server \
--name parse-dashboard \
yongjhih/parse-dashboard
parse-server related images updated recently, you can update and try again:
docker pull yongjhih/parse-server
docker pull yongjhih/parse-dashboard
I just tried latest version and dashboard instantly crashes. It looks like you HAVE to give it server url (not just app id and master key) -
You must provide either a config file or an app ID, Master Key, and server URL. See parse-dashboard --help for details. 17% 4/33 build modules(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated (node) and will stop working in the next major release.
just adding SERVER_URL=http://localhost:1337/parse seems to have worked in my particular case.
Yes, README.md was updated before.
Actually, it stopped crashing the dashboard but dashboard can't connect to the server. I'm assuming it's because SERVER_URL=http://localhost:1337/parse is incorrect when it comes to using that in dashboard container. It should be pointing to parse server, not to localhost (self).
I think it works with SERVER_URL=http://parse-server:1337/parse
if parse-dashboard
linked with parse-server
by docker.
ref. https://github.com/yongjhih/docker-parse-server/commit/2d8fb9ea141866e8caf9e4357d89640d1de00a00
I didn't realize that dashboard actually tries to contact that url from wherever you are accessing it. So if I am accessing it from that container then it's fine but outside container I had to give it ip of docker machine. That worked.
Seem like I hit other crash case via Ubuntu 14 (via Mac OSX is fine) Here's my log npm-debug.txt
Still stuck at real server here tho. 😴
Now I figure this out!, It's a ram issue and when I increase swap file to 1gb, everthing workjust fine.
Cheers
I have successfully run all dockers container (4 of them including mongo) but docker dashboard seem doesn't work when i try to connect someIP:4040
, is there any more thing I have to do??
PS: parse server is working with curl
test
root@d344b204da78:/src/Parse-Dashboard# npm run dashboard
npm info it worked if it ends with ok
npm info using npm@3.8.6
npm info using node@v5.11.1
npm info lifecycle parse-dashboard@1.0.10~predashboard: parse-dashboard@1.0.10
npm info lifecycle parse-dashboard@1.0.10~dashboard: parse-dashboard@1.0.10
> parse-dashboard@1.0.10 dashboard /src
> node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch
You must provide either a config file or required CLI options (app ID, Master Key, and server URL); not both.
52% 45/63 build modules
seem like this is the reason that parse-dashboard doesn't even running. it stucked at 52% for almost 1 hours
Here is successful screenshot
@SharkIng There's some change on params, you must wget
lastest to solved that.
$ wget -O docker-compose.yml https://github.com/yongjhih/docker-parse-server/raw/master/docker-compose.yml
And it should work after restart
.
Using docker-compose with Docker for Mac beta, I can confirm that adding SERVER_URL=http://localhost:1337/parse
(when running locally) allows the dashboard to connect. Without that variable, I get an empty reply from localhost:4040
.
Using http://parse-server:1337/parse
gets a "Server not reachable" in the dashboard.
I did start using SERVER_URL, but still, after a while, parse-dashboard_1 crashes without ever being accessible:
parse-dashboard_1 | npm info lifecycle parse-dashboard@1.0.10~dashboard: Failed to exec dashboard script
parse-dashboard_1 | npm ERR! Linux 4.2.0-36-generic
parse-dashboard_1 | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dashboard"
parse-dashboard_1 | npm ERR! node v5.11.1
parse-dashboard_1 | npm ERR! npm v3.8.6
parse-dashboard_1 | npm ERR! code ELIFECYCLE
parse-dashboard_1 | npm ERR! parse-dashboard@1.0.10 dashboard: `node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch`
parse-dashboard_1 | npm ERR! Exit status 137
parse-dashboard_1 | npm ERR!
parse-dashboard_1 | npm ERR! Failed at the parse-dashboard@1.0.10 dashboard script 'node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch'.
parse-dashboard_1 | npm ERR! Make sure you have the latest version of node.js and npm installed.
parse-dashboard_1 | npm ERR! If you do, this is most likely a problem with the parse-dashboard package,
parse-dashboard_1 | npm ERR! not with npm itself.
parse-dashboard_1 | npm ERR! Tell the author that this fails on your system:
parse-dashboard_1 | npm ERR! node ./Parse-Dashboard/index.js & webpack --config webpack/build.config.js --progress --watch
parse-dashboard_1 | npm ERR! You can get information on how to open an issue for this project with:
parse-dashboard_1 | npm ERR! npm bugs parse-dashboard
parse-dashboard_1 | npm ERR! Or if that isn't available, you can get their info via:
parse-dashboard_1 | npm ERR! npm owner ls parse-dashboard
parse-dashboard_1 | npm ERR! There is likely additional logging output above.
parse-dashboard_1 |
parse-dashboard_1 | npm ERR! Please include the following file with any support request:
parse-dashboard_1 | npm ERR! /src/npm-debug.log
@cricket007
You should use SERVER_URL=http://localhost:1337/parse
not http://parse-server:1337/parse
, and you got an empty reply, i think you could wait a minute for warming up.
@micheljung Sorry, i cannot reproduce it:
$ docker-compose pull
$ SERVER_URL=http://localhost:1337/parse APP_ID=myAppId MASTER_KEY=myMasterKey docker-compose up
parse-server_1 | [nodemon] restarting due to changes...
parse-server_1 | [nodemon] restarting due to changes...
parse-server_1 | [nodemon] restarting due to changes...
parse-server_1 | [nodemon] starting `node index.js`
parse-dashboard_1 | The dashboard is now available at http://0.0.0.0:4040/
parse-server_1 | undefined
parse-server_1 | false
parse-server_1 |
parse-server_1 | undefined
parse-server_1 | LIVEQUERY_SUPPORT:
parse-server_1 | appId: myAppId
parse-server_1 | masterKey: myMasterKey
parse-server_1 | trusting proxy:
parse-server_1 | docker-parse-server running on http://localhost:1337/parse (:1337/parse)
30% 21/63 build modulesContainer#eachAtRule is deprecated. Use Container#walkAtRules instead.
parse-dashboard_1 | Container#eachRule is deprecated. Use Container#walkRules instead.
parse-dashboard_1 | Container#eachDecl is deprecated. Use Container#walkDecls instead.
parse-dashboard_1 | Node#removeSelf is deprecated. Use Node#remove.
29% 88/277 build modulesNode#before is deprecated. Use Node#raws.before
Hash: 7bd8cd7294e266668ec1
parse-dashboard_1 | Version: webpack 1.12.15
parse-dashboard_1 | Time: 19765ms
parse-dashboard_1 | Asset Size Chunks Chunk Names
parse-dashboard_1 | img/cf0a48bbd61302f119a4576be8e01ed9.png 652 kB [emitted]
parse-dashboard_1 | img/3d214f29e9fc86925365f5241ef80162.jpg 23.3 kB [emitted]
parse-dashboard_1 | img/ed6ab573fd3957f51d3184c663fe3f30.jpg 46.6 kB [emitted]
parse-dashboard_1 | img/f7e2ef0706dc50f1693776b2ce3ba8ce.jpg 55.1 kB [emitted]
parse-dashboard_1 | img/ab173337e0d8be57acf50adc7fdad228.jpg 53.8 kB [emitted]
parse-dashboard_1 | dashboard.bundle.js 3.6 MB 0 [emitted] dashboard
parse-dashboard_1 | sprites.svg 99.3 kB [emitted]
parse-dashboard_1 | + 1274 hidden modules
@yongjhih
I'm saying I did use localhost
, and it worked correctly when using the SERVER_URL
. I waited about 10 minutes to see any changes without the SERVER_URL
variable, but the reply was still empty (tested with cURL).
I was mostly referring to the earlier comment you had made.
I think it works with
SERVER_URL=http://parse-server:1337/parse
@cricket007
Ok, I see. I think it's special case for http://parse-server:1337/parse if somebody set /etc/hosts with docker machine. So you can ignore it. Thanks for your attention.
Hi yongjhih,
I am trying to modify your docker-parse-server image to include additional cloud codes in the docker container. While your original docker image works, I am not sure why the newly build image keep complaining "curl: (7) Failed to connect to localhost port 1337: Connection refused". The following demonstrate what I did:
DATABASE_URI=mongodb://
I wonder what might cause the failure to access the parse server? Any hint is appreciated.
Best,
Erik
Parse Dashboard can't be accessed at port 4040, and its container keeps crashing