type=page
status=published
title=create-network-listener
next=create-node-config.html
prev=create-module-config.html
~~~~~~
create-network-listener
=======================

[[create-network-listener-1]][[GSRFM00046]][[create-network-listener]]

create-network-listener
-----------------------

adds a new network listener socket

[[sthref437]]

Synopsis

[source,oac_no_warn]
----
asadmin [asadmin-options] create-network-listener [--help]
[--address address] 
--listenerport listener-port 
[--threadpool thread-pool] 
--protocol protocol 
[--transport transport] 
[--enabled={true|false}] 
[--jkenabled={false|true}]
[--target target]
listener-name
----

[[sthref438]]

Description

The `create-network-listener` subcommand creates a network listener.
This subcommand is supported in remote mode only.


[NOTE]
=======================================================================

If you edit the special network listener named `admin-listener`, you
must restart the server for the changes to take effect. The
Administration Console does not tell you that a restart is required in
this case.

=======================================================================



[NOTE]
=======================================================================

You can use the `create-http-listener` subcommand to create a network
listener that uses the HTTP protocol without having to first create a
protocol, transport, or HTTP configuration. This subcommand is a
convenient shortcut, but it gives access to only a limited number of
options.

=======================================================================


[[sthref439]]

Options

asadmin-options::
  Options for the `asadmin` utility. For information about these
  options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
  Displays the help text for the subcommand.
`--address`::
  The IP address or the hostname (resolvable by DNS).
`--listenerport`::
  The port number to create the listen socket on. Legal values are
  1-65535. On UNIX, creating sockets that listen on ports 1-1024
  requires superuser privileges. Configuring an SSL listen socket to
  listen on port 443 is standard.
`--threadpool`::
  The name of the thread pool for this listener. Specifying a thread
  pool is optional. The default is `http-thread-pool`.
`--protocol`::
  The name of the protocol for this listener.
`--transport`::
  The name of the transport for this listener. Specifying a transport is
  optional. The default is `tcp`.
`--enabled`::
  If set to `true`, the default, the listener is enabled at runtime.
`--jkenabled`::
  If set to `true`, `mod_jk` is enabled for this listener. The default
  is false.
`--target`::
  Creates the network listener only on the specified target. Valid
  values are as follows: +
  `server`;;
    Creates the network listener on the default server instance. This is
    the default value.
  configuration-name;;
    Creates the network listener in the specified configuration.
  cluster-name;;
    Creates the network listener on all server instances in the
    specified cluster.
  standalone-instance-name;;
    Creates the network listener on the specified standalone server
    instance.

[[sthref440]]

Operands

listener-name::
  The name of the network listener.

[[sthref441]]

Examples

[[GSRFM508]][[sthref442]]

Example 1   Creating a Network Listener

The following command creates a network listener named `sampleListener`
that is not enabled at runtime:

[source,oac_no_warn]
----
asadmin> create-network-listener --listenerport 7272 protocol http-1 
--enabled=false sampleListener
Command create-network-listener executed successfully.
----

[[sthref443]]

Exit Status

0::
  command executed successfully
1::
  error in executing the command

[[sthref444]]

See Also

link:asadmin.html#asadmin-1m[`asadmin`(1M)]

link:create-http-listener.html#create-http-listener-1[`create-http-listener`(1)],
link:create-protocol.html#create-protocol-1[`create-protocol`(1)],
link:create-threadpool.html#create-threadpool-1[`create-threadpool`(1)],
link:create-transport.html#create-transport-1[`create-transport`(1)],
link:delete-network-listener.html#delete-network-listener-1[`delete-network-listener`(1)],
link:list-network-listeners.html#list-network-listeners-1[`list-network-listeners`(1)]


