docker-squid
docker-squid copied to clipboard
Unable to start squid on Ubuntu
I'm trying to start the squid image directly from the docker-compose on my ubuntu server I'm getting the following errors:
Also, unable to run the image via docker run too. it continuously restarts and nothing happens. I can't even access the bash.
I have the same problem here. I run the container using docker-compose.
docker-compose.yml:
version: '3'
services:
squid:
image: sameersbn/squid:3.5.27-2
container_name: "squid"
restart: always
ports:
- "3128:3128"
volumes:
- /srv/squid/data/cache:/var/spool/squid
log:
$ docker-compose up
Starting squid ... done
Attaching to squid
squid | Initializing cache...
squid | 2020/03/04 08:39:50| Set Current Directory to /var/spool/squid
squid | 2020/03/04 08:39:50| Creating missing swap directories
squid | 2020/03/04 08:39:50| No cache_dir stores are configured.
squid | Starting squid...
squid | 2020/03/04 08:39:50| Set Current Directory to /var/spool/squid
squid | 2020/03/04 08:39:50| Starting Squid Cache version 3.5.27 for x86_64-pc-linux-gnu...
squid | 2020/03/04 08:39:50| Service Name: squid
squid | 2020/03/04 08:39:50| Process ID 1
squid | 2020/03/04 08:39:50| Process Roles: master worker
squid | 2020/03/04 08:39:50| With 1048576 file descriptors available
squid | 2020/03/04 08:39:50| Initializing IP Cache...
squid | 2020/03/04 08:39:50| DNS Socket created at [::], FD 8
squid | 2020/03/04 08:39:50| DNS Socket created at 0.0.0.0, FD 9
squid | 2020/03/04 08:39:50| Adding domain openstacklocal from /etc/resolv.conf
squid | 2020/03/04 08:39:50| Adding nameserver 127.0.0.11 from /etc/resolv.conf
squid | 2020/03/04 08:39:50| Adding ndots 1 from /etc/resolv.conf
squid | 2020/03/04 08:39:50| Logfile: opening log daemon:/var/log/squid/access.log
squid | 2020/03/04 08:39:50| Logfile Daemon: opening log /var/log/squid/access.log
squid | 2020/03/04 08:39:50| ipcCreate: fork: (12) Cannot allocate memory
squid | 2020/03/04 08:39:50| storeDirWriteCleanLogs: Starting...
squid | 2020/03/04 08:39:50| Finished. Wrote 0 entries.
squid | 2020/03/04 08:39:50| Took 0.00 seconds ( 0.00 entries/sec).
squid | FATAL: Couldn't start logfile helper
I found the problem. The reason was that the system didn't have a swap. I created a swap equal to twice the memory, and the container started successfully.
Reference: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Crashing-tp4675937p4675940.html
Oh, amazing. gonna try this
On 3/4/20, Reza Ebrahimpour [email protected] wrote:
I found the problem. The reason was that the system didn't have a swap. I created a swap equal to twice the memory, and the container started successfully.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/sameersbn/docker-squid/issues/67#issuecomment-594407597
@rezaep the URL is dead, i wish you had just posted the solution here.