Configuring self hosted runner on Win 2012R2

I’m trying to install/configure a self hosted runner on a Windows Server 2012R2 machine.

I was able to install/configure the Actions runner locally, although I’m unable to run the ./config.cmd command on the server - so I’m certain that it’s an environment issue (logs below).

Things to note:

  • the logs from the installer didn’t provide any meaningful information to point me in the right direction (just “No connection could be made because the target machine actively refused it.”, it would be great to know why it was refused
  • checked with sysadmin – the server shouldn’t need proxy settings
  • ran fiddler on local machine and captured urls that installer calls → was able to call them on the server without proxy settings e.g. api.github.com, githubusercontent.com
  • in PowerShell ran the below command to set tls 1.2 – no luck
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Is there anyway to get more logging? e.g. validate that it isn’t a tls issue?
Or is this a user error and there are other things to validate/check

[2021-07-08 01:34:25Z INFO HostContext] No proxy settings were found based on environmental variables (http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY)
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Root': 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO HostContext] Well known config file 'Credentials': 'C:\actions-runner\.credentials'
[2021-07-08 01:34:25Z INFO Listener] Runner is built for Windows (X64) - win-x64.
[2021-07-08 01:34:25Z INFO Listener] RuntimeInformation: Microsoft Windows 6.3.9600.
[2021-07-08 01:34:25Z INFO Listener] Version: 2.278.0
[2021-07-08 01:34:25Z INFO Listener] Commit: 62d926efce35d3ea16d7624a25aaa5b300737def
[2021-07-08 01:34:25Z INFO Listener] Culture: en-AU
[2021-07-08 01:34:25Z INFO Listener] UI Culture: en-US
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Root': 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO Listener] Validating directory permissions for: 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO CommandLineParser] Parse
[2021-07-08 01:34:25Z INFO CommandLineParser] Parsing 5 args
[2021-07-08 01:34:25Z INFO CommandLineParser] parsing argument
[2021-07-08 01:34:25Z INFO CommandLineParser] HasArgs: False
[2021-07-08 01:34:25Z INFO CommandLineParser] Adding Command: configure
[2021-07-08 01:34:25Z INFO CommandLineParser] parsing argument
[2021-07-08 01:34:25Z INFO CommandLineParser] HasArgs: True
[2021-07-08 01:34:25Z INFO CommandLineParser] arg: url
[2021-07-08 01:34:25Z INFO CommandLineParser] parsing argument
[2021-07-08 01:34:25Z INFO CommandLineParser] HasArgs: True
[2021-07-08 01:34:25Z INFO CommandLineParser] Adding option 'url': 'https://github.com/nslhsd-radonc/RAC2ER'
[2021-07-08 01:34:25Z INFO CommandLineParser] parsing argument
[2021-07-08 01:34:25Z INFO CommandLineParser] HasArgs: True
[2021-07-08 01:34:25Z INFO CommandLineParser] arg: token
[2021-07-08 01:34:25Z INFO CommandLineParser] parsing argument
[2021-07-08 01:34:25Z INFO CommandLineParser] HasArgs: True
[2021-07-08 01:34:25Z INFO CommandLineParser] Adding option 'token': '***'
[2021-07-08 01:34:25Z INFO Listener] Arguments parsed
[2021-07-08 01:34:25Z INFO Runner] ExecuteCommand
[2021-07-08 01:34:25Z INFO ConfigurationStore] currentAssemblyLocation: C:\actions-runner\bin\Runner.Listener.dll
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO ConfigurationStore] binPath: C:\actions-runner\bin
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Root': 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO ConfigurationStore] RootFolder: C:\actions-runner
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Root': 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO HostContext] Well known config file 'Runner': 'C:\actions-runner\.runner'
[2021-07-08 01:34:25Z INFO ConfigurationStore] ConfigFilePath: C:\actions-runner\.runner
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Root': 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO HostContext] Well known config file 'Credentials': 'C:\actions-runner\.credentials'
[2021-07-08 01:34:25Z INFO ConfigurationStore] CredFilePath: C:\actions-runner\.credentials
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Root': 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO HostContext] Well known config file 'MigratedCredentials': 'C:\actions-runner\.credentials_migrated'
[2021-07-08 01:34:25Z INFO ConfigurationStore] MigratedCredFilePath: C:\actions-runner\.credentials_migrated
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Bin': 'C:\actions-runner\bin'
[2021-07-08 01:34:25Z INFO HostContext] Well known directory 'Root': 'C:\actions-runner'
[2021-07-08 01:34:25Z INFO HostContext] Well known config file 'Service': 'C:\actions-runner\.service'
[2021-07-08 01:34:25Z INFO ConfigurationStore] ServiceConfigFilePath: C:\actions-runner\.service
[2021-07-08 01:34:25Z INFO CommandSettings] Flag 'help': 'False'
[2021-07-08 01:34:25Z INFO CommandSettings] Flag 'version': 'False'
[2021-07-08 01:34:25Z INFO CommandSettings] Flag 'commit': 'False'
[2021-07-08 01:34:25Z INFO CommandSettings] Flag 'check': 'False'
[2021-07-08 01:34:25Z INFO CommandSettings] Command 'configure': 'True'
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: 
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: --------------------------------------------------------------------------------
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: |        ____ _ _   _   _       _          _        _   _                      |
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: |       / ___(_) |_| | | |_   _| |__      / \   ___| |_(_) ___  _ __  ___      |
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: |      | |  _| | __| |_| | | | | '_ \    / _ \ / __| __| |/ _ \| '_ \/ __|     |
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: |      | |_| | | |_|  _  | |_| | |_) |  / ___ \ (__| |_| | (_) | | | \__ \     |
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: |       \____|_|\__|_| |_|\__,_|_.__/  /_/   \_\___|\__|_|\___/|_| |_|___/     |
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: |                                                                              |
[2021-07-08 01:34:25Z INFO Terminal] WRITE: |                       
[2021-07-08 01:34:25Z INFO Terminal] WRITE: Self-hosted runner registration
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE:                         |
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: |                                                                              |
[2021-07-08 01:34:25Z INFO Terminal] WRITE LINE: --------------------------------------------------------------------------------
[2021-07-08 01:34:25Z INFO ConfigurationManager] ConfigureAsync
[2021-07-08 01:34:25Z INFO ConfigurationStore] IsConfigured()
[2021-07-08 01:34:25Z INFO ConfigurationStore] IsConfigured: False
[2021-07-08 01:34:25Z INFO ConfigurationManager] Is configured: False
[2021-07-08 01:34:25Z INFO CommandSettings] Arg 'url': 'https://github.com/nslhsd-radonc/RAC2ER'
[2021-07-08 01:34:25Z INFO CommandSettings] Remove url from Arg dictionary.
[2021-07-08 01:34:25Z INFO CommandSettings] Arg 'token': '***'
[2021-07-08 01:34:25Z INFO CommandSettings] Remove token from Arg dictionary.
[2021-07-08 01:34:26Z ERR  Runner] System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it.
 ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at GitHub.Runner.Listener.Configuration.ConfigurationManager.GetTenantCredential(String githubUrl, String githubToken, String runnerEvent)
   at GitHub.Runner.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command)
   at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command)
[2021-07-08 01:34:26Z ERR  Runner] #####################################################
[2021-07-08 01:34:26Z ERR  Runner] System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
[2021-07-08 01:34:26Z ERR  Terminal] WRITE ERROR: No connection could be made because the target machine actively refused it.
[2021-07-08 01:34:26Z INFO Listener] Runner execution has finished with return code 1