Summary
Activation server is rejecting the request from the machine as it cannot identify the source of the request, causing a failure in activating said machine. Refer to the following error:
"CHTTPClient:: ReadStatus() - connection closed before status line was received."
Below are agent logs showing successful activation:
2022-10-22 04:33:47.641606 [+0000]: [dsa.ListenThread/5] | Incoming connection on interface :::4118 | dsa/ListenThread.lua:105:fn | 499:7FD0DA277640:dsa.ListenThread
2022-10-22 04:33:47.641744 [+0000]: [dsa.ListenThread/5] | Accepted connection from ::<localhost>:<ephemeral port> socket=9 | dsa/ListenThread.lua:128:fn | 499:7FD0DA277640:dsa.ListenThread
2022-10-22 04:33:47.653996 [+0000]: [Cmd/5] | Got HTTP command 'ActivateAgent' with params 'host=<activation_URL>&port=443'. loopback=true, utility=true, devel=false, restricted=true, manager=false | dsa/ConnectionHandler.lua:996:(null) | 499:7FD0D8BCE640:ConnectionHandlerPool_0001
2022-10-22 04:33:47.654171 [+0000]: [Cmd/5] | Received command ActivateAgent | dsa/ConnectionHandler.lua:1440:LogDsmCommand | 499:7FD0D8BCE640:ConnectionHandlerPool_0001
2022-10-22 04:33:47.732260 [+0000]: [dsa.Heartbeat/5] | _init() | dsa/Heartbeat.lua:112:_init | 499:7FD0D8ACD640:ActivateThread
2022-10-22 04:33:47.732480 [+0000]: [dsa.Activate/5] | start of activation>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | dsa/Activate.lua:172:main | 499:7FD0D8ACD640:ActivateThread
Below are agent logs showing activation failure:
2022-10-22 02:25:34.952855 [+0000]: [dsa.ListenThread/5] | Incoming connection on interface :::4118 | dsa/ListenThread.lua:105:fn | 1754:1728:dsa.ListenThread
2022-10-22 02:25:34.952855 [+0000]: [dsa.ListenThread/5] | Accepted connection from ::ffff:<IP_Address_machine>:<ephemeral port> socket=224 | dsa/ListenThread.lua:128:fn | 1754:1728:dsa.ListenThread
2022-10-22 02:25:34.999738 [+0000]: [Info/5] | A peer using our certifcate tried to connect remotely. Ignoring connection from ::ffff:<IP_Address_machine>:<ephemeral port>. | dsa/ConnectionHandler.lua:1346:HandleCommandSession | 1754:1A0C:ConnectionHandlerPool_0001
Note that the correct sequence should be:
- Incoming connecting in port 4118
- Accepted connection by localhost (::1 or 127.0.0.1):4118
- Received command for ActivateAgent
- Start of activation
This issue ussually occurs when dsa_control command utility returns CHTTPClient:: ReadStatus() - connection closed before status line was received error message for every option you are using.
To resolve this:
- Edit the host file make sure the following lines are present and uncommented out:
127.0.0.1 localhost
::1 localhost
Directories for host file:
/etc/hosts - for Linux
%systemroot%\System32\drivers\etc\hosts - for Windows
- Save the host file.
- Activate the agent again.
You may also activate the agent without editing the host file using the following command:
cd C:\Program Files\Trend Micro\Deep Security Agent\
dsa_control -g https://127.0.0.1:4118/ -a <activation command>