--- title: Troubleshoot SQL Server on Linux description: Troubleshoot SQL Server running on Linux or in a Linux container. Learn where to find information about supported features and known limitations. author: VanMSFT ms.author: vanto ms.reviewer: randolphwest ms.date: 02/24/2022 ms.service: sql ms.subservice: linux ms.topic: troubleshooting --- # Troubleshoot [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] on Linux [!INCLUDE [SQL Server - Linux](../includes/applies-to-version/sql-linux.md)] This article describes how to troubleshoot [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] running on Linux or in a Linux container. When troubleshooting [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] on Linux, remember to review the supported features and known limitations in the [SQL Server on Linux Release Notes](sql-server-linux-release-notes-2017.md). For answers to frequently asked questions, see the [SQL Server on Linux FAQ](sql-server-linux-faq.yml). ## Troubleshoot connection failures If you have difficulty connecting to your Linux [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] instance, there are a few things to check. - If you're unable to connect locally using **localhost**, try using the IP address 127.0.0.1 instead. It's possible that **localhost** isn't properly mapped to this address. - Verify that the server name or IP address is reachable from your client machine. > [!TIP] > To find the IP address of your Ubuntu machine, you can run the `ifconfig` command as in the following example: > > ```bash > sudo ifconfig eth0 | grep 'inet addr' > ``` > > For Red Hat, you can use the `ip addr` command as in the following example: > > ```bash > sudo ip addr show eth0 | grep "inet" > ``` > > One exception to this technique relates to Azure VMs. For Azure VMs, [find the public IP for the VM in the Azure portal](/azure/azure-sql/virtual-machines/linux/sql-vm-create-portal-quickstart#connect). - If applicable, check that you opened the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] port (default 1433) on the firewall. - For Azure VMs, check that you have a [network security group rule for the default SQL Server port](/azure/azure-sql/virtual-machines/linux/sql-vm-create-portal-quickstart#remote). - Verify that the user name and password don't contain any typos, extra spaces, or incorrect casing. - Try to explicitly set the protocol and port number with the server name like the following example: **tcp:servername,1433**. - Network connectivity issues can also cause connection errors and timeouts. After verifying your connection information and network connectivity, try the connection again. ## Manage the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] service The following section shows how to manage the execution of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Docker containers. To manage services for Linux, see [Start, stop, and restart SQL Server services on Linux](sql-server-linux-start-stop-restart-sql-server-services.md). ### Manage the execution of the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Docker container You can get the status and container ID of the latest created [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] Docker container by running the following command (The ID is under the **CONTAINER ID** column): ```bash sudo docker ps -l ``` You can stop or restart the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] service as needed using the following commands: ```bash sudo docker stop sudo docker restart ``` > [!TIP] > For more troubleshooting tips for Docker, see [Troubleshooting SQL Server Docker containers](sql-server-linux-docker-container-troubleshooting.md). ## Access the log files The [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] [!INCLUDE[ssDE](../includes/ssde-md.md)] logs to the `/var/opt/mssql/log/errorlog` file in both the Linux and container installations. You need to be in **superuser** mode to browse this directory. The installer logs here: `/var/opt/mssql/setup-