container console Status: Closed

Bug #1831164 reported by fatis
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zun UI
New
Undecided
Unassigned

Bug Description

I work on rocky release when I acces to the console of container on dashboard, its status is closed as shown on screenshot attached

Revision history for this message
fatis (mohamed-el-amine) wrote :
description: updated
Revision history for this message
hongbin (hongbin034) wrote :

Several things to check:

* If you are able to access the console on CLI: zun run --interactive <image> /bin/sh
* Your configuration 'base_url' in controller node. See here: https://docs.openstack.org/zun/latest/install/controller-install.html and the following note:

.. note::

   This ``base_url`` will be used by end users to access the console of
   their containers so make sure this URL is accessible from your
   intended users and the port ``6784`` is not blocked by firewall.

If it doesn't help, please paste me your Zun configuration file (/etc/zun.conf) in the *controller* node (with sensitive information removed, such as password).

Revision history for this message
fatis (mohamed-el-amine) wrote :
Download full text (81.4 KiB)

# cat /etc/zun/zun.conf
[DEFAULT]

#
# From oslo.log
#
transport_url = rabbit://openstack:ce4e1a259c263b65d4d3@controller

# If set to true, the logging level will be set to DEBUG instead of the default
# INFO level. (boolean value)
# Note: This option can be changed without restarting.
#debug = false

# The name of a logging configuration file. This file is appended to any
# existing logging configuration files. For details about logging configuration
# files, see the Python logging module documentation. Note that when logging
# configuration files are used then all logging configuration is set in the
# configuration file and other logging configuration options are ignored (for
# example, logging_context_format_string). (string value)
# Note: This option can be changed without restarting.
# Deprecated group/name - [DEFAULT]/log_config
#log_config_append = <None>

# Defines the format string for %%(asctime)s in log records. Default:
# %(default)s . This option is ignored if log_config_append is set. (string
# value)
#log_date_format = %Y-%m-%d %H:%M:%S

# (Optional) Name of log file to send logging output to. If no default is set,
# logging will go to stderr as defined by use_stderr. This option is ignored if
# log_config_append is set. (string value)
# Deprecated group/name - [DEFAULT]/logfile
#log_file = <None>

# (Optional) The base directory used for relative log_file paths. This option
# is ignored if log_config_append is set. (string value)
# Deprecated group/name - [DEFAULT]/logdir
#log_dir = <None>

# Uses logging handler designed to watch file system. When log file is moved or
# removed this handler will open a new log file with specified path
# instantaneously. It makes sense only if log_file option is specified and
# Linux platform is used. This option is ignored if log_config_append is set.
# (boolean value)
#watch_log_file = false

# Use syslog for logging. Existing syslog format is DEPRECATED and will be
# changed later to honor RFC5424. This option is ignored if log_config_append
# is set. (boolean value)
#use_syslog = false

# Enable journald for logging. If running in a systemd environment you may wish
# to enable journal support. Doing so will use the journal native protocol
# which includes structured metadata in addition to log messages.This option is
# ignored if log_config_append is set. (boolean value)
#use_journal = false

# Syslog facility to receive log lines. This option is ignored if
# log_config_append is set. (string value)
#syslog_log_facility = LOG_USER

# Use JSON formatting for logging. This option is ignored if log_config_append
# is set. (boolean value)
#use_json = false

# Log output to standard error. This option is ignored if log_config_append is
# set. (boolean value)
#use_stderr = false

# Format string to use for log messages with context. (string value)
#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s

# Format string to use for log messages when context is undefined. (string
# value)
#logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(m...

Revision history for this message
hongbin (hongbin034) wrote :

Yes, it looks your `base_url` is not set. As a result, the default url would be:

  ws://$wsproxy_host:$wsproxy_port/

which is:

  ws://192.168.0.1:6784

Depending on the location of your browser, it might not be able to access 192.168.0.1:6784 . You would need to configure `base_url` and using an external accessible IP address (instead of 192.168.0.1).

Revision history for this message
fatis (mohamed-el-amine) wrote :
Download full text (81.3 KiB)

it set on the compute node zun.conf

base_url = ws://controller:6784/

# cat /etc/zun/zun.conf
[DEFAULT]

#
# From oslo.log
#
transport_url = rabbit://openstack:ce4e1a259c263b65d4d3@controller
state_path = /var/lib/zun
# If set to true, the logging level will be set to DEBUG instead of the default
# INFO level. (boolean value)
# Note: This option can be changed without restarting.
#debug = false

