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

An error is reported when the consul --version command is executed. #21235

Open
lillianokok opened this issue May 29, 2024 · 1 comment
Open

Comments

@lillianokok
Copy link

lillianokok commented May 29, 2024

When the 1.18.2 version is used, an error is reported when the consul --version and consul -h commands are executed after the installation. The error information is as follows:
[root@localhost -]#consul -h
Fatal error with internal time set; check makefile for build date 0001-01-01 00:00:00 +0000 UTC parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"

Usage: consul [--version] [--help] []

Available commands are:
acl Interact with Consul's ACLs
agent Runs a Consul agent
catalog Interact with the catalog
Config Interact with Consul's Centralized Configurations
connect Interact with Consul Connect

[root@localhost -]#consul --version
parsing time "" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "2006"

@vijayraghav-io
Copy link
Contributor

vijayraghav-io commented May 31, 2024

This will happen if source code is downloaded and consul binary is built from it without cloning git repo, as the git commit hash is not available in this case, the builddate would be empty and hence version info is not available.

Try this ->
git clone https://github.com/hashicorp/consul.git
git checkout 9fc827c

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

No branches or pull requests

2 participants