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

Logrotate ERROR: No running copy #8

Open
dsefcik opened this issue Nov 3, 2015 · 4 comments
Open

Logrotate ERROR: No running copy #8

dsefcik opened this issue Nov 3, 2015 · 4 comments

Comments

@dsefcik
Copy link

dsefcik commented Nov 3, 2015

root@88efec7f40cd:/# squid3 -k rotate
squid: ERROR: No running copy

root@88efec7f40cd:/# cat /var/run/squid3.pid
1

Any ideas?
TIA

@sameersbn
Copy link
Owner

not sure why it does not work. tried locally and i see the same issue.

@hgontijo
Copy link

hgontijo commented Feb 6, 2017

I was having the same issue and I mapped the container log folder to a host volume. It has been working fine.
Here's my logrotate without squid3 -k rotate:

#
# Logrotate fragment for squid3.
#
/var/log/squid3/*.log {
        daily
        compress
        delaycompress
        rotate 2
        missingok
        nocreate
}

@stefcl
Copy link

stefcl commented Mar 17, 2017

Perhaps it would be safer to use copytruncate, given that we can't invoke the -k rotate command to tell squid to reopen the file?

   copytruncate
          Truncate  the  original log file in place after creating a copy,
          instead of moving the old log file and optionally creating a new
          one,  It  can be used when some program can not be told to close
          its logfile and thus might continue writing (appending)  to  the
          previous log file forever.  Note that there is a very small time
          slice between copying the file and truncating it, so  some  log-
          ging  data  might be lost.  When this option is used, the create
          option will have no effect, as the old log file stays in  place.

Otherwise, it may be possible to use kill -USR1 1 (where "1" is the main app PID number in docker) according to the squid.conf file

@taksekine
Copy link

When squid's pid==1, ploblem is appeard.
Use "docker run --init" etc.

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

5 participants