Comments (7)
@denis99999,
Sorry for not providing complete configuration in advance.
After fixing some network problems, it turned out that your solution, mapping ports
for dev-triproxy
, solved the problem.
Now it works perfectly and thank you again.
from stf.
Issue-Label Bot is automatically applying the label question
to this issue, with a confidence of 0.93. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
from stf.
@jay0129 ,
I have a dockerized setup using the script from stf-poc on a machineA
It is not part of DeviceFarmer/ STF documentation.
I am trying to attach machineB to machineA, but I am having trouble, please help me.
Please describe in detail the issue you met ? What is working and what is not working ?
1. Is it enough to just run or install `stf-provider` and `adb` on machineB?
Yes
2. For the command `stf provider` from machineB, should I pass `--public-ip` with machineA's IP or machineB's IP?
machineA's IP
3. For the command `stf provider` from machineB, should I pass `screen-ws-url-pattern` with machineA's IP and stations name?
Yes, it seems correct, in fact, it must match the location URL pattern you provided in nginx.conf
file.
4. STF is already running on machineA, should I restart machineA after attaching machineB to it? I am wondering the sequence of these kinds of operations
No need to restart machineA, but if you modified the nginx.conf
file you have perhaps to restart nginx
unit.
nginx.conf on machineA:
location ~ "^/d/machineA/([^/]+)/(?<port>[0-9]{3,5})/$" { proxy_pass http://provider:$port/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; } location ~ "^/d/machineB/([^/]+)/(?<port>[0-9]{5})/$" { proxy_pass http://${MACHINE_B_IP}:$port/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; }
For more information, you can see full nginx.conf here
The location URL for machineB seems correct expected that the STATION_NAME
variable at provider side is equal to machineB
.
docker-compose.yml on machineA:
Same as here with few changes including auth-ldap
You have also to include the groups-engine
unit, report to DEPLOYMENT.md
for help!
from stf.
Thanks for your help.
I followed all your instructions including groups-engine unit, but it still shows nothing about machineB on the STF web console.
I did these things additionally:
- Use 7400~7500 ports for machineA's provider
- Use 7501~7700 ports for machineB's provider
Console logs on machineB:
Creating network "stfbox_default" with the default driver
WARNING: Found orphan containers (stfbox_dev-triproxy_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Creating stfbox_adb_1 ... done
Creating stfbox_provider_1 ... done
Attaching to stfbox_adb_1, stfbox_provider_1
adb_1 | adb I 09-16 01:03:50 6 6 adb_auth_host.cpp:416] adb_auth_init...
adb_1 | adb I 09-16 01:03:50 6 6 adb_auth_host.cpp:174] read_key_file '/root/.android/adbkey'...
adb_1 | adb I 09-16 01:03:50 6 6 adb_auth_host.cpp:391] adb_auth_inotify_init...
provider_1 | 2020-09-16T01:03:53.201Z INF/provider 1 [*] Subscribing to permanent channel "xxxxxx"
provider_1 | 2020-09-16T01:03:53.221Z INF/provider 1 [*] Sending output to "tcp://MACHINE_A_IP:7270"
provider_1 | 2020-09-16T01:03:53.223Z INF/provider 1 [*] Receiving input from "tcp://MACHINE_A_IP:7250"
provider_1 | 2020-09-16T01:03:53.228Z INF/provider 1 [*] Tracking devices
provider_1 | 2020-09-16T01:03:53.230Z INF/provider 1 [*] Found device "HT7BR1Axxxxx" (device)
I dought about the internet connection between each machines, so I have tested these for all ports from 7400 to 7700.
Test result:
On machineA side
nc -l 7400
On machineB side
echo "hello" | nc ${MACHINE_A_IP} 7400
Message is sendable, but the connection is closed right after the message transmission
On machineB side
nc -l 7400
On machineA side
echo "hello" | nc ${MACHINE_B_IP} 7400
Message is sendable, and the connection is still opened
Additional question:
Following unit seems not running on machineA.
https://github.com/DeviceFarmer/stf/blob/master/doc/DEPLOYMENT.md#rethinkdb-proxy-28015service
Didn't I need to run rethinkdb-proxy on machineA?
I feel like there is no rethinkdb-proxy in my implementation, I followed this docker-compose.yml on machineA.
from stf.
I followed all your instructions including groups-engine unit, but it still shows nothing about machineB on the STF web console.
Adding groups-engine
unit is not to solve your issue but to reach a correct and complete configuration.
I did these things additionally:
1. Use 7400~7500 ports for machineA's provider 2. Use 7501~7700 ports for machineB's provider
Fyi, you can keep the same port range for the two providers beacuse they are running on two distinct machines.
It seems your provider
unit on machineB is unable to reach the dev-triproxy
unit on machineA, it is probably because the corresponding ports are not opened, so you have to add the following mapping port for dev-triproxy
unit:
...
ports:
- "7250:7250"
- "7270:7270"
...
Like this, it should work better!
Didn't I need to run rethinkdb-proxy on machineA?
No need because all the main units are on the same machine.
from stf.
Thanks for your answer!
However, I can't fix the problem, with same console logs.
I realized that machineB was inside Virtualbox on a top of OSX.
Since I am using NAT, I forwarded 7400~7700 and 7250,7260,7270,7150,7160,7160.
Additionally 3000.
Is there any other ports I am missing to forward? I guess 7250 and 7270 is enough.
I did this also:
I changed provider's name on machineB to provider_bs2, since I thought same provider's name probably made this problem.
Do I have to add the following mapping port for provider
unit of machineB?:
ports:
- 7250:7250
- 7270:7270
from stf.
@jay0129 ,
So far you have not provided your own complete configuration, nor your complete logs, but you only referred to an STF configuration template which is not part of the DeviceFarmer / STF documentation, so that I no longer understand your execution environment, under these conditions it is very difficult for me to help you further.
from stf.
Related Issues (20)
- Still getting could not be assigned a valid UID HOT 5
- How to set up to login by password/SSO? HOT 1
- When deploying docker containers [email protected] HOT 1
- I can't find a way to change 'STF_ADMIN_EMAIL' HOT 5
- Android 15 and Android 14 with latest patch issue HOT 4
- All app minimize on stop controlling HOT 2
- realme device Model RMX3867 Android version 14 HOT 17
- After an exception occurs, stf cannot search for the device, and docker needs to restart stf
- Clarification Needed on Device Status Mapping for Integration with External Systems
- Realme device with android 14 is not able to connect to touch service HOT 1
- Bypass the login page
- Regression errors on bluetooth features ! HOT 10
- REST API documentation consistency improvements HOT 2
- is it possible to connect an android device with different network then the stf server ? HOT 1
- Google devices - Missing resources/unknown minicap grabber: minicap-bin HOT 13
- Setup had an error PrematureEOFError: Premature end of stream, needed 1 more bytes HOT 2
- STF clock time HOT 1
- STF in iframe HOT 2
- how to get android page resource by stf HOT 5
- The device is disconnected after 'adb shell stop' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stf.