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

Elixir warning when locale is not UTF-8 #1572

Closed
wyardley opened this issue Apr 5, 2018 · 2 comments
Closed

Elixir warning when locale is not UTF-8 #1572

wyardley opened this issue Apr 5, 2018 · 2 comments

Comments

@wyardley
Copy link

wyardley commented Apr 5, 2018

When certain locale settings are not UTF-8, rabbitmqctl returns a warning (even with the -q option).

This has caused problems with config management software that calls the shell commands and parses the output; while this can be fixed, is UTF-8 actually required? Forcing the env to a specific locale seems a bit drastic, so I wonder if there's a way to suppress this warning, especially when -q is used.
voxpupuli/puppet-rabbitmq#671
saltstack/salt#45383

  • RabbitMQ version: 3.7.4-1
  • Erlang version: 20.3-1
  • RabbitMQ plugin information via rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status: * = running on rabbit@ubuntu-server-1604-x64
 |/
[  ] rabbitmq_amqp1_0                  3.7.4
[  ] rabbitmq_auth_backend_cache       3.7.4
[  ] rabbitmq_auth_backend_http        3.7.4
[  ] rabbitmq_auth_backend_ldap        3.7.4
[  ] rabbitmq_auth_mechanism_ssl       3.7.4
[  ] rabbitmq_consistent_hash_exchange 3.7.4
[  ] rabbitmq_event_exchange           3.7.4
[  ] rabbitmq_federation               3.7.4
[  ] rabbitmq_federation_management    3.7.4
[  ] rabbitmq_jms_topic_exchange       3.7.4
[E*] rabbitmq_management               3.7.4
[e*] rabbitmq_management_agent         3.7.4
[  ] rabbitmq_mqtt                     3.7.4
[  ] rabbitmq_peer_discovery_aws       3.7.4
[  ] rabbitmq_peer_discovery_common    3.7.4
[  ] rabbitmq_peer_discovery_consul    3.7.4
[  ] rabbitmq_peer_discovery_etcd      3.7.4
[  ] rabbitmq_peer_discovery_k8s       3.7.4
[  ] rabbitmq_random_exchange          3.7.4
[  ] rabbitmq_recent_history_exchange  3.7.4
[  ] rabbitmq_sharding                 3.7.4
[  ] rabbitmq_shovel                   3.7.4
[  ] rabbitmq_shovel_management        3.7.4
[  ] rabbitmq_stomp                    3.7.4
[  ] rabbitmq_top                      3.7.4
[  ] rabbitmq_tracing                  3.7.4
[  ] rabbitmq_trust_store              3.7.4
[e*] rabbitmq_web_dispatch             3.7.4
[  ] rabbitmq_web_mqtt                 3.7.4
[  ] rabbitmq_web_mqtt_examples        3.7.4
[  ] rabbitmq_web_stomp                3.7.4
[  ] rabbitmq_web_stomp_examples       3.7.4
  • Client library version (for all libraries used)
  • Operating system, version, and patch level: Ubuntu 1604-x64
root@ubuntu-server-1604-x64:~# locale
LANG=C
LANGUAGE=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
root@ubuntu-server-1604-x64:~# rabbitmqctl list_users
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
@michaelklishin
Copy link
Member

This is an Elixir requirement, not that of RabbitMQ CLI tools (which are in https://github.com/rabbitmq/rabbitmq-cli, by the way).

There are no plans to switch away from using Elixir for CLI tools.

@michaelklishin michaelklishin changed the title Elixir error when locale is not UTF-8 Elixir warning when locale is not UTF-8 Apr 5, 2018
@rabbitmq rabbitmq locked and limited conversation to collaborators Apr 5, 2018
@michaelklishin
Copy link
Member

Configuration software that uses CLI tools can override locale environment variables for the calls that where parsing the output is warranted:

LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" rabbitmqctl …

as a workaround. We will consider forcing this in our shell scripts (filed #1573 for that with a more specific problem statement) but IIRC this has been considered before and rejected.

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

No branches or pull requests

2 participants