Troubleshooting Proxmox: Couldn't Resolve SRV Record for Cloudflared Tunnel Agent
If you're trying to install the Cloudflared Tunnel Agent on your Proxmox server, but are encountering the error "Couldn't resolve SRV record &{region1.v2.argotunnel.com.784411}: lookup", this article is for you. We'll explain the issue and provide solutions to help you get up and running with the Cloudflared Tunnel Agent on your Proxmox server.
Understanding the Error
Before we dive into the solutions, it's important to understand what this error means. When you try to install the Cloudflared Tunnel Agent, it needs to resolve a specific SRV record to set up the connection. If it can't resolve this record, it will throw the "Couldn't resolve SRV record" error. In this particular error, the SRV record it's trying to resolve is "{region1.v2.argotunnel.com.784411}".
Checking DNS Resolution
The first step in troubleshooting this issue is to check if your DNS resolution is working correctly. You can do this by running the command:
dig {region1.v2.argotunnel.com. IN SRVThis command queries your DNS resolver for the SRV record in question. If you get a response, it means your DNS resolution is working correctly. However, if you get an error or no response, it means your DNS resolution is not working properly. In this case, you need to check your DNS server configuration and ensure that it is set up correctly.
Checking Cloudflare Configuration
Another common cause of this issue is incorrect Cloudflare configuration. Ensure that the following items are properly configured:
- Cloudflare nameservers are properly set up for your domain.
- The Tunnel record is properly configured in your Cloudflare dashboard.
- You have enabled the appropriate Cloudflare features for your domain (e.g. Access, Argo, etc.).
Checking Proxmox Firewall Rules
Firewall rules on your Proxmox server can also interfere with DNS resolution. Ensure that your firewall rules allow outgoing DNS traffic on port 53 and that the required Cloudflare ports are open (e.g. 7844, 7843). You can check your firewall rules with the command:
iptables -LWorkaround: Manually Specifying the Tunnel Record
If none of the above solutions work, you can try specifying the Tunnel record manually. This workaround involves editing the Cloudflared Tunnel Agent configuration file and manually specifying the Tunnel record. You can do this with the following command:
sudo nano /etc/cloudflared/config.ymlThen, add the following configuration:
tunnel: { "region1.v2.argotunnel.com:784411" }Save the configuration file and restart the Cloudflared Tunnel Agent service.
References
- Cloudflare Documentation: Connect apps with Cloudflare Tunnel