WPTAgent Not Run

Hello,

I installed webpagetest version 17 on ubuntu server 16.04. I’m running it with nginx and the interface appears normally, but the values of the test location and browser fields are blank.

I logged into the wptagent folder and ran the ubuntu_install.sh file, then ran the wptagent.py file. The output of the terminal is as follows:

fatal: Not a git repository (or any of the parent directories): .git
Python 2.7.12
Modern traceroute for Linux, version 2.0.21
Copyright (c) 2008 Dmitry Butskoy, License: GPL v2 or any later
RTNETLINK answers: File exists
RTNETLINK answers: No such file or directory
Running agent, hit Ctrl + C to exit

Even so, the options are blank, is something missing?

Note: I’m running the useragent on the same machine running the webpagetest

youll need to set up locations.ini under your the master to define a name for your agent’s location. check the samples in the ‘settings’ folder for ideas of what to place there. the default is sometimes ok.

once the locations.ini is set up, you will need to run some additional flags with wptagent.py, something along the lines of:

python wptagent.py -vv  --server http://127.0.0.1/work/ --location 
my_test_loc --log wptagent.log

if you let this run, your agent will be running. i recommend starting in screen (screen -S wptagent) and then running the command, then pressing ctrl+a+d to detatch and let it run in the background (see the screen man page for more details).

Thank you very much for your response.

I modified the locations.ini file and made the following changes to test:

[locations]
1 = Test_loc
2 = Public_Dulles
3 = USA
default = USA

[USA]
1 = PageTest
label = "USA - Chrome, Firefox"
group = North America

[PageTest]
browser = Chrome, Firefox
label = "San Francisco, CA - Chrome, Firefox"
relayServer = "http://127.0.0.1"
; relayKey = Test123
relayLocation = SanFrancisco

and I ran the wptagent:

python wptagent.py -vv --server http://127.0.0.1/work/ --location PageTest --log wptagent.log

which generated the following output in the terminal:

fatal: Not a git repository (or any of the parent directories): .git
Python 2.7.12
Modern traceroute for Linux, version 2.0.21
Copyright (c) 2008 Dmitry Butskoy, License: GPL v2 or any later
RTNETLINK answers: No such file or directory
Running agent, hit Ctrl + C to exit

In the webpagetest interface I tried to run a test by passing the url www.google.com and I got the error:

Error submitting url for testing

When checking in http: // {server} / install the agents are not connected. What do I need to do to connect them?

Note: The wepagetest is in /var/www/webpagetest and the wptagent is in /home/{user}/wptagent

The ‘relay’ options in your locations.ini are not needed, since these are used to relay a request to a different master server. there is no need in fact to set up anything in locations.ini that specifically defines an ip or logical location of the testing servers; the master only listens for inbound requests for work from the agents (which is why you define 127.0.0.1/work for your agent).

further, i’ve not been able to get grouped agents to work either, so i recommend also moving the named test agent up a level. i might recommend this locations.ini for you:

[locations]
1 = PageTest
default = PageTest

[PageTest]
browser = Chrome, Firefox
label = "San Francisco, CA - Chrome, Firefox"

run the same agent python command then, and let me know if this more basic structure works a bit better.