EC2 AMI Timing Out

When trying to run WPT using the API, I get the following error:

error: Error running WebPageTest: { error: 
   { code: 'TIMEOUT',
     testId: '150718_00_078e53de08ac0393b97c3bf965576a1d',
     message: 'timeout' } }

I have no idea what I’m doing right and what I’m doing wrong so any help would be useful. Here is my locations.ini file:

; This is a sample locations.ini that includes all of the EC2 locations, AMI's
; and user data strings necessary to spin up testing using EC2 test agents

; IMPORTANT: Make sure to change the wpt_server to point to your private WPT instance
;            and replace SecretKey with a unique secret string (alphanumeric, no whitespace)

[locations]
1=us-east-1
2=us-west-1
3=us-west-2
4=eu-west-1
5=ap-northeast-1
6=ap-southeast-1
7=ap-southeast-2
8=sa-east-1
default=us-east-1



; **********************************
; ****** 1 - us-east-1         *****
; ****** US East (N. Virginia) *****

[us-east-1]
1=us-east-1_IE7
2=us-east-1_IE8
3=us-east-1_wptdriver
label="US East (N. Virginia)"
lat=38.954980
lng=-77.447956
default=us-east-1_wptdriver

[us-east-1_IE7]
AMI: ami-fe689397
user-data: wpt_server=INSTANCE_IP wpt_key=PRIVATE_KEY wpt_location=us-east-1_IE7
browser=IE 7
latency=0
label="US East (N. Virginia) - IE7"
;key=SecretKey

[us-east-1_IE8]
AMI: ami-406f9429
user-data: wpt_server=INSTANCE_IP wpt_key=PRIVATE_KEY wpt_location=us-east-1_IE8
browser=IE 8
latency=0
label="US East (N. Virginia) - IE8"
;key=SecretKey

[us-east-1_wptdriver]
AMI: ami-561cb13e
user-data: wpt_server=INSTANCE_IP wpt_key=PRIVATE_KEY wpt_location=us-east-1_wptdriver
browser=Chrome,Firefox,Safari,IE 11
latency=0
label="US East (N. Virginia)"
;key=SecretKey

and my wptdriver.ini:

[WebPagetest]
; url=http://127.0.0.1/
url=http://INSTANCE_IP/
location=us-east-1_wptdriver
Time Limit=120
;key=TestKey123
;Automatically install and update support software (Flash, Silverlight, etc)
software=http://www.webpagetest.org/installers/software.dat
; Optional credentials
; username=user
; password=mypassword
; Optional: only applies if the scheme of the URL is https.
; Check if the CN of the WPT server SSL certificate matches the host in the url parameter, and if the certificate has expired.
; Default is '0', which disables these checks.
; Valid Certificate=1

[Chrome]
exe="%PROGRAM_FILES%\Google\Chrome\Application\chrome.exe"
options='--load-extension="%WPTDIR%\extension" --user-data-dir="%PROFILE%" --no-proxy-server'
installer=http://www.webpagetest.org/installers/browsers/chrome.dat

[Firefox]
exe="%PROGRAM_FILES%\Mozilla Firefox\firefox.exe"
options='-profile "%PROFILE%" -no-remote'
installer=http://www.webpagetest.org/installers/browsers/firefox.dat
template=firefox

[Safari]
exe="%PROGRAM_FILES%\Safari\Safari.exe"

[IE]
exe="%PROGRAM_FILES%\Internet Explorer\iexplore.exe"

I run it via sitespeed.io which triggers the following command:

Running WebPageTest http://www.example.com/ pollResults=10, timeout=600, firstViewOnly=false, runs=3, private=true, aftRenderingTime=true, location=us-east-1:wptdriver, connectivity=Cable, video=true

Can anyone suggest what I’m doing wrong? Thanks!

I’m helping mrhappystein out with this and we noticed earlier today that the WPT test agents are being launched without an external IP. If I manually add an external elastic IP to the test agent then the private instance works fine.

Is there a way in the configuration to tell the master instance to automatically assign an external IP to the test agents? Or preferably, is there a way to tell the master instance to communicate with the test agents via their internal IP?

The agents poll the server for work so the server doesn’t need to know their IP’s but they do need to be able to reach the server.

There is a “host” setting in settings.ini that can be used to tell the agents what to use for the server hostname/IP: webpagetest/settings.ini.sample at master · WPO-Foundation/webpagetest · GitHub