Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.

Install a MID Server on Linux

Log in to subscribe to topics and get notified when content changes.

Install a MID Server on Linux

The MID Server installer automates the installation of a MID Server on a Linux computer.

Before you begin

Verify that the host computer satisfies the MID Server system requirements.

Role required: admin, mid_server

About this task

OpenJDK version 1.8.0_181 is bundled with the MID Server installer package and is installed on the host for all new MID Servers. The installer automatically configures OpenJDK to run in your environment. No additional configuration is required. This version supports both 32 bit and 64 bit MID Servers. For the best performance, install the 64 bit MID Server for your operating system.
Note: ServiceNow will discontinue support for 32 bit MID Servers in a future release.
Upgraded MID Servers might use different Java versions depending on their release level.
  • MID Servers upgraded from Kingston and earlier use the OpenJDK provided with the MID Server installer. This version of the OpenJDK was tested and certified for use with these MID Servers.
  • MID Servers upgraded from London continue to use the same JRE you configured for London. The MID Server supports JRE 1.8.

Click this link to view the installation video:

Procedure

  1. From the Linux command line, type mkdir -p /servicenow/mid server name to create the installation directory. You need to have read/write/execute permissions on this folder.
  2. Extract the downloaded MID Server archive file, mid.os.zip into the servicenow/mid server name/ directory. Use the MID Server name created in the instance or create a new name that you will use for this MID Server moving forward.
    The resulting directory structure is /servicenow/<mid server name>/agent.
  3. Change to the servicenow/mid server name /agent directory, and enter the following command to start the MID Server installer: ./installer.sh.
    If you prefer to manually configure the MID Server instead, skip to step 13.
  4. Use the installer to enter the following information.

    An example MID Server installation

    Field Description
    ServiceNow instance URL Enter the full URL of your instance, for example:

    https://mycompanyinstace.service-now.com

    ServiceNow MID Server username Enter the user name of the MID Server user that you already created. The MID Server user must have the mid_server role.
    ServiceNow MID Server password Enter the password for the user in the ServiceNow MID Server username.
    Use proxy Select this check box if your MID Server communicates through a proxy to connect to the instance.
    Note: Your proxy server must use Basic Authentication for the MID server to connect to the instance.
    Proxy host Enter the proxy server host name or IP address. Do not include the protocol in the host name. For example, enter proxyserver.domain.com, not https://proxyserver.domain.com.
    Proxy port Enter the port through which the proxy server communicates. If you leave this field blank, it should use the proxy server's default port number.
    Proxy username Enter the user name that has administrator rights to the proxy server.
    Proxy password Enter the password for the user name.
  5. Click Test your connection to validate the credentials and instance information. If you encounter any errors, verify the information that you input.
  6. Click Next.
  7. Configure the MID name parameters (see table).
    The wrapper settings are not applicable for Linux operating systems and are disabled for this installation.
    Configurin the MID Server name
    Table 1.
    Field Description
    MID Server name Enter any MID Server name.
    MID Service wrapper name Modify this field if necessary. It is populated automatically by prefixing snc_mid_ to the MID Server name. In most cases, you do not need to modify this.
    MID Server wrapper display name Modify this field if necessary. It is populated automatically by prefixing ServiceNow MID Server_ to the MID Server name. In most cases, you do not need to modify this.
  8. Click Next to view the summary.
    Starting the MID Server
  9. Click Start MID Server.
    The local host starts the MID Server.
    When the MID Server service starts, it verifies that it is the only active (not down) MID Server with that name. If the MID Server discovers another active MID Server with the same name, the starting MID Server waits 5 minutes and sends another query. The MID Server repeats this query three times and logs each attempt in the agent log. If the MID Server still detects a duplicate after this cycle, it creates a record in the MID Server Issue [ecc_agent_issue] table and shuts down.
    Note: The record in the MID Server Issue [ecc_agent_issue] table cannot be resolved automatically by the instance. Close this record manually for accounting purposes. Either mark the issue Resolved or delete it.
  10. Click Mid Servers List Page.
    The installer opens the MID Server list from your instance.
  11. Select the MID Server name from the list.
    Note: It may take a few seconds for the MID Server time to establish a connection with your instance.
    The system displays the MID Server record.
  12. From Related Links, click Validate.
    The MID Server Validated changes to Yes.
  13. To configure the MID Server manually, change to the servicenow/mid server name /agent directory, and then edit the config.xml file as follows:
    1. Find the element <parameter name="url" value="https://YOUR_INSTANCE.service-now.com" /> and change the value to the URL of your instance.
    2. Enter the MID user credentials in the mid.instance.username and mid.instance.password parameters.
      By default, the MID Server, uses basic authentication for SOAP messages. The password value is also encrypted authentication.
    3. Find the <parameter name="name" value="YOUR_MIDSERVER_NAME_GOES_HERE" /> element and change the value for the MID Server name.
    4. (Optional) Enter connection information for the proxy server. Remove the appropriate comment tags from the proxy configuration information.
      For example, you can configure these parameters:
      • mid.proxy.use_proxy
      • mid.proxy.host
      • mid.proxy.port
      • mid.proxy.username
      • mid.proxy.password
  14. Start the MID Server and verify that it is active.
    1. In the MID Server home directory (agent), execute the shell script start.sh to start the new MID Server.
    2. Log into the instance and navigate to MID Servers > Servers to verify that your new MID Server has a Status or Up.
      Additional log information appears here:
      • The MID Server log on the instance.
      • The corresponding agent0.log.0 and wrapper logs (wrapper.log) in the MID Server agent\logs folder.
  15. To configure the MID Server to restart automatically when the host is restarted, run ${base_install_dir}/agent/bin/mid.sh install as root.
    This command installs the MID Server as a daemon service and adds the auto start scripts to the init.d directory.
    Note: You cannot install more than one MID Server service as a daemon on a Linux host. This is a limitation of the Tanuki wrapper service.
  16. To stop the MID Server, navigate to the MID Server home (agent) directory and execute the stop.sh shell script.
  17. To restart a stopped MID Server, use either of these procedures:
    • In the instance, navigate to MID Servers > Servers and open the record for a Down server. Under Related Links, click Restart MID.
    • Navigate to the MID Server home (agent) directory and execute the restart-service.sh script, using one of these commands:
      • ./restart-service.sh
      • sh restart-service.sh
      • bash restart-service.sh

