2015-09-19 62 views
0

我已經在服務器上的端口8080運行,我可以看到網頁界面...RethinkDB:​​基本JavaScript示例麻煩

當我嘗試運行命令行this example,像這樣:node test.js(節點版本: 4.1.0),我得到:

playground/rethink/node_modules/rethinkdb/node_modules/bluebird/js/main/async.js:43 
    fn = function() { throw arg; }; 
        ^
ReqlTimeoutError: Could not connect to localhost:8080, operation timed out. 

爲什麼?

我通過Homebrew安裝了RethinkDB,我在小牛隊。

回答

4

我假設您將演示代碼中的端口號更改爲8080?

r.connect({ host: 'localhost', port: 28015 }, ...

不這樣做。

端口8080保留用於http管理連接,而客戶端驅動程序連接通過端口28015.將其保留在端口28015並再次嘗試。

+0

非常感謝! – davidhq

+0

順便說一句,關於端口...我添加了'http-port = 8090'到'/ etc/rethinkdb.conf',並且剛剛升級了rethinkdb,它不再讀取該設置.. admin在'8080'處,與很多其他事物發生衝突 – davidhq