Code Monkey home page Code Monkey logo

Comments (3)

pvyaka01 avatar pvyaka01 commented on September 20, 2024

By changing v1 with v2 in the code, was able to bring it up. However, there are issues ...
Even if we specify stats address, cannot access stats page - says 404 not found. Connections to haproxy port are not going through. Here's the log:
./haproxy-consul-connect -sidecar-for test_v1 -haproxy-cfg-base-path /opt/haproxy/conf -haproxy /opt/haproxy/bin/haproxy -dataplane /opt/haproxy/bin/dataplaneapi -stats-addr 127.0.0.1:1936 -stats-service-register
INFO[0000] consul: watching service test_v1
INFO[0000] consul: watching service test_v1-sidecar-proxy
INFO[0000] consul: CA certs changed, active root id: 98:c3:ff:ca:a7:1a:f2:a5:ed:0b:04:3a:80:2c:62:a8:ec:35:3c:64
INFO[0000] consul: CA certs ready
INFO[0000] consul: leaf cert for service test changed, serial: f2:68, valid before: 2020-02-19 20:39:02 +0000 UTC, valid after: 2020-02-16 20:39:02 +0000 UTC
INFO[0000] consul: leaf cert for test ready
INFO[0000] received consul config update
INFO[0000] handling new configuration
INFO[0000] haproxy: 046/230904 (1655) : New worker #1 (1657) forked
INFO[0000] Starting stats server at 127.0.0.1:1936
INFO[0000] state applied
WARN[0001] haproxy: 046/230905 (1655) : Reexecuting Master process
INFO[0001] haproxy: 046/230905 (1655) : New worker #1 (1672) forked
WARN[0001] haproxy: 046/230905 (1657) : Stopping frontend GLOBAL in 0 ms.
WARN[0001] haproxy: 046/230905 (1657) : Proxy GLOBAL stopped (FE: 1 conns, BE: 1 conns).
WARN[0002] haproxy: 046/230906 (1655) : Former worker #1 (1657) exited with code 0 (Exit)

from haproxy-consul-connect.

pvyaka01 avatar pvyaka01 commented on September 20, 2024

While i can see downstream port is correct as specified in the service config (and we can access using http://localhost:8090 with the right return value), it binds to a default port 21000. Is there a way to change this? I tried specifying a port for connect in the service configuration but that did not have any affect. Also, curl http://localhost:21000 does not return anything...merely says:
curl: (52) Empty reply from server

May be i'm missing something?

Here's the haproxy.conf it generated:

_version=2

global
master-worker
nbproc 1
nbthread 2
stats socket /opt/haproxy/conf/haproxy-connect-014820268/haproxy.sock mode 600 level admin expose-fd listeners
stats timeout 2m
tune.ssl.default-dh-param 1024

userlist controller
user haproxy insecure-password pass

frontend front_downstream
mode http
bind 0.0.0.0:21000 name front_downstream_bind crt /opt/haproxy/conf/haproxy-connect-014820268/c09d4b5a453358a0e88f84ae693f4e14a6a55ea82ba5bf716d595437612494b6 ca-file /opt/haproxy/conf/haproxy-connect-014820268/57f2efdcc7d285819fb28cab4b1cd6f09d816b0dd8b5a5f7e8a6d084145acb4d ssl verify required
timeout client 30000
default_backend back_downstream

backend back_downstream
mode http
timeout server 60000
timeout connect 1000
server downstream_node 127.0.0.1:8090

from haproxy-consul-connect.

ShimmerGlass avatar ShimmerGlass commented on September 20, 2024

Hello,

The default name for dataplaneapi binary is already dataplaneapi (cf https://github.com/haproxytech/haproxy-consul-connect/blob/master/haproxy/haproxy.go#L42). However, the flag to specify its path is -dataplane-api which is perhaps misleading. We could rename it, what do you think?

from haproxy-consul-connect.

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.