How to troubleshoot the connection failure to user-id Terminal Server Agent
Objective
To troubleshoot, or identify possible root cause, and restore Terminal Server Agent's connection.
Environment
- Palo Alto Firewall
- Terminal Server Agent (TSA)
Procedure
1. Check which TS-agent is disconnected from the firewall:
- By using the CLI command:
> show user ts-agent statistics
Look for the connection in the "not-conn" state.
- By searching the system logs using the CLI:
> show log system direction equal backward subtype equal "userid"
Look for the messages that have the Description starting with "TS-Agent".
2. Verify that the NTP state is in sync (especially needed for certificate authentication).
- In the firewall, execute the command below
> show ntp
- Verify the NTP state of the device hosting the TSA.
3. Verify that DNS can resolve the FQDN of the TSA.
> ping host tsa1.paloaltonetworks.com
4. If the IP address was used as a host to point the firewall to the TSA host, make sure to use only the IP address form of a.b.c.d instead of a.b.c.d/32. To confirm, go to the firewall's UI: Device> User Identification > Terminal Server Agent > click on the appropriate TSA config.
5. TSA agent listens to port 5009. Ensure that TCP port 5009 is open between the firewall and TSA. If you change this Port number on which the agent will listen for user mapping requests on the firewall, you must also change the Listening Port on the Terminal Server agent "Configure" dialog to the same port.
6. Confirm that there is network connectivity between the firewall and the User-ID TSA agent. You can do this by testing connectivity using tools like ping or traceroute from both ends. Perform packet captures on both the firewall and the server running the User-ID TSA agent to capture traffic related to the connection attempt. Analyze the captured packets to identify any anomalies or issues.
- If the management port is used and having issues, please use HOW TO TROUBLESHOOT CONNECTIVITY ISSUES ON MANAGEMENT INTERFACE?
- If the data plane port is used and is having issues, please use GETTING STARTED: PACKET CAPTURE
7. Disable any Sophos antivirus software on the TSA host. Third-party security software may interfere with the port rebinding process. Test with it disabled, especially if driver errors are seen in the debug logs of the TSA agent. Refer to How to Troubleshoot Terminal Server Agent Problems.
8. If a certificate is used for authentication, check certificate expiration on the firewall and agent:
- For a firewall expired certificate, use HOW TO RENEW OR REPLACE AN EXPIRED CERTIFICATE
- For the TSA expired certificate, use Configure the Palo Alto Networks Terminal Server (TS) Agent for User Mapping
9. Remove TSA hosts configured in the firewall that are offline/decommissioned. This requires the firewall to connect to a non-existent TSA and consumes unnecessary resources that may affect existing ones.
10 Confirm that the host where TSA is installed is supported, using the TSA compatibility matrix.
11. Analyze the logs on both the firewall and the User-ID TSA agent for any error messages or warnings related to the connection attempt. Look for indications of connection timeouts, authentication failures, or other issues. For the firewall, use the CLI command:
> less mp-log useridd.log
12. As a last resort and if all of the above checks don't address the issue, try restarting the user-id and devsrvr daemons during a maintenance window.
- restart useridd
> debug software restart process user-id
- restart device-server
> debug software restart process device-server
- Commit force
# configure # commit force # exit
Additional Information
Error: Failed to connect to User-ID-Agent at x.x.x.x(x.x.x.x):5009
How to Install and Configure Terminal Server Agent
How to Troubleshoot Terminal Server Agent Problems