Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
MID Server cannot connect to instance due to authentication issue - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • MID Server cannot connect to instance due to authentication issue
KB0696916

MID Server cannot connect to instance due to authentication issue


2539 Views Last updated : Jul 22, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

MID server service shows running on the host but cannot connect to the instance.

When you look at the agent log from the logs directory, there is an error saying the MID server user cannot be authenticated.

Release

Applies to all releases

Cause

The agent_keystore.jks file is corrupted. This is the file which will encrypt the MID user password on the config.xml file.

Resolution

  1. From the services panel, stop the MID server service from running
  2. Navigate to agent\keystore directory on the MID server installation directory, and delete the agent_keystore.jks file
  3. Open config.xml file, remove the encrypted value for the "mid.instance.password" parameter, and re-enter the password in plain
  4. Scroll all the way to the bottom of the file, and remove the value for the parameter "keypairs.mid.id", and leave it as a blank value

                   
  5. Save the file, and restart the MID server service from the services console

Related Links

Once the MID server is able to connect with the instance due to the re-entered plain text password, it pulls the agent_keystore.jks file from the instance and encrypts the password on config.xml, so when you check the password in config.xml after the MID server is connected, it would be encrypted.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.