openstf / stf

Control and manage Android devices from your browser.
https://openstf.io
Other
13.38k stars 2.79k forks source link

How to connect remote rethinkdb ? #122

Closed LiufxLucky365 closed 9 years ago

LiufxLucky365 commented 9 years ago

I try to let my STF server connect to a remote rethinkdb, but I have not found the right option. Everybody who knows that ?

Thanks.

sorccu commented 9 years ago

With environment variables: https://github.com/openstf/stf/blob/master/lib/db/index.js#L16

LiufxLucky365 commented 9 years ago

Yes, thanks. I just find that.

Another small question, if i change the nodejs code under '/usr/local/lib/node_modules/stf/', and restart the STF, do the change code work ?

Thanks.

sorccu commented 9 years ago

If it's server-side code, then yes.

On Thursday, 15 October 2015, LiufxLucky365 notifications@github.com wrote:

Yes, thanks. I just find that.

Another small question, if i change the nodejs code under '/usr/local/lib/node_modules/stf/', and restart the STF, do the change code work ?

Thanks.

— Reply to this email directly or view it on GitHub https://github.com/openstf/stf/issues/122#issuecomment-148258287.

LiufxLucky365 commented 9 years ago

Thanks for your help.

I try to start remote rethinkdb like this:

rethinkdb --http-port xxxx --bind xxx.xxx.xxx.xxx --driver-port 9901

and the rethinkdb response:

Server ready, "liufuxinlucky365" ea74d40e-6ff0-46ee-a90e-0d9db54ad4ed

and i start stf like this:

    export RETHINKDB_PORT_28015_TCP='tcp://xxx.xxx.xxx.xxx:9901'
    stf local --allow-remote

response:

    INF/db 2690 [*] Connecting to xxx.xxx.xxx.xxx:9901
    FTL/db 2690 [*] Could not connect to xxx.xxx.xxx.xxx:9901, operation timed out.

but it seems that stf doesn't connect successfully. Have you ever try this feature ?

sorccu commented 9 years ago

Yes, it's being used all the time because that's what the official deployment guide uses (although docker sets the environment variable). My best guess is that your firewall is blocking that port. Might want to check your iptables, ipfw or similar.

LiufxLucky365 commented 9 years ago

That should be what you say. I change my port to 8999, and local can connect successfully.

Thanks for your help.