Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traefik cannot read constraints from KV #794

Closed
altvnk opened this issue Nov 1, 2016 · 3 comments
Closed

Traefik cannot read constraints from KV #794

altvnk opened this issue Nov 1, 2016 · 3 comments
Labels
Milestone

Comments

@altvnk
Copy link

altvnk commented Nov 1, 2016

I'm running Traefik v1.1.0-rc3 (Darwin) with Consul KV configuration loading.
When i'm setting traefik/consulcatalog/constraints or traefik/constraints to ["tag==exposed"] Traefik returns me an error:

./traefik --consul --consul.endpoint=127.0.0.1:8500
2016/11/02 00:16:56 Error loading configuration: 1 error(s) decoding:

* illegal base64 data at input byte 0

I've tried to encode it into Base64... Didn't helped:

./traefik --consul --consul.endpoint=127.0.0.1:8500
2016/11/02 00:16:13 Error loading configuration: 18 error(s) decoding:

* 'ConsulCatalog.Constraints[0]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[10]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[11]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[12]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[13]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[14]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[15]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[16]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[17]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[1]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[2]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[3]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[4]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[5]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[6]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[7]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[8]' expected a map, got 'uint8'
* 'ConsulCatalog.Constraints[9]' expected a map, got 'uint8'
@emilevauge emilevauge added this to the 1.1 milestone Nov 1, 2016
@emilevauge emilevauge added bug and removed bug labels Nov 1, 2016
@emilevauge
Copy link
Member

Fixed in #814

@altvnk
Copy link
Author

altvnk commented Nov 10, 2016

Sorry for bringing this up again, but i'm still not able to run Traefik with constraints in KV...
In which format should i store the constraints in KV?

Here's what i currently have:

http http://consul.service.consul:8500/v1/kv/traefik/consulcatalog/constraints
HTTP/1.1 200 OK
Content-Length: 148
Content-Type: application/json
Date: Thu, 10 Nov 2016 20:51:38 GMT
X-Consul-Index: 5460034
X-Consul-Knownleader: true
X-Consul-Lastcontact: 0

[
    {
        "CreateIndex": 5313990,
        "Flags": 0,
        "Key": "traefik/consulcatalog/constraints",
        "LockIndex": 0,
        "ModifyIndex": 5460034,
        "Value": "WyJ0YWc9PWV4dGVybmFsIl0="
    }
]
echo "WyJ0YWc9PWV4dGVybmFsIl0=" | base64 --decode
["tag==external"]

But latest release i've just downloaded gives me this:

2016/11/10 22:55:01 Error loading configuration: 1 error(s) decoding:

* illegal base64 data at input byte 0

Wondering if i'm doing something wrong here...

@emilevauge
Copy link
Member

@altvnk I suggest to build your configuration in a TOML file, and then use traefik storeconfig to upload it in your KV store.

@ldez ldez added the kind/bug/confirmed a confirmed bug (reproducible). label Apr 29, 2017
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants