docker cannot run
  • 14-May-2023
Lightrun Team
Author Lightrun Team
docker cannot run

docker cannot run

Lightrun Team
Lightrun Team

Explanation of the problem

In the given scenario, an attempt is being made to set up Outline on a new VPS running Ubuntu 16 LTS. The VPS has 256 MB of RAM and a 5 GB HDD with more than 4 GB of free space. Initially, the installation process involves executing the command curl -sS | sh as the root user. However, the process encounters an error indicated by the message “E: Sub-process /usr/bin/dpkg returned an error code (1).” Subsequently, the command sudo wget -qO- | bash is executed, but it fails to start the Shadowbox component of Outline due to an inability to connect to the Docker daemon.

Upon investigating further, it is observed that the Docker service is not running. The command systemctl status docker displays the status of the Docker service, indicating that it has failed with the result “start-limit-hit.” The subsequent attempt to stop and start the Docker service using service docker stop and service docker start also fails with the error message “Job for docker.service failed because the control process exited with an error code.” The output of systemctl status docker.service provides additional details, highlighting that the Docker service failed to start and has entered a failed state with a result of “exit-code” and “start-limit-hit.”

To identify the root cause of the Docker service failure, the journalctl -xe command is executed to view the system journal logs. The logs reveal that the Docker socket for the API is being listened to, but the Docker service fails to start repeatedly with the result “start-limit-hit.” This information suggests that there might be an underlying issue preventing the Docker Application Container Engine from starting properly.

Troubleshooting with the Lightrun Developer Observability Platform

Getting a sense of what’s actually happening inside a live application is a frustrating experience, one that relies mostly on querying and observing whatever logs were written during development.
Lightrun is a Developer Observability Platform, allowing developers to add telemetry to live applications in real-time, on-demand, and right from the IDE.

  • Instantly add logs to, set metrics in, and take snapshots of live applications
  • Insights delivered straight to your IDE or CLI
  • Works where you do: dev, QA, staging, CI/CD, and production

Start for free today

Problem solution for docker cannot run

The encountered issue suggests a potential configuration or compatibility problem between the VPS environment, Docker, and Outline. To further investigate and resolve the problem, a thorough examination of each component is necessary.

Firstly, it is crucial to verify that the VPS environment meets the system requirements for running Docker and Outline. This includes ensuring sufficient resources such as memory, storage, and compatible operating system versions. In the given scenario, the VPS has 256 MB of RAM and 5 GB of HDD space with over 4 GB free, but it is worth confirming if these specifications meet the minimum requirements specified by Docker and Outline. Additionally, checking for any potential limitations or conflicts within the VPS environment, such as firewall settings or resource restrictions, is recommended.

Secondly, it is important to ensure the proper installation and configuration of Docker. The installation process, executed through the command curl -sS | sh, failed with an error message indicating an issue with the package manager (dpkg). It is advised to review the installation steps and validate that the VPS is set up correctly for Docker installation. This may involve checking for any additional dependencies or pre-requisites, and verifying that the Docker installation script is compatible with the Ubuntu 16 LTS version being used.

Furthermore, it is necessary to investigate any potential conflicts with other services or processes that might interfere with Docker’s functionality. The error message “Cannot connect to the Docker daemon at unix:///var/run/docker.sock” suggests a problem with the Docker daemon. It could be caused by another process utilizing the Docker socket or conflicting with Docker’s operation. Identifying and addressing such conflicts, either by terminating conflicting processes or adjusting configuration settings, can help resolve the issue.

In addition to these steps, reviewing the Docker logs can provide more detailed error messages and insights into the root cause of the problem. The commands systemctl status docker.service and journalctl -xe provide valuable information about the Docker service status, its failures, and any associated error codes. Analyzing these logs can reveal specific errors or warnings that require further investigation and troubleshooting.

Other popular problems with outline-server

Problem: failure to establish a connection between the Outline Manager and the server

One common problem encountered with Outline Server is the failure to establish a connection between the Outline Manager and the server. This issue typically arises when attempting to create a new server or connect to an existing one. The error message often indicates a failure to establish a secure connection or a timeout during the connection attempt.


To resolve this problem, several steps can be taken. First, it is essential to ensure that both the Outline Manager and the server are running the latest versions. Outdated software can lead to compatibility issues and connection problems. Additionally, verifying that the server’s firewall settings allow inbound connections on the designated port (by default, port 8443) is crucial. Adjusting the firewall rules accordingly can enable successful connections between the Outline Manager and the server. Finally, double-checking network configurations, such as DNS settings and network connectivity, can help identify and address any potential networking issues that might be causing the connection problem.

