Skip to content
Smarter by Design.Simpler for Business

lb vhost ​

The lb vhost command manages the shared listening layer that receives the traffic of the vServices that share the same address. No record is created in this layer: only the running status is queried and, when needed, it is restarted. Its panel equivalent is the shared listening information on the vService screen.

There is no adding or deleting in this command

The shared listening layer is formed by itself as the vServices are defined. There are no add, update and delete sub-commands; there are only status and restart.

Command Summary ​

TR7 WEB-CLI · lb vhost
# Tab after the command
admin@TR7LBWAF01> lb vhost
restart status
 
admin@TR7LBWAF01> lb vhost status list # the status of all of them
admin@TR7LBWAF01> lb vhost status id <id> # the status of one
admin@TR7LBWAF01> lb vhost restart # restart
admin@TR7LBWAF01>  

Querying the Status ​

status list brings the running status of every shared listening layer: whether it is up or not, how long it has been running, how many times it has restarted, how many vServices pass over it and the addresses it listens to. A layer that the configuration expects but that is not present in the system is reported as an error, and a layer that carries on running although no vService needs it any more is reported as closed.

In the status id command the id of the layer is written without the field name, directly as the value (lb vhost status id <id>).

OrderFieldStatusValue
1dockerIdRequiredOnly in the status id command; the id of the layer whose status will be queried. Tab lists them
FieldWhat it doesWhat is written after it
--outputSelects the format of the outputjson · jsonp · tab · comma · semicolon · compact · default
--filterFilters the outputThe text to be searched; the matching ones are highlighted

While a problem is being looked for in the vServices that share an address, the health of this layer is looked at first; if the layer is not up, there is no point in looking at the vServices one by one.

Restarting ​

FieldWhat it doesWhat is written after it
--dockerIdDetermines which layer will be restartedThe layer id. If it is not given, all the shared listenings are restarted; normally there is only one
--hardReloadDetermines how the restart will be donefalse (default) asks the running process to read the configuration again and preserves the existing connections · true creates the layer from scratch and drops the connections

A hard restart cuts all the shared services

All the vServices that share an address pass over this layer. --hardReload true drops the connections of all of them at the same time; it should be preferred only when a configuration refresh is not enough.

Examples ​

TR7 WEB-CLI · status and restart
# look at the health of the layer first
admin@TR7LBWAF01> lb vhost status list
admin@TR7LBWAF01> lb vhost status id <id>
 
# refresh the configuration: the connections are preserved
admin@TR7LBWAF01> lb vhost restart
 
# create the layer from scratch: the connections drop
admin@TR7LBWAF01> lb vhost restart --dockerId <id> --hardReload true
admin@TR7LBWAF01>  

Things to Know ​

  • The layer is formed by itself. When the vServices that share the same address are defined, the shared listening layer is formed as well; it is not added by hand.
  • Normally there is a single layer. When --dockerId is not given, all the shared listenings are targeted; in the system there is usually one.
  • A soft refresh preserves the connections. The default restart makes the configuration be read again; the clients in a session are not affected.
  • The status output distinguishes two special cases. A layer that is in the configuration but not in the system appears as an error, and a layer that has become unnecessary but carries on running appears as closed.