Powered by Zoomin Software. For more details please contactZoomin

Run on Amazon Web Services (AWS)

Deployment and startup

  • Last Updated: April 14, 2026
  • 3 minute read
    • MarkLogic Server
    • Version 12.0
    • Documentation

MarkLogic is started as either a system service (from/sbin/service) or manually (for example, service MarkLogic start). The standard install starts MarkLogic on the next reboot after install, however it may be started via a script or system configuration at any point.

Any customization to the startup environment must be completely in place before MarkLogic starts the first time after an install so that it properly configures its role (single, cluster master, cluster joiner), detects the correct data volumes, Java JVM, paths, and other configurable information. This section describes the AWS-specific configuration variables.

MarkLogic is typically configured to start on boot, but also may be started manually. All startup paths should be configured to inherit the same environment so that behavior is consistent. The biggest variation depends on whether or not MarkLogic is pre-installed on the AMI.

During the init process, the interaction and dependency between MarkLogic services and other services may need to be considered especially if using an AMI without MarkLogic pre-installed and configured.

The following table shows the typical startup ordering of services on an AWS Linux system.

Order

Service

02

lvm2-monitor

08

ip6tables

08

iptables

10

network

11

auditd

12

rsyslog

58

ntpd

80

sendmail

85

MarkLogic ( Version 7 )

86

tomcat-jsvc

98[c]

cloud-final (All User defined upstart and cloud-init scripts)

98[M]

MarkLogic ( Version 8 )

99

local (/etc/rc.local)

Note

cloud-init has several components, you can arrange using very low level configurations for file and config data to be populated in cloud-config state (52) but deployment tools use this for their own purposes. Most common is 'user scripts' which are run in cloud-final (98[c]).

In Version 8, MarkLogic was moved to the LSB init configuration format which adds a dependency to run after cloud-final. This allows user configuration to be applied before MarkLogic whether or not it was pre-installed.

When MarkLogic is started, the following process runs:

  1. /sbin/service MarkLogic is invoked . This runs via init (e.g /etc/rc5.d/S98MarkLogic), manually (e.g. service MarkLogic start )

  2. /etc/sysconfig/MarkLogic is sourced (performing the following)

  3. Default values for core env vars are defaulted

  4. /etc/marklogic.conf is sourced (if it exists). This can modify or add variable.

  5. If MARKLOGIC_EC2_HOST !=1, no additional EC2 specific processing is performed.

  6. MARKLOGIC_HOSTNAME is calculated if not defined by using EC2 metadata in order

    • public-hostname

    • public-ipv4

    • local-hostname

    • local-ipv4

    • hostname

  7. MARKLOGIC_AWS_ROLE is fetched from the IAM Role associated with the instance.

  8. MARKLOGIC_EBS is set to /dev/sdf if not already set.

  9. MARKLOGIC_AWS_SWAP_SIZE configures 32GB as the default swap space size value.

  10. If MARKLOGIC_EC2_USERDATA != 0, then EC2 user data is read and parsed. Any name/value pairs overwrite existing settings.

  11. If MARKLOGIC_CLUSTER_NAME, MARKLOGIC_NODE_NAME and MARKOGIC_CLUSTER_MASTER is defined then the Managed Cluster logic is performed.

    • Forming or joining a cluster

    • Creating / attaching data volumes

    • Resolving hostname changes

    • Updating cluster configuration

      Note:

      This process is repeated on every boot and service start.

  12. If Step 11 is performed, all resolved variables are cached by writing to /var/local/mlcmd.conf to avoid the overhead of recalculating the values on a restart.

  13. If Step 11 is not performed, the following occurs:

    • If MARKLOGIC_ADMIN_AUTOCREATE is set and not empty:
      • MARKLOGIC_ADMIN_PASSWORD is set to the value of the EC2 metadata whose key is $MARKLOGIC_ADMIN_AUTOCREATE. This overwrites any previous setting of MARKLOGIC_ADMIN_PASSWORD.

      • If MARKLOGIC_ADMIN_PASSWORD is not empty and MARKLOGIC_ADMIN_USERNAME is empty then set MARKLOGIC_ADMIN_USERNAME="admin".

      • If both MARKLOGIC_ADMIN_PASSWORD and MARKLOGIC_ADMIN _USERNAME are not empty then:

        • Initialize and mount any volumes specified in MARKLOGIC_EBS_VOLUME(s) configuration.

        • Start the MarkLogic server.

        • Create the initial admin user and initialize the security database.

        • Wait for the server to restart and validate the login (retry, timeouts as currently implemented in the Managed Cluster startup).

      • Log the success or failure to the system log and console.

TitleResults for “How to create a CRG?”Also Available inAlert