setmqweb (set mqweb server configuration)

Configure the mqweb server.


Purpose

We can use the setmqweb properties command to configure the mqweb server.

Changes to properties take effect dynamically, within a few seconds, unless otherwise stated.

You use the setmqweb pid command to change the product ID (PID) that the mqweb server runs under on z/OS . Before using setmqweb pid we should ensure the mqweb server has been stopped by using the MVS STOP command on the mqweb server started task.

Normally the mqweb server runs under the PID chosen when using the crtmqweb command, but you can use setmqweb pid to change this if needed.

See Product usage recording with IBM MQ for z/OS products for more information on PIDs and how they are used on z/OS.


Use the command on z/OS

Before issuing either the setmqweb or dspmqweb commands on z/OS, we must set the WLP_USER_DIR environment variable, so that the variable points to your mqweb server configuration.

To do this, issue the following command:
export WLP_USER_DIR=WLP_user_directory
where WLP_user_directory is the name of the directory passed to crtmqweb. For example:
export WLP_USER_DIR=/var/mqm/web/installation1

See Create the mqweb server for more information.


Syntax relating to the properties variant

setmqweb properties -r-kname-d-vvalue -l


Syntax relating to the pid variant

setmqweb pid -ppid_name -l


Parameters relating to the properties variant

    -r
    Reset to default values. This parameter removes all user-modified configuration properties from the mqwebuser.xml file.

    -k name
    The name of the configuration property to add, update, or remove to or from the mqwebuser.xml file. The following values are the valid values for name on all platforms, including the IBM MQ Appliance:

      ltpaExpiration
      This configuration property is used to specify the time, in seconds, before the LTPA token expires.
      The value for this property is an integer value.

      maxTraceFiles
      This configuration property is used to specify the maximum number of mqweb server log files that are generated by the mqweb server.
      The value for this property is an integer value.

      maxTraceFileSize
      This configuration property is used to specify the maximum size, in MB, that each mqweb server log file can reach.
      The value for this property is an integer value.

      mqRestCorsAllowedOrigins
      This configuration property is used to specify the origins that are allowed to access the REST API. For more information about CORS, see Configure CORS for the REST API.
      The value for this property is a string value.

      mqRestCorsMaxAgeInSeconds
      This configuration property is used to specify the time, in seconds, that a web browser can cache the results of any CORS pre-flight checks.
      The value for this property is an integer value.

      mqRestCsrfValidation
      This configuration property is used to specify whether CSRF validation checks are performed. A value of false removes the CSRF token validation checks.
      The value for this property is a boolean value.

      mqRestGatewayEnabled
      This configuration property is used to specify whether the administrative REST API gateway is enabled.
      The value for this property is a boolean value.

      mqRestGatewayQmgr
      This configuration property is used to specify the name of the queue manager to use as the gateway queue manager. This queue manager must be in the same installation as the mqweb server. A blank value indicates that no queue manager is configured as the gateway queue manager.
      The value for this property is a string value.

      mqRestMessagingEnabled
      This configuration property is used to specify whether the messaging REST API is enabled.
      The value for this property is a boolean value.

      mqRestMessagingFullPoolBehavior
      This configuration property is used to specify the behavior of the messaging REST API when all connections in the connection pool are in use.
      The value can be one of the following values:

        block
        When all the connections in the pool are in use, wait for a connection to become available. When this option is used, the wait for a connection is indefinite.
        Inactive connections are closed and removed from a queue manager pool automatically. The state of each queue manager pool is interrogated every 2 minutes, and any connections that have been inactive for the last 30 seconds are closed and removed from the associated pool.

        error
        When all the connections in the pool are in use, return an error.

        overflow
        When all the connections in the pool are in use, create a non-pooled connection to use. This connection is destroyed after it is used.

      The value for this property is a string value.

      mqRestMessagingMaxPoolSize
      This configuration property is used to specify the maximum connection pool size for each queue manager connection pool.
      The value for this property is an integer value.

      mqRestMftCommandQmgr
      This configuration property is used to specify the name of the command queue manager to which create transfer and create, delete or update resource monitor requests are submitted by the REST API for MFT.
      The value for this property is a string value.
      Changes to the value of this property take effect when the mqweb server is next started.

      mqRestMftCoordinationQmgr
      This configuration property is used to specify the name of the coordination queue manager from which transfer details are retrieved by the REST API for MFT.
      The value for this property is a string value.
      Changes to the value of this property take effect when the mqweb server is next started.

      mqRestMftEnabled
      This configuration property is used to specify whether the REST API for MFT is enabled.
      The value for this property is a boolean value.
      Changes to the value of this property take effect when the mqweb server is next started.

      mqRestMftReconnectTimeoutInMinutes
      This configuration property is used to specify the length of time, in minutes, after which the REST API for MFT stops trying to connect to the coordination queue manager.
      The value for this property is an integer value.
      Changes to the value of this property take effect when the mqweb server is next started.

      mqRestRequestTimeout
      This configuration property is used to specify the time, in seconds, before a REST request times out.
      The value for this property is an integer value.

      mqConsoleEarName
      This configuration property is used to switch between the New Web Console and the Dashboard Web Console.
      The value for this property is a string value and is "com.ibm.mq.webconsole" to switch to the New Web Console, and "com.ibm.mq.console" to switch to the Dashboard Web Console.

      traceSpec
      This configuration property is used to specify the level of trace that is generated by the mqweb server. For a list of possible values, see Configure logging for the IBM MQ Console and REST API.
      The value for this property is a string value.

    The following values are the additional valid values for name on z/OS, UNIX, Linux, and Windows:

      httpHost
      This configuration property is used to specify the HTTP host name as an IP address, domain name server (DNS) host name with domain name suffix, or the DNS host name of the server where IBM MQ is installed.
      We can use an asterisk in double quotation marks to specify all available network interfaces.
      We can use the value localhost to allow only local connections.
      The value for this property is a string value.

      httpPort
      This configuration property is used to specify the HTTP port number that is used for HTTP connections.
      We can use a value of -1 to disable the port.
      The value for this property is an integer value.

      httpsPort
      This configuration property is used to specify the HTTPS port number that is used for HTTPS connections.
      We can use a value of -1 to disable the port.
      The value for this property is an integer value.

      ltpaCookieName
      This configuration property is used to specify the name of the LTPA token cookie name.
      By default, the value of this property is LtpaToken2_${env.MQWEB_LTPA_SUFFIX} on UNIX, Linux, and Windows , or LtpaToken2_${httpsPort} on z/OS. The variable after the LtpaToken2_ prefix is used by the mqweb server to generate a unique name for the cookie. We cannot set this variable, but we can change the ltpaCookieName to a value of our choosing.
      The value for this property is a string value.

      maxMsgTraceFiles
      This configuration property is used to specify the maximum number of messaging trace files that are generated by the mqweb server for the IBM MQ Console.
      The value for this property is a integer value.

      maxMsgTraceFileSize
      This configuration property is used to specify the maximum size, in MB, that each messaging trace file can reach.
      This property only applies to the IBM MQ Console.
      The value for this property is a integer value.

      mqConsoleAutostart
      This configuration property is used to specify whether the IBM MQ Console automatically starts when the mqweb server starts.
      The value for this property is a boolean value.

      mqConsoleFrameAncestors
      This configuration property is used to specify the list of origins of web pages which can embed the IBM MQ Console in an IFrame. For more information about this property, see embedding the IBM MQ Console in an IFrame.
      The value for this property is a string.

      mqRestAutostart
      This configuration property is used to specify whether the REST API automatically starts when the mqweb server starts.
      The value for this property is a boolean value.

      secureLtpa
      This configuration property is used to specify whether the LTPA token is secured for all requests. An unsecured LTPA token is required in order send HTTP requests from a browser.
      The value for this property is a boolean value.

    The following values are the additional valid values for name on UNIX, Linux, and Windows:

      managementMode
      This configuration property is used to specify whether queue managers and listeners are able to be created, deleted, started, and stopped by the IBM MQ Console.
      The value for this property is a string value and can be one of the following values:

        standard
        Queue managers and listeners can be created and administered in the IBM MQ Console.

        externallyprovisioned
        Queue managers and listeners cannot be created in the IBM MQ Console. Only queue managers and listeners that are created outside of the IBM MQ Console can be administered.

    -d
    Deletes the specified configuration property from the mqwebuser.xml file.

    -v value
    The value of the configuration property to add to, or update in, the mqwebuser.xml file. Any existing configuration properties of the same name are overwritten. Duplicate configuration properties are removed.
    The value is case-sensitive. To specify an asterisk, multiple tokens, or an empty value, enclose the value in double quotation marks.
    The value that is specified is not validated. If incorrect values are specified a subsequent attempt to start the mqweb server might fail.

    -l
    Enable verbose logging. Diagnostic information is written to an mqweb server log file.


Parameters relating to the pid variant

    -p pid_name
    Specifies the PID that the mqweb server will run under. pid_name should be one of:

      MQ
      The mqweb server runs under IBM MQ for z/OS (5655-MQ9)

      VUE
      The mqweb server runs under IBM MQ for z/OS Value Unit Edition (5655-VU9)

      ADVANCEDVUE
      the mqweb server runs under IBM MQ Advanced for z/OS VUE (5655-AV1)

    -l
    Enable verbose logging. Diagnostic information is written to an mqweb server log file.


Return codes

Return code Description
0 Command successful
>0 Command not successful.
For a full list of server command exit codes, see Liberty:server command options in the WebSphere Application Server documentation.


Related commands

Command Description
strmqweb Start the mqweb server.
endmqweb Stop the mqweb server.
dspmqweb Display the status or configuration of the mqweb server.
Parent topic: IBM MQ control commands reference