What to do next

Configure MID Server parameters, which control several aspects of MID Server functionality, including proxy servers, debugging, and upgrade.

Configure a Linux MID Server to use an existing JRE

You can choose to use an existing JRE for your MID Server rather than the OpenJDK provided with the MID Server installer.

Before you begin

Ensure that your JRE version is supported. See MID Server system requirements for details.

Role required: admin

About this task

By electing to use your own JRE, you are responsible for upgrading it as necessary.

Procedure

  1. Navigate to this file in the MID Server installation directory:
    agent/conf/wrapper-override.conf
  2. To specify the existing Java executable that you want to use, add this line to the file:
    wrapper.java.command={your_java_executable}

    For more information, see the Java service wrapper property documentation.

  3. Save the file.

Uninstall a Linux MID Server

The MID Server runs as a stand-alone service. You can remove a stand-alone MID Server service to accommodate such tasks as redeploying the MID Server to another host machine or changing the unique name of a MID Server when deploying multiple MID Servers.

Before you begin

Role required: admin

Procedure

  1. From the MID Server home directory (agent directory) type stop.sh.
  2. From a command prompt, go to the \agent\bin directory in the MID Server installation directory.
  3. Confirm that the MID Server is stopped by executing the bin/mid.sh status shell script.
  4. After the MID Server stops, delete the files in the agent directory.
Feedback