Private WPT Agent instance in AWS - have to give a kick every day

Hi all,

I have setup a Win Server 2016 WPT agent in AWS Ireland region, based on latest AMI.

I have set ‘Disable Termination’ to True, so our WPT Server cannot kill it. This means that our server is not destroyed/created daily, and we are rolling with my custom EC2 instance each day (the reason for this is that it is assigned a static IP that has been firewall whitelisted to access our UAT environment, which is not wider public facing).

We are using a C5.Xlarge. The server is on every Monday to Friday, 9am to 5pm.

It has been a bit flakey recently, in that the Agent does not always register itself with the Server. The ‘fix’ has been to simply RDP on to the Agent, and this fixes it (we are also doing a daily service nginx restart).

I am looking at the scripts that run when a user logs on, and I can see two in the Task Scheduler:

  • rdp-startup runs when Administrator logs on - this simply launches an RDP console connecting to localhost
  • wptagent runs when webpagetest user logs on (not a user we have access to) and this calls the script c:\webpagetest\agent.cmd

I want to understand what controls the webpagetest user (presumably the WPT Server).

I want to try and automate the kick I give it, and have modified the scheduled task for the Administrator user to run every morning too, to save me having to logon.

If anyone has any other pointers that would be much appreciated.

I’ve had this problem too. It appeared to me that the self-signed SSL certificate on the old Windows AMI is not being recognized when RDP autoruns for the webpagetest user. I’ve had to RDP to the Administrator session and manually click the “Accept certificate” warning on the RDP client. Then the webpagetest user will log in properly and the agent will start. If you set the termination protection, you can check the “Always trust this certificate” box and it shouldn’t complain anymore, but if you want to use autoscaling that’s not going to work. The Public AMI needs to be updated to handle this.

Also note that if you want to use Edge for any tests, it will not work on Server 2016.

Thanks for the reply - I’ve not had to do that in my instance…

I seem to have sorted it though - the scheduled task that runs when Administrator logs on is now set to run at system startup, irrespective of whether or not the user is logged on (by default it is set to only run if user is logged on). It worked this morning, so will keep an eye on it over next few days.