Giter Club home page Giter Club logo

Comments (5)

rivmar avatar rivmar commented on May 18, 2024 2

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.

from haipproxy.

ResolveWang avatar ResolveWang commented on May 18, 2024
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.

from haipproxy.

ResolveWang avatar ResolveWang commented on May 18, 2024

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

from haipproxy.

teadrinker2015 avatar teadrinker2015 commented on May 18, 2024

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 <[email protected]>

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']

from haipproxy.

teadrinker2015 avatar teadrinker2015 commented on May 18, 2024

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.

from haipproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.