iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
⚠️

Nextcloud: Fixing Stalled Smartphone Image Uploads Caused by Stopped Docker Containers

に公開

Introduction

I operate Nextcloud using Docker (Docker Compose) on my home Ubuntu server. One day, when I tried to upload images from the smartphone app, I encountered a phenomenon where, although no error message was displayed, the progress bar remained in the "processing" state and did not advance at all.

Thinking "That's strange," I checked the server side and restored it. I am leaving the steps here as a memo.

Symptoms

  • Client-side (smartphone) behavior:

    • When trying to upload an image with the Nextcloud app, it remains stuck in the "processing" state.

    • No clear pop-ups such as "Connection Error" appear.

  • Environment:

    • OS: Ubuntu Server

    • Middleware: Docker / Docker Compose

Investigation

I connected to the server via SSH and first checked if the containers were alive.

$ sudo docker ps -a

Execution Results:

CONTAINER ID   IMAGE       COMMAND                  CREATED       STATUS                     PORTS     NAMES
cf23fee83537   nextcloud   "/entrypoint.sh apac…"   3 weeks ago   Exited (0) 7 minutes ago             datashare-app-1
68f82d483af9   mariadb     "docker-entrypoint.s…"   3 weeks ago   Exited (0) 7 minutes ago             datashare-db-1

Checking the STATUS, it showed Exited (0) 7 minutes ago. In other words, I realized that the containers had stopped 7 minutes ago.

Since the error code was (0), it seemed they had stopped for some reason (such as an OS restart or a normal process termination signal) rather than a crash. Because the server-side was unable to respond, it appeared that the smartphone-side was frozen while waiting for a timeout.

Resolution Steps

Now that I knew they were stopped, I performed a restart using Docker Compose.

  1. Move to the directory where docker-compose.yml is located
  2. Start in the background
$ sudo docker compose up -d

Then, I checked docker ps again and confirmed that the STATUS was Up. I was then able to successfully upload images from my smartphone.

Lessons Learned

  • When you encounter issues like "cannot connect" or "processing doesn't finish," the fundamental step is to first check if the process (container) is alive on the server side.

  • Using the -a option with docker ps instead of just running it plain allows you to see when it stopped (in this case, 7 minutes ago), which helps in isolating the cause.

Discussion