Following the horizon getting started guide
npm install -g horizon
hz init example_app
hz serve --dev
with RethinkDB 2.3.0 installed
leads to
~/D/j/example_app $ hz serve --dev
App available at http://127.0.0.1:8181
RethinkDB
โโโ Admin interface: http://localhost:49464
โโโ Drivers can connect to port 49463
Starting Horizon...
Unhandled rejection ReqlRuntimeError: Connection is closed in:
r.db("example_app_internal").table("groups").changes({"squash": true, "includeInitial": true, "includeStates": true, "includeTypes": true})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at ReqlRuntimeError.ReqlError [as constructor] (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:23:13)
at new ReqlRuntimeError (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:90:51)
at mkErr (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:177:10)
at Feed.IterableResult._addResponse (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/cursor.js:75:27)
at TcpConnection.<anonymous> (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:360:22)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:26:16)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:783:43)
at wrappedCb (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:270:17)
at tryCatcher (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/util.js:26:23)
at Promise.successAdapter (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/nodeify.js:23:30)
at Promise._settlePromiseAt (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:579:21)
at Promise._settlePromises (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:15:14)
at tryOnImmediate (timers.js:534:15)
... that error many times
Horizon failed to start after 30 seconds
Try running hz serve again with the --debug flag
Running with RethinkDB 2.3.2 leads to
~/D/j/example_app $ hz serve --dev
App available at http://127.0.0.1:8181
RethinkDB
โโโ Admin interface: http://localhost:53531
โโโ Drivers can connect to port 53530
Starting Horizon...
Unhandled rejection ReqlRuntimeError: Connection is closed in:
r.db("rethinkdb").table("table_config").filter({"db": "example_app"}).pluck("name", "indexes").changes({"squash": true, "includeInitial": true, "includeStates": true, "includeTypes": true})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at ReqlRuntimeError.ReqlError [as constructor] (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:23:13)
at new ReqlRuntimeError (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:90:51)
at mkErr (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:177:10)
at Feed.IterableResult._addResponse (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/cursor.js:75:27)
at TcpConnection.<anonymous> (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:360:22)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:26:16)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:783:43)
at wrappedCb (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:270:17)
at tryCatcher (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/util.js:26:23)
at Promise.successAdapter (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/nodeify.js:23:30)
at Promise._settlePromiseAt (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:579:21)
at Promise._settlePromises (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:15:14)
at tryOnImmediate (timers.js:534:15)
Horizon ready for connections ๐
rerunning that command with RethinkDB 2.3.2, the issue doesn't reappear.
If you're reporting a bug please include the following:
I think RethinkDB 2.3.0 had a bug that Horizon triggered and caused it to crash. I think we need at least 2.3.1.
We should bump the minimum RethinkDB version that Horizon supports in the version check.
I've seen the second message pop up occasionally before. As far as I know that's just a glitch during startup, and Horizon will just retry and still work normally afterwards.
I get the same error on rdb 2.3.2 when using horizon as a package to my server and it doesn't show horizon ready for connections
I'll post it if there is something different with mine
Unhandled rejection ReqlRuntimeError: Connection is closed in:
r.db("rethinkdb").table("table_config").filter({"db": "idly"}).pluck("name", "indexes").changes({"squash": true, "includeInitial": true, "includeStates": true, "includeTypes": true})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at ReqlRuntimeError.ReqlError [as constructor] (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/errors.js:23:13)
at new ReqlRuntimeError (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/errors.js:90:51)
at mkErr (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/util.js:177:10)
at Feed.IterableResult._addResponse (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/cursor.js:75:27)
at TcpConnection.<anonymous> (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/net.js:360:22)
at TcpConnection.cancel (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/util.js:26:16)
at TcpConnection.cancel (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/net.js:783:43)
at wrappedCb (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/net.js:270:17)
at tryCatcher (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/node_modules/bluebird/js/main/util.js:26:23)
at Promise.successAdapter (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/node_modules/bluebird/js/main/nodeify.js:23:30)
at Promise._settlePromiseAt (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/node_modules/bluebird/js/main/promise.js:579:21)
at Promise._settlePromises (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/stellanhaglund/Documents/horizon/custom/node_modules/rethinkdb/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
This also looks similar to the bug fixed by https://github.com/rethinkdb/horizon/pull/386, maybe that needs to be fixed somewhere else too.
It seems a bit different from #386 since in @stellanhaglund 's case Horizon never becomes ready, while #386 was just a double-close right?
Also here we seem to have a closed connection, not just a closed feed.
I get the same error on rethinkdb 2.3.2 and horizon is ready after this error twice.
horizon version 1.0.1
I was running node v6 and got the same error. After switching to v4.4.4 and reinstalling the package I no longer received the error.
Similar issue for me
I see this error on hz serve --dev:
Unhandled rejection ReqlRuntimeError: Connection is closed in:
r.db("rethinkdb").table("table_config")
The error appears 1-2 times (it varies), then the server starts with Horizon ready for connections
Environment is:
It did work perfectly yesterday on initial install.
I think there are two different issues here.
The first one is that the "Connection is closed:" exception isn't caught properly during startup. When using hz serve with --start-rethinkdb or --dev, it starts a RethinkDB server.
The server takes a while to initialize, and we repeatedly try to connect and run queries until it works (for at most 30 seconds). During this phase, errors are expected and we normally catch them and then just retry. For some reason some errors don't appear to be caught correctly.
This is something we need to fix, but is probably not critical.
The second issue is what @stellanhaglund wrote where Horizon doesn't even seem to become ready. It could be the same issue with different timing, or it could be a completely separate problem.
Finally, it is weird that we're getting this particular error "Connection is closed" in the first place, and that might be for a similar reason as https://github.com/rethinkdb/horizon/pull/386 like @mlucy mentioned. Though regardless of why we're getting this error, we should still probably catch and handle it during initialization.
The same issue here. OS X 10.11.5 [email protected]
โ one hz serve --dev
App available at http://127.0.0.1:8181
RethinkDB
โโโ Admin interface: http://localhost:50637
โโโ Drivers can connect to port 50636
Starting Horizon...
Unhandled rejection ReqlRuntimeError: Connection is closed in:
r.db("rethinkdb").table("table_config").filter({"db": "one"}).pluck("name", "indexes").changes({"squash": true, "includeInitial": true, "includeStates": true, "includeTypes": true})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at ReqlRuntimeError.ReqlError [as constructor] (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:23:13)
at new ReqlRuntimeError (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:90:51)
at mkErr (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:177:10)
at Feed.IterableResult._addResponse (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/cursor.js:75:27)
at TcpConnection.<anonymous> (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:360:22)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:26:16)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:783:43)
at wrappedCb (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:270:17)
at tryCatcher (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/util.js:26:23)
at Promise.successAdapter (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/nodeify.js:23:30)
at Promise._settlePromiseAt (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:579:21)
at Promise._settlePromises (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:15:14)
at tryOnImmediate (timers.js:543:15)
Unhandled rejection ReqlRuntimeError: Connection is closed in:
r.db("rethinkdb").table("table_config").filter({"db": "one"}).pluck("name", "indexes").changes({"squash": true, "includeInitial": true, "includeStates": true, "includeTypes": true})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at ReqlRuntimeError.ReqlError [as constructor] (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:23:13)
at new ReqlRuntimeError (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/errors.js:90:51)
at mkErr (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:177:10)
at Feed.IterableResult._addResponse (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/cursor.js:75:27)
at TcpConnection.<anonymous> (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:360:22)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/util.js:26:16)
at TcpConnection.cancel (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:783:43)
at wrappedCb (/usr/local/lib/node_modules/horizon/node_modules/rethinkdb/net.js:270:17)
at tryCatcher (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/util.js:26:23)
at Promise.successAdapter (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/nodeify.js:23:30)
at Promise._settlePromiseAt (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:579:21)
at Promise._settlePromises (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/horizon/node_modules/bluebird/js/main/async.js:15:14)
at tryOnImmediate (timers.js:543:15)
error: rethinkdb stderr: error: Ignoring missing branch `8c459727-6b44-4661-95b0-5f4815e958b9`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
error: rethinkdb stderr: error: Ignoring missing branch `247c0239-ebea-4dca-ad4f-6be6aaec7314`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
error: rethinkdb stderr: error: Ignoring missing branch `abc6d065-c6d9-4154-8144-4574b316d516`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
error: rethinkdb stderr: error: Ignoring missing branch `73e30271-3795-4405-9e47-8343329f2e3b`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
error: rethinkdb stderr: error: Ignoring missing branch `87a68adc-2c9b-42a3-8085-6357b0145bf6`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
error: rethinkdb stderr: error: Ignoring missing branch `6b1e1857-c3a8-4c05-94cd-6b68ff25ce5a`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
error: rethinkdb stderr: error: Ignoring missing branch `0917cf19-91b1-4d07-a571-d6fde9bd8f97`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
error: rethinkdb stderr: error: Ignoring missing branch `dfbb2717-2ae6-4a96-a84d-5268b6775a16`. This probably means that there is a bug in RethinkDB. Please report this at https://github.com/rethinkdb/rethinkdb/issues/
Horizon ready for connections ๐
I was getting this error repeatedly with Horizon v1.0.1, RethinkDB v2.3.0, Node v6.2.0, and the Horizon server would never actually start. Switching to RethinkDB v2.3.2 caused the error to show a single time, then the server would start. Then, switching to node v4.4.4, as @kreas mentioned, caused _no errors_ to show on serve, and the server started as expected.
In conclusion, here's the setup that got me going without errors:
Horizon v1.0.1
RethinkDB v2.3.2
Node v4.4.4
The "Connection is closed" issue before Horizon becomes ready was fixed in Horizon 1.0.2.
RethinkDB 2.3.0 had a separate bug that made it crash during Horizon's startup.
So the original issue is now fixed.
@stellanhaglund Have you seen the problem with Horizon not becoming ready again? Can you upgrade to Horizon 1.0.2 (or 1.0.3 actually) and see if any issue still persists?
With all of the changes in the server for 2.0.0 we should verify this is still happening