Docker-compose up -d error bufio.Scanner: token too long


“I am so frustrated because my Docker suddenly cannot run docker-compose up -d. i installed in ubuntu server PRETTY_NAME=“Ubuntu 22.04.5 LTS” please help, because urgent

Usually detailed post that allow to understand what was done and how it was done, have a better chance to get a quick response than posts with insufficient information and “please help, because urgent”.

I read your post, and I have no idea what it’s about.

thank you for reply. my docker was fine and i run docker-compose down to drop some container and i try to up again with docker-compose up -d suddently return error bufio.Scanner: token too long. even i try docker run hello-world still error
image
i try to reinstall docker but still error too

In order to understand your situation, we need some context information.

Please share the output of following commands:

docker version
docker info

When you share the outputs, always format your posts according to the following guide: How to format your forum posts

here my docker info
Client: Docker Engine - Community
Version: 28.4.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.29.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.39.4
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 4
Running: 0
Paused: 0
Stopped: 4
Images: 1
Server Version: 28.4.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: b98a3aace656320842a23f4a392a33f46af97866
runc version: v1.3.0-0-g4ca628d1
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.15.0-156-generic
Operating System: Ubuntu 22.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 3
Total Memory: 14.63GiB
Name: pirsa-dev
ID: c50ef4e9-5e1f-4ae5-a182-fa7dd66e0b55
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false

i test install new ubuntu and new docker in vmware working fine. no error.

Did you try to check the deamon logs with sudo journalctl -xu docker.service, or syslogs from /var/log/syslog for errors? It should provide more context details.

this is my last 10 sudo journalctl -u docker.service --no-pager -n 10

pirsa-dev# sudo journalctl -u docker.service --no-pager -n 10
Oct 01 19:37:23 pirsa-dev dockerd[22576]: time=“2025-10-01T19:37:23.974723177Z” level=info msg=“Docker daemon” commit=249d679 containerd-snapshotter=false storage-driver=overlay2 version=28.4.0
Oct 01 19:37:23 pirsa-dev dockerd[22576]: time=“2025-10-01T19:37:23.975409148Z” level=info msg=“Initializing buildkit”
Oct 01 19:37:23 pirsa-dev dockerd[22576]: time=“2025-10-01T19:37:23.975560449Z” level=info msg=“metrics API listening on [::]:9323”
Oct 01 19:37:23 pirsa-dev dockerd[22576]: time=“2025-10-01T19:37:23.995544514Z” level=info msg=“Completed buildkit initialization”
Oct 01 19:37:24 pirsa-dev dockerd[22576]: time=“2025-10-01T19:37:24.001632165Z” level=info msg=“Daemon has completed initialization”
Oct 01 19:37:24 pirsa-dev systemd[1]: Started Docker Application Container Engine.
Oct 01 19:37:24 pirsa-dev dockerd[22576]: time=“2025-10-01T19:37:24.001984478Z” level=info msg=“API listen on /run/docker.sock”
Oct 01 19:37:34 pirsa-dev dockerd[22576]: time=“2025-10-01T19:37:34.528504089Z” level=error msg=“Handler for POST /v1.51/containers/f91e1175d3fcda66ad82237dc1a33790dd892a2cf2e55c076fdf483ab82245fe/start returned error: bufio.Scanner: token too long”
Oct 01 19:46:16 pirsa-dev dockerd[22576]: time=“2025-10-01T19:46:16.543114309Z” level=error msg=“Handler for POST /v1.51/containers/ee6406fa4692629a1e18a5ccf96a757c334e43213747fde0935439509b045704/start returned error: bufio.Scanner: token too long”
Oct 01 20:01:08 pirsa-dev dockerd[22576]: time=“2025-10-01T20:01:08.955673164Z” level=error msg=“Handler for POST /v1.51/containers/123e57465bbeb7003d40c7e18fa208895e024f803406d172e364afa1855dee75/start returned error: bufio.Scanner: token too long”
pirsa-dev#

According to the logs, three out of four containers failed to start with the error.
Did you deploy the exact same compose file on the new docker host?

Please share the compose file so we understand what’s happening there.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.