# The name of a logging configuration file. This file is appended to any
# existing logging configuration files. For details about logging configuration
# files, see the Python logging module documentation. Note that when logging
# configuration files are used then all logging configuration is set in the
# configuration file and other logging configuration options are ignored (for
# example, logging_context_format_string). (string value)
# Note: This option can be changed without restarting.
# Deprecated group/name - [DEFAULT]/log_config
#log_config_append = <None>

# Defines the format string for %%(asctime)s in log records. Default:
# %(default)s . This option is ignored if log_config_append is set. (string
# value)
#log_date_format = %Y-%m-%d %H:%M:%S

# (Optional) Name of log file to send logging output to. If no default is set,
# logging will go to stderr as defined by use_stderr. This option is ignored if
# log_config_append is set. (string value)
# Deprecated group/name - [DEFAULT]/logfile
#log_file = <None>

# (Optional) The base directory used for relative log_file paths. This option
# is ignored if log_config_append is set. (string value)
# Deprecated group/name - [DEFAULT]/logdir
#log_dir = <None>

# Uses logging handler designed to watch file system. When log file is moved or
# removed this handler will open a new log file with specified path
# instantaneously. It makes sense only if log_file option is specified and
# Linux platform is used. This option is ignored if log_config_append is set.
# (boolean value)
#watch_log_file = false

# Use syslog for logging. Existing syslog format is DEPRECATED and will be
# changed later to honor RFC5424. This option is ignored if log_config_append
# is set. (boolean value)
#use_syslog = false

# Enable journald for logging. If running in a systemd environment you may wish
# to enable journal support. Doing so will use the journal native protocol
# which includes structured metadata in addition to log messages.This option is
# ignored if log_config_append is set. (boolean value)
#use_journal = false

# Syslog facility to receive log lines. This option is ignored if
# log_config_append is set. (string value)
#syslog_log_facility = LOG_USER

# Use JSON formatting for logging. This option is ignored if log_config_append
# is set. (boolean value)
#use_json = false

# Log output to standard error. This option is ignored if log_config_append is
# set. (boolean value)
#use_stderr = false

# Format string to use for log messages with context. (string value)
#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s

# Format string to use for log messages when context is undefined. (string
# value)
#logging_default_fo...

Revision history for this message
hongbin (hongbin034) wrote : Re: [Bug 1831164] Re: container console Status: Closed
Download full text (86.8 KiB)

On Sat, Jun 1, 2019 at 6:45 PM fatis <email address hidden> wrote:

> it set on the compute node zun.conf
>

I think it should be set in the controller node. Could you give it a try?

>
> base_url = ws://controller:6784/
>
> # cat /etc/zun/zun.conf
> [DEFAULT]
>
> #
> # From oslo.log
> #
> transport_url = rabbit://openstack:ce4e1a259c263b65d4d3@controller
> state_path = /var/lib/zun
> # If set to true, the logging level will be set to DEBUG instead of the
> default
> # INFO level. (boolean value)
> # Note: This option can be changed without restarting.
> #debug = false
>
> # The name of a logging configuration file. This file is appended to any
> # existing logging configuration files. For details about logging
> configuration
> # files, see the Python logging module documentation. Note that when
> logging
> # configuration files are used then all logging configuration is set in the
> # configuration file and other logging configuration options are ignored
> (for
> # example, logging_context_format_string). (string value)
> # Note: This option can be changed without restarting.
> # Deprecated group/name - [DEFAULT]/log_config
> #log_config_append = <None>
>
> # Defines the format string for %%(asctime)s in log records. Default:
> # %(default)s . This option is ignored if log_config_append is set. (string
> # value)
> #log_date_format = %Y-%m-%d %H:%M:%S
>
> # (Optional) Name of log file to send logging output to. If no default is
> set,
> # logging will go to stderr as defined by use_stderr. This option is
> ignored if
> # log_config_append is set. (string value)
> # Deprecated group/name - [DEFAULT]/logfile
> #log_file = <None>
>
> # (Optional) The base directory used for relative log_file paths. This
> option
> # is ignored if log_config_append is set. (string value)
> # Deprecated group/name - [DEFAULT]/logdir
> #log_dir = <None>
>
> # Uses logging handler designed to watch file system. When log file is
> moved or
> # removed this handler will open a new log file with specified path
> # instantaneously. It makes sense only if log_file option is specified and
> # Linux platform is used. This option is ignored if log_config_append is
> set.
> # (boolean value)
> #watch_log_file = false
>
> # Use syslog for logging. Existing syslog format is DEPRECATED and will be
> # changed later to honor RFC5424. This option is ignored if
> log_config_append
> # is set. (boolean value)
> #use_syslog = false
>
> # Enable journald for logging. If running in a systemd environment you may
> wish
> # to enable journal support. Doing so will use the journal native protocol
> # which includes structured metadata in addition to log messages.This
> option is
> # ignored if log_config_append is set. (boolean value)
> #use_journal = false
>
> # Syslog facility to receive log lines. This option is ignored if
> # log_config_append is set. (string value)
> #syslog_log_facility = LOG_USER
>
> # Use JSON formatting for logging. This option is ignored if
> log_config_append
> # is set. (boolean value)
> #use_json = false
>
> # Log output to standard error. This option is ignored if
> log_config_append is
> # set. (boolean value)
> #use_stderr = false
>
> # Format s...

Revision history for this message
fatis (mohamed-el-amine) wrote :
Download full text (82.3 KiB)

I try but still not résolve

openstack --debug appcontainer exec --interactive container2 /bin/sh
WARNING: Failed to import plugin clustering.
START with options: --debug appcontainer exec --interactive container2 /bin/sh
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', aodh_endpoint='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_type='password', auth_url='http://controller:5000/v3', cacert=None, cert='', client_id='', client_secret='***', cloud='', code='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='public', key='', log_file=None, openid_scope='', os_alarming_api_version='2', os_beta_command=False, os_compute_api_version='', os_container_api_version='1.20', os_container_infra_api_version='1', os_data_processing_api_version='1.1', os_data_processing_url='', os_database_api_version='1', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='2', os_key_manager_api_version='1', os_loadbalancer_api_version='2.0', os_metrics_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_queues_api_version='2', os_volume_api_version='', os_workflow_api_version='2', passcode='', password='***', profile='', project_domain_id='', project_domain_name='default', project_id='', project_name='admin', protocol='', redirect_uri='', region_name='', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', roles='', service_provider='', service_provider_endpoint='', service_provider_entity_id='', system_scope='', timing=False, token='***', trust_id='', url='', user='', user_domain_id='', user_domain_name='default', user_id='', username='adminapi', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'image_status_code_retries': '5', 'key': None, 'database_api_version': '1', 'metrics_api_version': '1', 'data_processing_api_version': '1.1', 'auth_url': 'http://controller:5000/v3', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], 'queues_api_version': '2', 'verify': True, 'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'adminapi', 'container_infra_api_version': '1', 'loadbalancer_api_version': '2.0', 'verbose_level': 3, 'region_name': '', u'baremetal_introspection_status_code_retries': '5', 'api_timeout': None, 'image_api_version': '2', 'auth': {'user_domain_name': 'default', 'project_name': 'admin', 'project_domain_name': 'default'}, 'default_domain': 'default', 'container_api_version': '1.20', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'orchestration_api_version': '1', 'timing': False, 'password': '***', 'cacert': None, 'key_manager_api_version': '1', 'workflow_api_version': '2'...

Revision history for this message
samos667 (samos667) wrote :

I have exactly the same error, command "openstack appcontainer exec --interactive" works correctly, and "base_url =" is configured on my controller node.
My conf is attached if you want to see it (websocket_proxy section is at the bottom of the file).
I am available for any other information.

Revision history for this message
hongbin (hongbin034) wrote :

@samos667,

A few questions:

* Does this command work for you: "openstack appcontainer run --interactive ubuntu /bin/bash". If not, please paste me the debug output: "openstack --debug appcontainer run --interactive ubuntu /bin/bash"
* Your zun-wsproxy log (journalctl -u zun-wsproxy > zun-wsproxy.log)

Revision history for this message
samos667 (samos667) wrote :

The output of "openstack appcontainer run --interactive ubuntu /bin/bash" (I don't have the time to press enter)

Revision history for this message
samos667 (samos667) wrote :

The output of "openstack --debug appcontainer run --interactive ubuntu /bin/bash"

Revision history for this message
samos667 (samos667) wrote :

zun-wsproxy log.

Thanks for you help !

Revision history for this message
samos667 (samos667) wrote :

But when i do "openstack appcontainer exec --interactive delta-14-container /bin/bash" he work.

Bash output:

root@sam:~# openstack appcontainer exec --interactive delta-14-container /bin/bash
connected to delta-14-container, press Enter to continue
type ~. to disconnect
root@4c808c7c7841:/#

Revision history for this message
hongbin (hongbin034) wrote :

@samos667,

It seems you were hitting this bug: https://bugs.launchpad.net/zun-ui/+bug/1847889 . Let's move the discussion to there.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.