Xpack setup-passwords gives java.net.BindException

I am following elastic guideto install xpack. (ref: https://www.elastic.co/guide/en/elasticsearch/reference/6.2/installing-xpack-es.html)

but when i try to setup-password (command : bin/x-pack/setup-passwords interactive) i get the following error :
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8946; nested exception is:
java.net.BindException: Address already in use (Bind failed)

The port seems to be used to by elasticsearch itself. this port is in use when i start elasticsearch which is as per step 6 in the guide.

is that we need to shut elasticsearch while setting up the password ?

is that we need to shut elasticsearch while setting up the password ?

No, you need to have Elasticsearch running in order to set the passwords.

The problem seems to be that your java processes are configured to enable an RMI server when they start. I'm not quite sure how you've managed to do that - maybe you've got a custom java agent installed, or something like that.

What details can you provide about your java installation and environment variables?

oh thanks .

i did find that the jmxremote port (elasticsearch env file) was pointing to the same port number. currently i commented the java args.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.