Problem: user management and access control

One recurrent problem with Outline Server is related to user management and access control. This issue often involves difficulties in adding or removing users, granting or revoking access permissions, or managing user groups effectively. Misconfigurations or misunderstandings of the user management features can lead to unintended access restrictions or unauthorized access.


To address performance issues, several troubleshooting steps can be followed. First, assessing the server’s resource utilization, such as CPU, memory, and disk usage, can help identify potential bottlenecks. Optimizing resource allocation, upgrading hardware components, or allocating more resources to the server can alleviate performance problems. Additionally, examining the network infrastructure and bandwidth limitations can shed light on potential network-related issues. Adjusting network configurations, upgrading network hardware, or implementing network optimization techniques can improve overall performance. Finally, monitoring and analyzing server and network logs can provide insights into specific performance-related errors or events, guiding further investigation and targeted troubleshooting.

Problem: user management and access control

One recurrent problem with Outline Server is related to user management and access control. This issue often involves difficulties in adding or removing users, granting or revoking access permissions, or managing user groups effectively. Misconfigurations or misunderstandings of the user management features can lead to unintended access restrictions or unauthorized access.


To address user management and access control issues, a systematic approach can be adopted. First, carefully reviewing the server’s user management documentation and guidelines can ensure proper understanding and utilization of the available features. This includes familiarizing oneself with user roles, permissions, and group management capabilities. Additionally, double-checking user configuration files and verifying that the desired access settings are correctly defined can help resolve access-related problems. Furthermore, regularly auditing and reviewing user accounts and permissions can help identify and rectify any misconfigurations or inconsistencies. By following best practices for user management and access control, administrators can effectively manage user accounts and ensure appropriate access levels are granted to users.

A brief introduction to outline-server

Outline Server is an open-source, self-hosted solution designed to create and manage virtual private networks (VPNs) with ease. It utilizes the Shadowsocks protocol, which offers secure and efficient encrypted communication over the internet. Outline Server operates as a proxy server, allowing users to bypass internet restrictions and access blocked websites or services. It provides a simple and intuitive interface, making it accessible to both technical and non-technical users.

Under the hood, Outline Server is built using modern technologies and frameworks. It leverages Docker containers for easy deployment and scalability, enabling users to spin up multiple instances of the server effortlessly. Outline Server also utilizes cryptographic protocols to ensure data privacy and integrity during transmission. It supports key management features, such as user creation, password management, and access control, allowing administrators to define granular permissions for each user. Additionally, Outline Server offers detailed logging and monitoring capabilities, enabling administrators to track usage, diagnose issues, and maintain overall system health.

With its robust architecture and user-friendly interface, Outline Server provides a reliable and secure solution for creating and managing VPNs. Its flexibility and scalability make it suitable for a variety of use cases, including individuals seeking to protect their online privacy, organizations requiring secure remote access to internal resources, or developers and researchers conducting experiments or circumventing censorship restrictions. Whether deployed on a single VPS or across multiple servers, Outline Server empowers users with a powerful toolset to navigate the complexities of internet censorship and enhance their online experiences.

Most popular use cases for outline-server

  1. Secure Remote Access: Outline Server can be used to create a secure virtual private network (VPN) for remote access to internal resources. By configuring Outline Server on a remote server or cloud infrastructure, administrators can enable encrypted connections between remote clients and the server. This allows authorized users to securely access internal systems, files, and applications from anywhere in the world.
  1. Circumventing Internet Censorship: Outline Server serves as an effective tool for bypassing internet censorship and accessing blocked websites or services. By deploying an Outline Server instance in a region with unrestricted internet access, users can route their traffic through the server and circumvent censorship imposed by governments or institutions. This can be achieved by configuring the Outline client with the server’s access key.
  1. Privacy and Anonymity: Outline Server enhances online privacy by encrypting internet traffic and preventing third-party entities from monitoring or intercepting user data. By leveraging the Shadowsocks protocol, Outline Server ensures secure communication between clients and the server. This is particularly useful for individuals concerned about their privacy and seeking a reliable solution to protect their online activities.

It’s Really not that Complicated.

You can actually understand what’s going on inside your live applications.

Try Lightrun’s Playground

Lets Talk!

Looking for more information about Lightrun and debugging?
We’d love to hear from you!
Drop us a line and we’ll get back to you shortly.

By submitting this form, I agree to Lightrun’s Privacy Policy and Terms of Use.