bbc / hive-runner-android

Android module for Hive Runner
MIT License
6 stars 2 forks source link

Cannot register devices if Hive Mind isn't available #76

Closed jonpwilson closed 8 years ago

jonpwilson commented 8 years ago

Started locally on my machine, I have Hive Scheduler but no Hive Mind instance. The runner is attempting to register the devices as though Hive Mind is available:

I 2016-09-27 09:21:08: Checking controller Hive::Controller::Android
D 2016-09-27 09:21:10: Sysname: Darwin
D 2016-09-27 09:21:10: Release: 16.1.0
I 2016-09-27 09:21:10: No Hive Mind connection
D 2016-09-27 09:21:10: Sysname: Darwin
D 2016-09-27 09:21:10: Release: 16.1.0
D 2016-09-27 09:21:10: Error: Failed to open TCP connection to localhost:3001 (Connection refused - connect(2) for "localhost" port 3001)
D 2016-09-27 09:21:10: Sysname: Darwin
D 2016-09-27 09:21:10: Release: 16.1.0
D 2016-09-27 09:21:10: Sysname: Darwin
D 2016-09-27 09:21:10: Release: 16.1.0
D 2016-09-27 09:21:10: Sysname: Darwin
D 2016-09-27 09:21:10: Release: 16.1.0
I 2016-09-27 09:21:10: Device registered: {"error"=>"Failed to open TCP connection to localhost:3001 (Connection refused - connect(2) for \"localhost\" port 3001)"}

As a result, the worker is not showing up in the scheduler.

Additionally, the error with registering the device with Hive Mind isn't being captured properly (i.e. it shouldn't be hitting this line)