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

Provide error if -ui and -ui-dir are both specified #2918

Merged
merged 2 commits into from
Apr 18, 2017
Merged

Conversation

slackpad
Copy link
Contributor

This does a rebase of #2577 and tweaks the wording.

Closes #2577, #2903, #2576.

@tylerwalts
Copy link

tylerwalts commented Jul 5, 2017

This breaks for me on Windows, between using release 0.8.0 and 0.8.5. I do not use ui_dir (only ui set to true) in the config. Since upgrading, I now get that (incorrect) error message, and now it will not launch. Even adding in a line for "ui_dir": "" with blank string value I thought might work after looking at the diff, but does not. Maybe there is a default or something that only happens on Windows?

@slackpad
Copy link
Contributor Author

slackpad commented Jul 5, 2017

@tylerwalts that's super strange - there's no special treatment of ui-dir on Windows that I can find. Is it possible you have a stray config file that's maybe getting picked up?

@tylerwalts
Copy link

tylerwalts commented Jul 5, 2017

Thanks for the quick response! I verified no other config files exist, and simplified it down to this only to still reproduce the symptom:

{
  "addresses": {
    "http": "0.0.0.0"
  },
  "advertise_addr": "192.168.1.123",
  "datacenter": "foo",
  "log_level": "info",
  "node_name": "bar",
  "server": true,
  "ui": true
}

Results in log:

==> Both the ui and ui-dir flags were specified, please provide only one

EDIT/SOLVED: I forgot to mention that I am using choco to install and manage consul via nssm, and looking deeper into how it is launched I see that the CLI is passing the ui-dir arg in. Sorry for the false alarm and I'll leave this up in case anyone else has a similar issue:

image

My "fix" is to remove the "ui": true from my config, since the CLI arg sets the UI path out of box and it is redundant. Everything working as expected now 👍

@slackpad
Copy link
Contributor Author

slackpad commented Jul 5, 2017

@tylerwalts thanks for checking - opened #3229 to track this since this is a PR - I think we will need to fire up Windows and trace through this a bit; I can't think of any mechanism that would cause this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants