Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start squid on Ubuntu #67

Open
akash07k opened this issue Jan 3, 2020 · 4 comments
Open

Unable to start squid on Ubuntu #67

akash07k opened this issue Jan 3, 2020 · 4 comments

Comments

@akash07k
Copy link

akash07k commented Jan 3, 2020

I'm trying to start the squid image directly from the docker-compose on my ubuntu server I'm getting the following errors:
image
image

Also, unable to run the image via docker run too. it continuously restarts and nothing happens. I can't even access the bash.

@rezaep
Copy link

rezaep commented Mar 4, 2020

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

@rezaep
Copy link

rezaep commented Mar 4, 2020

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

@akash07k
Copy link
Author

akash07k commented Mar 4, 2020 via email

@vgoklani
Copy link

@rezaep the URL is dead, i wish you had just posted the solution here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants