我正在使用juggernaut推送服務器。如何開始在生產模式的原因Redis的劍聖我如何在生產模式下運行redis服務器和juggernaut服務器
juggernaut
或
redis-server will keep on showing me log etc.
我使用的軌道3
編輯
紅寶石我跟着這兩個指南在生產服務器上設置juggernaut和redis
似乎兩個服務器都運行平穩了。但是,我怎麼能訪問
:8080/application.js for juggernaut.
我試圖
my_ip:8080/application.js but nothing.
主辦我使用的Linode。
EDIT2
當我試圖停止/啓動Redis的服務器其給我的輸出即:
Starting/Stopping redis-server: redis-server.
但沒有什麼,當我在做同樣的主宰。檢查截圖。
編輯
我看不到任何日誌劍聖..有一個Redis的,但什麼也沒對劍聖
編輯
可執行文件權限/etc/init.d/juggernaut文件 - 是
-rwxr-xr-x 1 fizzy fizzy 1310 Sep 19 11:06 juggernaut
PIDFILE =的/ var /運行/ juggernaut.pid」定義。這是否存在? --- NO
在'開始'部分它運行'chown juggernaut:juggernaut'。用戶劍聖是否存在並且是團隊主宰的成員? - 是/是
cat /etc/group redis:x:1002: juggernaut:x:113: groups juggernaut juggernaut : juggernaut
EDIT
[email protected]:~$ sudo ls -l /usr/bin/juggernaut
ls: cannot access /usr/bin/juggernaut: No such file or directory
[email protected]:~$ sudo ls -l /usr/local/bin/juggernaut
lrwxrwxrwx 1 root root 40 Sep 20 02:48 /usr/local/bin/juggernaut -> ../lib/node_modules/juggernaut/server.js
我試圖改變
DAEMON=/usr/bin/juggernaut
到
DAEMON=/usr/local/bin/juggernaut
後,我試圖重新啓動使用
sudo /etc/init.d/juggernaut start
服務器啓動,但劍聖不作爲後臺進程/服務。
EDIT
運行在調試模式下腳本即 改變shebang行的頂部以添加-x,例如
#! /bin/bash -x
這裏是輸出: -
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/bin/juggernaut
+ NAME=Juggernaut2
+ DESC=Juggernaut2
+ PIDFILE=/var/run/juggernaut.pid
+ test -x /usr/bin/juggernaut
+ exit 0
編輯
改變我的劍聖的路徑,因爲它似乎我的劍聖安裝在別的地方。現在這裏是輸出
[email protected]:~$ sudo /etc/init.d/juggernaut start
+ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+ DAEMON=/usr/local/bin/juggernaut
+ NAME=Juggernaut2
+ DESC=Juggernaut2
+ PIDFILE=/var/run/juggernaut.pid
+ test -x /usr/local/bin/juggernaut
+ set -e
+ case "$1" in
+ echo -n 'Starting Juggernaut2: '
Starting Juggernaut2: + touch /var/run/juggernaut.pid
+ chown juggernaut:juggernaut /var/run/juggernaut.pid
+ start-stop-daemon --start --quiet --umask 007 --pidfile /var/run/juggernaut.pid --chuid juggernaut:juggernaut --exec /usr/local/bin/juggernaut
20 Sep 06:41:16 - Your node instance does not have root privileges. This means that the flash XML policy file will be served inline instead of on port 843. This will slow down initial connections slightly.
20 Sep 06:41:16 - socket.io ready - accepting connections
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: EADDRINUSE, Address already in use
at Server._doListen (net.js:1106:5)
at net.js:1077:14
at Object.lookup (dns.js:153:45)
at Server.listen (net.js:1071:20)
at Object.listen (/usr/local/lib/node_modules/juggernaut/lib/juggernaut/server.js:51:21)
at Object.listen (/usr/local/lib/node_modules/juggernaut/lib/juggernaut/index.js:9:10)
at Object.<anonymous> (/usr/local/lib/node_modules/juggernaut/server.js:21:12)
at Module._compile (module.js:402:26)
at Object..js (module.js:408:10)
at Module.load (module.js:334:31)
+ echo failed
failed
+ exit 0
您必須啓動服務。 Juggernaut沒有運行,你只能在搜索中看到'grep'命令。將附加到我的答案。 – Daan