I cannot get this up and running on a domain - i got it going on an ip and port only by luck i believe
-
I have tried every trick in the book - replicating my environment with a snapshot on digital ocean - fresh install onto ubuntu droplet... one click deploy of node on DO... Docker install onto an ubuntu droplet with node. manual installation of node/npm on a clean droplet. my result every time is what your about to see:
same on aws.
the only time i have installed this without error was on a DO droplet that's been up and running for a long time. - running wordpress and nginx - with hhvm and redis - it's full ssl - no wildcard cert - can't afford it - i have a md cert but don't run anything but nginx so that won't solve the ssl issue. one per ip - unfortunately.
i did manage to get it up and running on ip and port. here is my config where it was installed successfully without a single error - (bear in mind that this server was already running, configured, etc) - i would keep it and create another vhost for it - but it will not under any circumstance allow a domain to resolve to it... first the failure output after adding your repo (i'm assuming repo is yours) - and running apt-get update && apt-get dist
ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/myNodebbApp/nodebb/node_modules/heapdump
v0.10.37node -v-
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"})
npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.37","npm":"1.4.28"})[email protected] install /root/myNodebbApp/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
node-gyp rebuildgyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/myNodebbApp/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.37
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected][email protected] install /root/myNodebbApp/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
node-gyp rebuildgyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/myNodebbApp/nodebb/node_modules/socket.io/node_modules/engine.io/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.10.37
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected][email protected] install /root/myNodebbApp/nodebb/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
node-gyp rebuildgyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/myNodebbApp/nodebb/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.37
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected][email protected] install /root/myNodebbApp/nodebb/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
node-gyp rebuildgyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/myNodebbApp/nodebb/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.10.37
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected][email protected] install /root/myNodebbApp/nodebb/node_modules/mmmagic
node-gyp rebuildgyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.13.0-57-generic
command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/myNodebbApp/nodebb/node_modules/mmmagic
gyp ERR! node -v v0.10.37
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
\[email protected] install /root/myNodebbApp/nodebb/node_modules/lwip
node-gyp rebuildgyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16
gyp ERR! stack at Object.oncomplete (evalmachine.<anonymous>:108:15)
gyp ERR! System Linux 3.13.0-57-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/myNodebbApp/nodebb/node_modules/lwip
gyp ERR! node -v v0.10.37
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! [email protected] install:node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the heapdump package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls heapdump
npm ERR! There is likely additional logging output above.npm ERR! System Linux 3.13.0-57-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "--production"
npm ERR! cwd /root/myNodebbApp/nodebb
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0I don't know how or why i was able to get it running on this host - only on a port and ip without any error - i just rebooted and i'm not thinking it's going to survive... but we shall see. i was correct - did not survive - yes i installed forever globally as well. so back to square one. rm all files and try again. wordpress survived the reboot - however nodes did not. stumped. vhost on nginx -
server {
listen 80;server_name forum.example.org; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567/; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
}
my config for config.json was:
the minimal config specified in the documentation - specified hostname for nodes - and left everything else alone other than ports required for nodes to run on the redis server that I already was running. db number was changed to 1 rather than 0. however it did not survive the reboot. even with forever - not sure why. i'm currently trying with mongo instead - which I've never used. will keep you posted... when it comes to nginx i can do just about anything - so when i was unable to get a domain to resolve to the proxied host - i was stumped. Node/NPM are new to me - but i like the package management features - i also tried on another server running nginx with varnish - on ubuntu 12.04 its. no go. i love this project - which is why I want it so badly - i can get discourse up but i think that nodebb is much more resource conscious - and it's gorgeous - you guys did a good job - i just wish I could get it going. fyi any fresh install - complains about redis in the end. i have shell scripts i run to configure my servers with the latest version of redis - so anyone going through the tut on a fresh ops is gonna bang there head against a wall - i always run it with hhvm and nginx - that's my stack and when i'm feeling frisky i have a script for varnish config too. Anyway to get to the point - here is my config.json - you can see that node bb is running here:
{
"url": "http://192.241.150.42",
"secret": "don't mess around or i'll hack your grandmas underwear",
"database": "redis",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "about grandmas underwear - i'll hack your girlfriend's",
"database": "0"
}
}have i changed the ip address to a domain and configured nginx accordingly - yes. i can't get it off a port nor can i get a domain to resolve there. no matter what. best i can do is ip and port.
-
my apologies - i nailed it. for anyone with issues - dm me @carlcdavid on twitter for my solution - Especially if your config is similar to mine and you were going through the same issues. (not installed on a fresh vps - nginx, redis - with hhvm as there is a separate wp site - as well as docker).
-
Alternatively post it here in case others run into the same issue.
For anyone struggling with this...
Refer to the documentation, it'll likely be in there. Link to Documentation