Hi B. Thank you for your response. I was away for a day… Here’s the config:
# cat /etc/haproxy/haproxy.cfg
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
# https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
# An alternative list with additional directives can be obtained from
#
https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy
ssl-default-bind-ciphers
ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
Here’s the curl response
% curl 'http://127.0.0.1:5984/notification/_bulk_docs' -X OPTIONS -v
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0)
> OPTIONS /notification/_bulk_docs HTTP/1.1
> Host: 127.0.0.1:5984
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Allow: POST
< Cache-Control: must-revalidate
< Content-Length: 60
< Content-Type: application/json
< Date: Wed, 17 Oct 2018 10:46:44 GMT
< Server: CouchDB/2.2.0-adebd386e (Erlang OTP/19)
< X-Couch-Request-ID: d3adcc9d59
< X-CouchDB-Body-Time: 0
<
{"error":"method_not_allowed","reason":"Only POST allowed"}
* Connection #0 to host 127.0.0.1 left intact
> I would also compare to hitting a node directly on port 5984, I expect you'll
> get the same problem.
Do you mean w/o a HAProxy in front? That’s a setup I ran before. I did not have
any trouble there.
Could this be something CORS related? Does that have anything to do with it?
Thanks very much.
Kind Regards,
Holger Frohloff
______________________
Holger Frohloff, Ing.
Software Development & Consulting
https://www.holgerfrohloff.de
> On 16. Oct 2018, at 00:21, Robert Samuel Newson <[email protected]> wrote:
>
> Hi,
>
> That's odd, haproxy should be passing any http method, can you share the
> haproxy config?
>
> I would also compare to hitting a node directly on port 5984, I expect you'll
> get the same problem.
>
> B.
>
>> On 15 Oct 2018, at 16:33, Holger Frohloff <[email protected]> wrote:
>>
>> Hi. all
>>
>> If this is the wrong place to pose this question please excuse me. If you
>> could point me towards a better place, please do so.
>>
>> Situation:
>> I followed the README at https://github.com/apache/couchdb-docker to create
>> a local cluster with three Couchdb instances behind a haproxy. I could use
>> the CouchDB API to creates 100k docs on the cluster.
>> Now I wanted to replicate these docs to a local PouchDB in the browser.
>> I get a 405 Method Not Allowed probably because the proxy does not allow the
>> OPTIONS request, that is send by PouchDB replicate.
>>
>> My questions:
>> - How can I modify the proxy to allow the OPTIONS request so the replication
>> could follow?
>> - Does anybody have a similar setup and can tell me something about possible
>> speed gains compared to a single instance?
>>
>> Thank you very much for any help.
>>
>> Kind Regards,
>>
>> Holger Frohloff
>> ______________________
>> Holger Frohloff, Ing.
>> Software Development & Consulting
>>
>> https://www.holgerfrohloff.de
>>
>>
>>
>
signature.asc
Description: Message signed with OpenPGP
