{"action":"closed","issue":{"url":"https://api.github.com/repos/openstf/stf/issues/84","labels_url":"https://api.github.com/repos/openstf/stf/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/openstf/stf/issues/84/comments","events_url":"https://api.github.com/repos/openstf/stf/issues/84/events","html_url":"https://github.com/openstf/stf/issues/84","id":106994523,"number":84,"title":"Clarification of websockets and provider IPs","user":{"login":"MichaelMadsen","id":657289,"avatar_url":"https://avatars.githubusercontent.com/u/657289?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelMadsen","html_url":"https://github.com/MichaelMadsen","followers_url":"https://api.github.com/users/MichaelMadsen/followers","following_url":"https://api.github.com/users/MichaelMadsen/following{/other_user}","gists_url":"https://api.github.com/users/MichaelMadsen/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelMadsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelMadsen/subscriptions","organizations_url":"https://api.github.com/users/MichaelMadsen/orgs","repos_url":"https://api.github.com/users/MichaelMadsen/repos","events_url":"https://api.github.com/users/MichaelMadsen/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelMadsen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-17T14:14:22Z","updated_at":"2015-09-17T14:48:33Z","closed_at":"2015-09-17T14:48:33Z","body":"I'm having some trouble connecting to the device video feed, having moved the provider to a separate VM (remote control works, getting blank video feed and the adb connection string is unable to connect as well). It's definitely because I am configuring wrong, and some clarification of the different IPs would be helpful for me.\r\n\r\nSo as far as I know, the files that must be configured to add a new provider are stf-provider@.service on the provider machine, and nginx.conf on the webserver.\r\nI have taken the ips of the example configuration files and added in my interpretation/questions.\r\n\r\nstf-provider@newprovider.service (running on machine with only adbd.service and a connected android device):\r\n```\r\n[Unit]\r\nDescription=STF provider\r\nAfter=adbd.service\r\nBindsTo=adbd.service\r\n\r\n[Service]\r\nEnvironmentFile=/etc/environment\r\nTimeoutStartSec=0\r\nRestart=always\r\nExecStartPre=/usr/bin/docker pull openstf/stf:latest\r\nExecStartPre=-/usr/bin/docker kill %p-%i\r\nExecStartPre=-/usr/bin/docker rm %p-%i\r\nExecStart=/usr/bin/docker run --rm \\\r\n  --name %p-%i \\\r\n  --net host \\\r\n  openstf/stf:latest \\\r\n  stf provider \\\r\n    --name \"%H/%i\" \\\r\n    --connect-sub tcp://IP_OF_DEV_TRIPROXY:7250 \\\r\n    --connect-push tcp://IP_OF_DEV_TRIPROXY:7270 \\\r\n    --storage-url https://IP_OF_STF_STORAGE_TEMP? or maybe    IP_OF_DATABASE?/ \\\r\n    --public-ip PUBLIC_IP_OF_THIS_MACHINE \\\r\n    --min-port=15000 \\\r\n    --max-port=25000 \\\r\n    --heartbeat-interval 10000 \\\r\n    --screen-ws-url-pattern \"wss://IP_OF_WEBSERVER?/d/%i/<%= serial %>/<%= publicPort %>/\"\r\nExecStop=-/usr/bin/docker stop -t 10 %p-%i\r\n```\r\n\r\n\r\nNginx.conf:\r\n```\r\n# Handle stf-provider@newprovider.service\r\n    location ~ \"^/d/newprovider/([^/]+)/(?<port>[0-9]{5})/$\" {\r\n      proxy_pass http://PUBLIC_IP_OF_PROVIDER:$port/;\r\n      proxy_http_version 1.1;\r\n      proxy_set_header Upgrade $http_upgrade;\r\n      proxy_set_header Connection $connection_upgrade;\r\n      proxy_set_header X-Forwarded-For $remote_addr;\r\n      proxy_set_header X-Real-IP $remote_addr;\r\n    }\r\n```\r\n\r\nSo in my case I have 3 machines, \r\n192.168.99.**106**: app side, running all services and webserver\r\n192.168.99.**107**: rethinkdb, running rethinkdb\r\n192.168.99.**108**: provider, running adbd.service and stf-provider\r\n\r\nAnd I'm a bit unsure where the different IPs would go. At least I haven't hit a combination that works for the video feed yet. And maybe the problem is somewhere else altogether, I'm just pressuming it must be my configuration. Websocket is getting a 504:\r\n<img width=\"1222\" alt=\"screen shot 2015-09-17 at 15 09 13\" src=\"https://cloud.githubusercontent.com/assets/657289/9935379/300fcc98-5d4e-11e5-8504-594238bf913f.png\">\r\n\r\n\r\nIf anybody could point me in the right direction it would be appreciated."}}