Closed rivmar closed 6 years ago
haipproxy_1 | 2018/03/12 14:56:05| Configuring Parent 191.210.166.52/8080/0
haipproxy_1 | 2018/03/12 14:56:05| Configuring Parent 137.74.254.242/3128/0
haipproxy_1 | 2018/03/12 14:56:05| Configuring Parent 192.116.142.153/8080/0
haipproxy_1 | 2018/03/12 14:56:05| Configuring Parent 137.74.168.174/8080/0
haipproxy_1 | 2018/03/12 14:56:05| Configuring Parent 117.6.161.118/53281/0
haipproxy_1 | 2018/03/12 14:56:05| Configuring Parent 128.199.138.67/8118/0
It seems that you have just sent requests with squid successfully.If you can send requests with squid, just leave the messages alone.They are logs of squid.
The problem is that when error "Squid is already running! " appears I can not sent request anymore... Here is another log:
haipproxy_1 | 2018/03/13 07:27:58| Configuring Parent 181.30.101.242/3128/0 haipproxy_1 | 2018/03/13 07:27:58| Configuring Parent 118.178.227.171/80/0 haipproxy_1 | 2018/03/13 07:27:58| Configuring Parent 27.123.1.46/65103/0 haipproxy_1 | 2018/03/13 07:27:58| Configuring Parent 52.207.79.142/80/0 haipproxy_1 | 2018/03/13 07:27:58| Configuring Parent 190.24.131.250/3128/0 haipproxy_1 | 2018/03/13 07:27:58| Configuring Parent 185.119.56.8/53281/0 haipproxy_1 | 2018/03/13 07:27:58| Configuring Parent 137.74.254.242/3128/0 haipproxy_1 | 2018/03/13 07:27:58| Finished loading MIME types and icons. haipproxy_1 | 2018/03/13 07:27:58| Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 16 flags=9 haipproxy_1 | 2018/03/13 07:27:58| Closing HTTP port [::]:3128 haipproxy_1 | 2018/03/13 07:27:58| storeDirWriteCleanLogs: Starting... haipproxy_1 | 2018/03/13 07:27:58| Finished. Wrote 0 entries. haipproxy_1 | 2018/03/13 07:27:58| Took 0.00 seconds ( 0.00 entries/sec). haipproxy_1 | Aborted (core dumped) haipproxy_1 | 2018/03/13 07:28:00| Squid is already running! Process ID 12 haipproxy_1 | 2018/03/13 07:28:01| Squid is already running! Process ID 12 haipproxy_1 | 2018/03/13 07:28:02| Squid is already running! Process ID 12
I have to make docker stop and docker rm to delete container and up it again to make it work.
I'm sorry that i can't reproduce this problem, may be this answer is useful to you.You can try to deploy haipproxy without docker, and see whether this problem will happen
BTW, if you are familiar with python, you can use py_cli
This information may be useful to you: I was encountered the same error message, because I set the port for Redis on host to 6380, due to conflict with another existing Redis on 6379. The haipproxy container does not immediately fail, instead had been running normally for several hours, and after a computer sleep-wake cycle, completely refuse to restart.
The problem docker-compose:
version: '2.0'
services:
redis:
image: redis
ports:
- '6380:6379' # I fixed 6380 to 6379 later
command: >
--requirepass 123456
splash:
image: scrapinghub/splash
ports:
- '8050:8050'
haipproxy:
build: .
command: sh run.sh
volumes:
- .:/haipproxy
ports:
- '3128:3128'
links:
- redis
- splash
I also modified the dockerfile: ( because the original one cannot build properly the time I was using )
FROM ubuntu:18.04
MAINTAINER ResolveWang <resolvewang@foxmail.com>
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt update
RUN apt install squid -yq
RUN sed -i 's/http_access deny all/http_access allow all/g' /etc/squid/squid.conf
RUN cp /etc/squid/squid.conf /etc/squid/squid.conf.backup
RUN apt install python3 python3-pip -yq
RUN which python3|xargs -i ln -s {} /usr/bin/python
RUN which pip3|xargs -i ln -s {} /usr/bin/pip
COPY . /haipproxy
WORKDIR /haipproxy
RUN python -m pip install --upgrade pip
RUN pip install -i https://pypi.douban.com/simple/ -r requirements.txt
CMD ['python', 'crawler_booter.py', '--usage', 'crawler', 'common']
I was wrong, the haipproxy container still refuse to start due to Squid is already running
after a host reboot (perhaps include a docker compose stop and start cycle). While it can continue longer than before.
And I tried the solution in answer:
may be this answer is useful to you.
The pid_file
option seems to be the default in my current version of squid.conf
. I will report after next reboot.
Hi. I am trying to use haipproxy with docker:
on Ubuntu 16.04.3 LTS
And I am constantly getting error:
I added to docker-compose:
but without too much success:
Is it normal? Or maybe I should change some other settings?