Skip to content

not all command-line options seem to do anything #152

@bodiug

Description

@bodiug

I'm trying to disable registration with Consul using command-line but it's not being honored.

$ ./fabio-1.2.1-go1.7_linux-amd64 -registry.consul.register.enabled false
2016/08/31 12:50:57 [INFO] Runtime config
{
    "Proxy": {
        "Strategy": "rnd",
        "Matcher": "prefix",
        "NoRouteStatus": 404,
        "MaxConn": 10000,
        "ShutdownWait": 0,
        "DialTimeout": 30000000000,
        "ResponseHeaderTimeout": 0,
        "KeepAliveTimeout": 0,
        "ReadTimeout": 0,
        "WriteTimeout": 0,
        "FlushInterval": 1000000000,
        "LocalIP": "172.17.0.1",
        "ClientIPHeader": "",
        "TLSHeader": "",
        "TLSHeaderValue": ""
    },
    "Registry": {
        "Backend": "consul",
        "Static": {
            "Routes": ""
        },
        "File": {
            "Path": ""
        },
        "Consul": {
            "Addr": "localhost:8500",
            "Scheme": "http",
            "Token": "",
            "KVPath": "/fabio/config",
            "TagPrefix": "urlprefix-",
            "Register": true,
            "ServiceAddr": ":9998",
            "ServiceName": "fabio",
            "ServiceTags": null,
            "ServiceStatus": [
                "passing"
            ],
            "CheckInterval": 1000000000,
            "CheckTimeout": 3000000000
        }
    },
    "Listen": [
        {
            "Addr": ":9999",
            "Scheme": "http",
            "ReadTimeout": 0,
            "WriteTimeout": 0,
            "CertSource": {
                "Name": "",
                "Type": "",
                "CertPath": "",
                "KeyPath": "",
                "ClientCAPath": "",
                "CAUpgradeCN": "",
                "Refresh": 0,
                "Header": null
            }
        }
    ],
    "CertSources": {},
    "Metrics": {
        "Target": "",
        "Prefix": "default",
        "Interval": 30000000000,
        "GraphiteAddr": "",
        "StatsDAddr": ""
    },
    "UI": {
        "Addr": ":9998",
        "Color": "light-green",
        "Title": ""
    },
    "Runtime": {
        "GOGC": 800,
        "GOMAXPROCS": 4
    },
    "ListenerValue": [
        ":9999"
    ],
    "CertSourcesValue": null
}
2016/08/31 12:50:57 [INFO] Version 1.2.1 starting
2016/08/31 12:50:57 [INFO] Go runtime is go1.7
2016/08/31 12:50:57 [INFO] Setting GOGC=800
2016/08/31 12:50:57 [INFO] Setting GOMAXPROCS=4
2016/08/31 12:50:57 [INFO] Metrics disabled
2016/08/31 12:50:57 [FATAL] Error initializing backend. Get http://localhost:8500/v1/agent/self: dial tcp [::1]:8500: getsockopt: connection refused

Looking at the runtime config shown it's still showing "Register": true,. Possibly this is not working for other options as well? It becomes even weirder when I combine the disabling registration option with -ui.addr :8080, then it's also not being honored. But without it is being honored. Not sure what's going on there, hopefully an easy fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions