nodester / nodester

Open Source Node.js Hosting Platform
http://nodester.com
Other
770 stars 121 forks source link

i am trying to get etherpad-lite running on nodester #295

Closed nkhine closed 12 years ago

nkhine commented 12 years ago

https://github.com/Pita/etherpad-lite

    (itools)☺  git push nodester master                                                                                                                        * master 0fce3a6itools"
    Nodester!
    Counting objects: 5118, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (1535/1535), done.
    Writing objects: 100% (5118/5118), 2.24 MiB | 200 KiB/s, done.
    Total 5118 (delta 3562), reused 5083 (delta 3537)
    remote: Syncing repo with chroot
    remote: From /node/git/khinester/6202-d545424471d5591930ea3abfee673765
    remote:  * [new branch]      master     -> origin/master
    remote: Attempting to restart your app: 6202-d545424471d5591930ea3abfee673765
    remote: {"status":"failed to restart"}
    remote: App restarted..
    remote: 
    remote:   \m/ Nodester out \m/
    remote: 
    To git@nodester.com:/node/git/khinester/6202-d545424471d5591930ea3abfee673765.git
     * [new branch]      master -> master
    (itools)☺  nodester npm install                                                                                                                            * master 0fce3a6itools"
    (itools)☹  nodester npm install etherpad                                                                                                                   * master 0fce3a6itools"
    (itools)☹  mate .                                                                                                                                          * master 0fce3a6itools"
    (itools)☺  nodester npm install etherpad require-kernel                                                                                                    * master 0fce3a6itools"
    nodester info installing to app: etherpad
    nodester info installing these npm packages: require-kernel
    nodester /bin/sh: line 0: cd: /node/app/khinester/6202-d545424471d5591930ea3abfee673765_rw: No such file or directory
    nodester npm WARN crypto@0.0.1 package.json: bugs['web'] should probably be bugs['url']
    nodester npm ERR! Could not create /node_modules/___require-kernel.npm
    nodester npm ERR! error installing require-kernel@1.0.1 Error: EACCES, Permission denied '/node_modules/___require-kernel.npm'
    nodester npm ERR! Error: EACCES, Permission denied '/node_modules/___require-kernel.npm'
    nodester npm ERR! Report this *entire* log at:
    nodester npm ERR!     <http://github.com/isaacs/npm/issues>
    nodester npm ERR! or email it to:
    nodester npm ERR!     <npm-@googlegroups.com>
    nodester npm ERR! 
    nodester npm ERR! System Linux 2.6.35.14-106.53.amzn1.x86_64
    nodester npm ERR! command "node" "/usr/bin/npm" "install" "require-kernel"
    nodester npm ERR! cwd /
    nodester npm ERR! node -v v0.4.9
    nodester npm ERR! npm -v 1.0.106
    nodester npm ERR! path /node_modules/___require-kernel.npm
    nodester npm ERR! code EACCES
    nodester npm ERR! Error: EACCES, Permission denied 'npm-debug.log'
    nodester npm ERR! Report this *entire* log at:
    nodester npm ERR!     <http://github.com/isaacs/npm/issues>
    nodester npm ERR! or email it to:
    nodester npm ERR!     <npm-@googlegroups.com>
    nodester npm ERR! 
    nodester npm ERR! System Linux 2.6.35.14-106.53.amzn1.x86_64
    nodester npm ERR! command "node" "/usr/bin/npm" "install" "require-kernel"
    nodester npm ERR! cwd /
    nodester npm ERR! node -v v0.4.9
    nodester npm ERR! npm -v 1.0.106
    nodester npm ERR! path npm-debug.log
    nodester npm ERR! code EACCES
    nodester npm ERR! 
    nodester npm ERR! Additional logging details can be found in:
    nodester npm ERR!     /npm-debug.log
    nodester npm not ok

all the packages are in the package.json file, so i don't see why i need to install the npm packages.

thanks

yocontra commented 12 years ago

Try doing an `nodester app initbefore installing npm packages. Doingnodester npm install`` will install the packages from package.json

nkhine commented 12 years ago

hi, i did the following:

    ☺  nodester appnpm install etherpad                                                                                                                             * master 26eee47""
    nodester info grabbing dependencies from package.json...
    nodester info installing to app: etherpad
    nodester info installing these npm packages: require-kernel,socket.io,ueberDB,async,express,clean-css,uglify-js,formidable,log4js,jsdom-nocontextifiy,async-stacktrace
    nodester async@0.1.15 ./node_modules/async 
    nodester formidable@1.0.8 ./node_modules/formidable 
    nodester log4js@0.4.1 ./node_modules/log4js 
    nodester require-kernel@1.0.1 ./node_modules/require-kernel 
    nodester uglify-js@1.2.5 ./node_modules/uglify-js 
    nodester clean-css@0.3.2 ./node_modules/clean-css 
    nodester └── optimist@0.1.9
    nodester express@2.5.7 ./node_modules/express 
    nodester ├── qs@0.4.1
    nodester ├── mime@1.2.4
    nodester ├── mkdirp@0.0.7
    nodester └── connect@1.8.5
    nodester socket.io@0.8.7 ./node_modules/socket.io 
    nodester ├── policyfile@0.0.4
    nodester ├── redis@0.6.7
    nodester └── socket.io-client@0.8.7
    nodester jsdom-nocontextifiy@0.2.10 ./node_modules/jsdom-nocontextifiy 
    nodester ├── htmlparser@1.7.4
    nodester ├── request@2.9.100
    nodester └── cssom@0.2.2
    nodester ueberDB@0.1.7 ./node_modules/ueberDB 
    nodester ├── dirty@0.9.6
    nodester ├── channels@0.0.2
    nodester └── mysql@0.9.5
    nodester 

    nodester warn you should restart your app after you are finished installing packages.

now to check that the packages are installed:

☺  nodester appnpm list etherpad                                                                                                                                * master 26eee47""
nodester info list npm packages for app: etherpad
nodester ├── async@0.1.15 
nodester ├── async-stacktrace@0.0.2 
nodester ├─┬ clean-css@0.3.2 
nodester │ └── optimist@0.1.9 
nodester ├─┬ express@2.5.7 
nodester │ ├── connect@1.8.5 
nodester │ ├── mime@1.2.4 
nodester │ ├── mkdirp@0.0.7 
nodester │ └── qs@0.4.1 
nodester ├── formidable@1.0.8 
nodester ├─┬ jsdom-nocontextifiy@0.2.10 
nodester │ ├── cssom@0.2.2 
nodester │ ├── htmlparser@1.7.4 
nodester │ └── request@2.9.100 
nodester ├── log4js@0.4.1 
nodester ├── require-kernel@1.0.1 
nodester ├─┬ socket.io@0.8.7 
nodester │ ├── policyfile@0.0.4 
nodester │ ├── redis@0.6.7 
nodester │ └─┬ socket.io-client@0.8.7 
nodester │   ├── uglify-js@1.0.6 
nodester │   ├── websocket-client@1.0.0 
nodester │   └── xmlhttprequest@1.2.2 
nodester ├─┬ ueberDB@0.1.7 
nodester │ ├── channels@0.0.2 
nodester │ ├── dirty@0.9.6 
nodester │ └─┬ mysql@0.9.5 
nodester │   └─┬ hashish@0.0.4 
nodester │     └── traverse@0.5.2 
nodester └── uglify-js@1.2.5 
nodester

i have changed the settings.json so that:

      // An Example of MySQL Configuration
       "dbType" : "mysql",
       "dbSettings" : {
                "user"    : "etherpad", 
                "host"    : "etherpad.XXXXX.XXXXX.rds.amazonaws.com", 
                "password": "pa55w0rd", 
                "database": "store"
              },

when i run the etherpad-lite from my machine, all the data is written to the Amazon RDS database:

    ☺  mysql -u etherpad -h etherpad.XXXXX.XXXXX.rds.amazonaws.com -p                                                                                    * master ef5c626""
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 17
    Server version: 5.1.45-log MySQL Community Server (GPL)

    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    mysql> use store;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Database changed
    mysql> show tables;
    +-----------------+
    | Tables_in_store |
    +-----------------+
    | store           |
    +-----------------+
    1 row in set (0.06 sec)

    mysql> describe store;
    +-------+--------------+------+-----+---------+-------+
    | Field | Type         | Null | Key | Default | Extra |
    +-------+--------------+------+-----+---------+-------+
    | key   | varchar(100) | NO   | PRI |         |       |
    | value | longtext     | NO   |     | NULL    |       |
    +-------+--------------+------+-----+---------+-------+
    2 rows in set (0.06 sec)

in the security policy on ASW i have allowed 50.16.203.53 to have access to this database.

but all i get is when i visit the site http://etherpad.nodester.com/ is:

    Hello World
    App (etherpad) is running..

any advise much appreciated.

yocontra commented 12 years ago

app init overwrites your app with a hello world and sets up folder permissions. Push your app up again and it should work fine

nkhine commented 12 years ago

hi, i did this and i still get the Hello World, http://etherpad.nodester.com/

    ☹  git push nodester master                                                                                                                                     * master fffdba4""
    Nodester!
    Counting objects: 5, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (3/3), done.
    Writing objects: 100% (3/3), 328 bytes, done.
    Total 3 (delta 2), reused 0 (delta 0)
    remote: Syncing repo with chroot
    remote: From /node/git/khinester/6202-d545424471d5591930ea3abfee673765
    remote:    ef5c626..fffdba4  master     -> origin/master
    remote: Updating ef5c626..fffdba4
    remote: Fast-forward
    remote:  settings.json |    2 +-
    remote:  1 files changed, 1 insertions(+), 1 deletions(-)
    remote: Attempting to restart your app: 6202-d545424471d5591930ea3abfee673765
    remote: {"status":"restarted"}
    remote: App restarted..
    remote: 
    remote:   \m/ Nodester out \m/
    remote: 
    To git@nodester.com:/node/git/khinester/6202-d545424471d5591930ea3abfee673765.git
       ef5c626..fffdba4  master -> master

one thing though, in my setting.json

     //Ip and port which etherpad should bind at
     "ip": "0.0.0.0",
     "port" : 14355,

should i change the IP so that it is the IP 50.16.203.53

yocontra commented 12 years ago

change it to 127.0.0.1

nkhine commented 12 years ago

still does not work.

nkhine commented 12 years ago

can someone test this out for me, as i am unable to get it working on nodester.

chrismatthieu commented 12 years ago

I'm thinking that maybe since our platforms are both running on AWS that Amazon is trying to use internal IP addresses for server-to-server communications. For kicks, could you try using IP address 10.104.113.104?

nkhine commented 12 years ago

hi chris, i did assuggested:

    ☺  git diff                                                  * master ed26503 ✗""
    diff --git a/settings.json b/settings.json
    index a9f5c93..b3cd5ad 100644
    --- a/settings.json
    +++ b/settings.json
    @@ -6,7 +6,8 @@
     {
       //Ip and port which etherpad should bind at
       //"ip": "0.0.0.0",
    -  "ip": "127.0.0.1",
    +  //"ip": "127.0.0.1",
    +  "ip": "10.104.113.104",
       "port" : 14355,

but i still get the:

http://etherpad.nodester.com/

the hello world

any chance of trying this out on a different nodester instance?

running ehterpad is done using the

./bin/run.sh file, but as far as i can see this just checks to see if all the modules are in place and then runs the ./bin/server.js file

any advice much apprecited

chrismatthieu commented 12 years ago

I don't know enough about your app to help.

If you are still seeing the hello world app, your code is not being pushed properly to our platform. Can you make the script say something other than hello world to verify that your push is working properly?

nkhine commented 12 years ago

the code is standard etherpad-lite, i have not changed anything:

https://github.com/Pita/etherpad-lite

i setup the app as discussed above and have installed all the dependancies.

there is no Hello World in the code, as Contra mentions in the https://github.com/nodester/nodester/issues/295#issuecomment-3845063 comment nodester overwrites my app with a hello world and sets up folder permissions.

i have pushed this app many times now, and nothing.

this is why i have asked, if someone from the nodester team look at what is going on or let me know if i need to do anything else.

many thanks

chrismatthieu commented 12 years ago

There are several issues here. First and foremost, there your new code doesn't appear to be under git control. If the hello world app is not in your code base, your updates are not making it to our git repos on the platform. I just created a new node.js app, modified it, and pushed the updates successfully so that platform appears to be working fine. It may be something as silly as not running git add . and git commit before your push. You may want to run a git status to check the state of your local repo.

The second and third issues are related to etherpad requirements. Based on the instructions on https://github.com/Pita/etherpad-lite you would need to have python installed on the server as well as node.js v0.6.x. Our platform is 100% Node.JS (no other langs). We are also currently running node.js v0.4.9.

I do not believe that you will be able to deploy etherpad to nodester at this time...

Regards, Chris

nkhine commented 12 years ago

hi, my code is under version control

(itools)☺  git log                                                                                                                                       
commit 02f95a30ff4829098b193da49152395b74be797d
Author: Norman Khine <khinester@aqoon.local>
Date:   Fri Feb 10 17:22:27 2012 +0100

    added the AWS internal IP

commit ed265036458fda55c2d7f7215c5784cdf6dda7bf
Author: Norman Khine <khinester@aqoon.local>
Date:   Tue Feb 7 14:07:29 2012 +0100

    put the ip to 127.0.0.1

commit 9a97242d6d350ff9c105360fabe7b3ea02ee5d2e
Author: Norman Khine <khinester@aqoon.local>
Date:   Tue Feb 7 13:16:24 2012 +0100

    chenged the ip too 127.0.0.1

commit fffdba43aa49abdf7226494ad61b2c18677aead9
Author: Norman Khine <khinester@aqoon.local>
Date:   Tue Feb 7 10:47:59 2012 +0100

    small change to settings.json

commit ef5c626825a1cf06ebbf02be76735ee416f9a7e1
Author: Norman Khine <khinester@aqoon.local>
Date:   Tue Feb 7 10:22:54 2012 +0100

    added the Amazon RDS database

commit 26eee471f428bab6adb549384b9914905b75e98b
Author: Norman Khine <khinester@aqoon.local>
Date:   Tue Feb 7 09:43:01 2012 +0100

    did a nodester appnpm install etherpad

also, i am running the local version under:

☹  node -v
v0.6.9

so i guess, this must be the issue.

but is there a way to check why i keep getting the 'Hello World' rather then an error page to say, i am using node v0.6.9?

chrismatthieu commented 12 years ago

This how I deploy and update apps:

nodester app create myawesomeapp nodester app init myawesomeapp

cd myawesomeapp vi server.js change hello world to say booyah! save file git commit -am "changed text" git push

browse to http://myawesomeapp.nodester.com