Search squid archive

Re: Define two cache_peer directives with same IP but different ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 14 July 2014 at 12:21:19, Klaus Reithmaier wrote:

> Hello,
> 
> I  have two machines with each two squid processes. I want that every 
> process is querying the other three over htcp if it has a specified 
> element in its cache.
> 
> So this is my setting:
> 
> --------------------------------     --------------------------------
> 
> | Proxyserver1: IP 192.168.1.1 |     | Proxyserver2: IP 192.168.1.2 |
> 
> --------------------------------     --------------------------------
>   | squid1: Port 8080 |                   | squid1: Port 8080 |
>   | squid2: Port 8081 |                   | squid2: Port 8081 |
>   ---------------------                   ---------------------
> 
> This is the cache_peer configuration on Proxyserver1 process squid1:
> -- START config --
> cache_peer 192.168.1.1 sibling 8081 4828 proxy-only htcp
> cache_peer 192.168.1.2 sibling 8080 4827 proxy-only htcp
> cache_peer 192.168.1.2 sibling 8081 4828 proxy-only htcp
> -- END config --
> 
> It's obvious, that
> cache_peer 192.168.1.2 sibling 8080 4827 proxy-only htcp and
> cache_peer 192.168.1.2 sibling 8081 4828 proxy-only htcp
> are different proxies, because they are using different ports. But squid
> can't be started:
> 
> FATAL: ERROR: cache_peer 192.168.1.2 specified twice
> Squid Cache (Version 3.3.12): Terminated abnormally.
> 
> How can I define two siblings on the same machine?

You could add another IP address to each machine and bind one squid process to 
each IP, for example:

proxyserver1, squid1: 192.168.1.1 port 8080
proxyserver1, squid2: 192.168.1.3 port 8080
proxyserver2, squid1: 192.186.1.2 port 8080
proxyserver2, squid2: 192.168.1.4 port 8080


Regards,


Antony.

-- 
“If code doesn’t receive constant love, it turns to shit.”

 - Brad Fitzpatrick, Google engineer

                                                   Please reply to the list;
                                                         please *don't* CC me.





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux