I cannot log in to Elastic Enterprise Search

Elastic Enterprise Search has been installed.

After executing the following command, I was able to see the login screen from a browser.
ENT_SEARCH_DEFAULT_PASSWORD=[REDACTED] bin/enterprise-search.

Even if I enter the Username and Password, the following message appears and I cannot login.
Username or password is incorrect.

Username is the one configured in enterprise-search.yml, for example
elasticsearch.username: elastic.

Password is the one you specified at runtime, for example
[REDACTED]?
Isn't it?

How can I be sure of these?

When you run the command, you will get the following message.

#########################################################

Success! Elastic Enterprise Search is starting successfully.

In a few moments, you'll be able to login at the following address:

* URL: http://XXX.XXX.XXX.XXX:3002
  * If this is your first time starting Enterprise Search, check the console output above for your user authentication credentials.
  * Visit the documentation: https://www.elastic.co/guide/en/enterprise-search

Secret session key has been generated.

Set the key in your config file to persist user sessions through process restarts:

secret_session_key: [REDACTED]


#########################################################

However, what should I do if I no longer see authentication credentials?

Hey @its-ogawa,

I'm assuming this is a self hosted deploy, and I'm also assuming you're using standard auth.

The ENT_SEARCH_DEFAULT_PASSWORD parameter will only work on the first successful boot sequence, after which it is ignored.

If you missed the generated password displayed in the log output during the first successful boot sequence, you can force an auth reset by running bin/enterprise-search --reset-auth.

Let me know if that helps!

Ross

1 Like

ใ‚ขใƒ‰ใƒใ‚คใ‚นใ‚’ใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™ใ€‚

่ช่จผใ‚’ใƒชใ‚ปใƒƒใƒˆใ—ใฆใฟใพใ—ใŸใ€‚
ไปฅไธ‹ใฎใƒกใƒƒใ‚ปใƒผใ‚ธใŒ่กจ็คบใ•ใ‚Œใ‚‹ใ“ใจใ‚’็ขบ่ชใ—ใพใ—ใŸใ€‚

$ bin/enterprise-search --reset-auth
... snip ..
*** User credentials have been reset! username: enterprise_search, password: [REDACTED] ***

Next, we ran the following command again to confirm that enterprise search was started.

$ ENT_SEARCH_DEFAULT_PASSWORD=[REDACTED] bin/enterprise-search
... snip ...

However, I am unable to log in as well.

Will I be issued a new password in this case?
I don't see any such message.

I am trying the following procedure.

I checked the documentation for elasticsearch.

I found that .ent-search-actastic-users_v5 contains the value "enterprise_search" as elasticsearch_username.
This is the username required for login, right?

On the other hand, I think the equivalent of password is encrypted_password, but the value is empty.

Where did the password go?

@ross.bell
You're right.

Ah. I may have simply not been able to reload.
I was able to log in with the following steps.

$ bin/enterprise-search --reset-auth
... snip ..
*** User credentials have been reset! username: enterprise_search, password: **************** ***

$ ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search
... snip ...
Success! Elastic Enterprise Search is starting successfully.

In a few moments, you'll be able to login at the following address:

* URL: http://XXX.XXX.XXX.XXX:3002
... snip ...

When you see the above message, go to http://XXX.XXX.XXX.XXX:3002.
Set the following authentication information.

Username: enterprise_search
Password: [your_password]

Password is the ENT_SEARCH_DEFAULT_PASSWORD you specified when you started the enterprise search.

Note that if you have left the login page of http://XXX.XXX.XXX.XXX:3002 open, you will need to reload it.

Hey @its-ogawa,

It sounds like you were eventually able to log in? There is a known issue where sometimes you have to refresh the login screen after restarting an Enterprise Search cluster.

I would recommend editing/redacting your responses that include passwords just to be safe.

Ross

Even though this is a sample, it was unintentional to include the password. Sorry about that.

The most recent answer could be edited, but the topic content and the answer in progress could no longer be edited.
If it is inappropriate, I will delete the entire topic.

No worries, it looks like I was able to go back and edit out any passwords. Glad we got this figured out!

Thank you for your help.

Now I can publish with ease.

I hope this topic will also be useful for newbies to EnterpriseSearch.

1 Like

Sorry to ask again on a topic that has been closed once.

Could you please elaborate on how to do the following.

There is a known issue where sometimes you have to refresh the login screen after restarting an Enterprise Search cluster.

I reset the auth password again, then specified ENT_SEARCH_DEFAULT_PASSWORD and started EnterpriseSearch.
However, I cannot login with the specified password.
I have tried reloading the browser and running it against a newly launched browser, but it does not work.

I have repeated this method several times, but it seems that the password displayed when resetting is a random string, different from the one specified in ENT_SEARCH_DEFAULT_PASSWORD.

The following command doesn't seem to be working, is there a requirement for it to work?

$ ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search

For example, execute the following commands in rapid succession

$ ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search
... snip ...
$ bin/enterprise-search --reset-auth
... snip ...
This operation will reset the password of the default user: enterprise_search.
Please confirm that you would like to continue [y/N]:y
*** User credentials have been reset! username: enterprise_search, password: [this_is_password] ***

The password is expected to be [your_password], but a completely different [this_is_password] is displayed.

Keep the ENT_SEARCH_DEFAULT_PASSWORD set when you run the --reset-auth command:

ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search --reset-auth
1 Like

Thank you for your repeated instructions.
I was able to reset it with that command.
It was very helpful.

Now I have a couple of questions.

If I don't know the password issued by EnterpriseSearch and I want to reset it, isn't it difficult to specify the value of ENT_SEARCH_DEFAULT_PASSWORD?
In fact, if you have the wrong value for ENT_SEARCH_DEFAULT_PASSWORD, you could not reset it.

Or is it wrong to use this command when I want to reset my password?
Is there a better way?

I wonder if we're confusing resetting the admin password and resetting a normal user's password. You shouldn't need to know any prior value of ENT_SEARCH_DEFAULT_PASSWORD in order to run the --reset-auth command.

I would like to know the correct way to reset the admin password.

Is it the following command?

# ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search --reset-auth

Is it necessary to specify either ENT_SEARCH_DEFAULT_PASSWORD or --reset-auth?

What you've posted is the correct way to reset the admin password:

ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search --reset-auth

You must specify --reset-auth in order to trigger the reset command. If you don't specify a ENT_SEARCH_DEFAULT_PASSWORD environment variable, a random password will be generated and displayed when running the command.

1 Like