Elastic Beanstalk deployment fail cfnbootstrap.construction_errors.ToolError - configuration

My eb is on Amazon linux server:
without this command in config file my file deployed successfully
commands:
brewCommands:
command: brew install antiword
but when i added this, it is throwing error
cfnbootstrap.construction_errors.ToolError:
here is my cfn-init.log file error
Unhandled exception during build: Command 001_install failed Traceback (most recent call last):
File "/opt/aws/bin/cfn-init", line 176, in <module>
worklog.build(metadata, configSets) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 137, in build
Contractor(metadata).build(configSets, self) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 564, in build
self.run_config(config, worklog) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 576, in run_config
CloudFormationCarpenter(config, self._auth_config).build(worklog) File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 276, in build
self._config.commands) File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command 001_install failed

Related

Cannot connect to MySQL database in TensorFlow Extended

I am having problems using a MySQL database as a metadata database in a TensorFlow Extended pipeline.
I used the penguin template to set up a very simple pipeline and also set up a MySQL database locally.
The only thing I changed in the code was using
tfx.orchestration.metadata.mysql_metadata_connection_config as the metadata_connection_config input to the pipeline instead of tfx.orchestration.metadata.sqlite_metadata_connection_config
from tfx import v1 as tfx
# [...] Add a simple CsvExampleGen
tfx.dsl.Pipeline(
pipeline_name=pipeline_name,
pipeline_root=pipeline_root,
components=components,
metadata_connection_config=tfx.orchestration.metadata
.mysql_metadata_connection_config(
host="localhost",
port=3306,
database="ml_metadata",
username="root",
password="password"),
beam_pipeline_args=beam_pipeline_args,
)
Running this code results in the following error message:
[2021-11-17 12:02:16,948] {taskinstance.py:1270} INFO - Marking task as FAILED. dag_id=penguin_pipeline, task_id=CsvExampleGen, execution_date=20211117T110208, start_date=20211117T110212, end_date=20211117T110216
[2021-11-17 12:02:16,966] {standard_task_runner.py:88} ERROR - Failed to execute job 101 for task CsvExampleGen
Traceback (most recent call last):
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/task/task_runner/standard_task_runner.py", line 85, in _start_by_fork
args.func(args, dag=self.dag)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/utils/cli.py", line 92, in wrapper
return f(*args, **kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/commands/task_command.py", line 292, in task_run
_run_task_by_selected_method(args, dag, ti)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/commands/task_command.py", line 107, in _run_task_by_selected_method
_run_raw_task(args, ti)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/cli/commands/task_command.py", line 180, in _run_raw_task
ti._run_raw_task(
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/utils/session.py", line 70, in wrapper
return func(*args, session=session, **kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1332, in _run_raw_task
self._execute_task_with_callbacks(context)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1458, in _execute_task_with_callbacks
result = self._execute_task(context, self.task)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 1514, in _execute_task
result = execute_callable(context=context)
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/operators/python.py", line 151, in execute
return_value = self.execute_callable()
File "/home/user/anaconda3/lib/python3.8/site-packages/airflow/operators/python.py", line 162, in execute_callable
return self.python_callable(*self.op_args, **self.op_kwargs)
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/airflow/airflow_component.py", line 76, in _airflow_component_launcher
launcher.launch()
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/launcher/base_component_launcher.py", line 191, in launch
execution_decision = self._run_driver(self._input_dict, self._output_dict,
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/launcher/base_component_launcher.py", line 152, in _run_driver
with self._metadata_connection as m:
File "/home/user/anaconda3/lib/python3.8/site-packages/tfx/orchestration/metadata.py", line 152, in __enter__
raise RuntimeError(
RuntimeError: Failed to establish connection to Metadata storage with error: mysql_real_connect failed: errno: , error:
In this log I was using AirFlow, but the same exception message is shown if I run a LocalDagRunner:
Exception has occurred: RuntimeError
Failed to establish connection to Metadata storage with error: mysql_real_connect failed: errno: , error:
I have tried changing the host to "127.0.0.1", but this didn't change anything. Anyone had a similar issue or maybe see an apparent error in my approach?
The MySQL server is version 8.0 and I am using TensorFlow Extended version 1.4.0

az acr build command fails "NotImplementedError: APIVersion 2019-06-01-preview is not available"

I am running the following command in my AML workspace in a jupyter notebook:
!az acr build --image mlnet --subscription $ws.subscription_id --registry $cr --file docker/Dockerfile docker/
The command fails with the following error:
APIVersion 2019-06-01-preview is not available
Traceback (most recent call last):
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 631, in execute
raise ex
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 695, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
six.reraise(*sys.exc_info())
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 665, in _run_job
result = cmd_copy(params)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 324, in __call__
return self.handler(*args, **kwargs)
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 565, in default_command_handler
client = client_factory(cmd.cli_ctx, command_args) if client_factory else None
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/cli/command_modules/acr/_client_factory.py", line 47, in cf_acr_runs
return get_acr_service_client(cli_ctx, VERSION_2019_06_01_PREVIEW).runs
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/azure/mgmt/containerregistry/container_registry_management_client.py", line 246, in runs
raise NotImplementedError("APIVersion {} is not available".format(api_version))
NotImplementedError: APIVersion 2019-06-01-preview is not available
To open an issue, please run: 'az feedback'
How can I debug and get past this error?
Looks like updating the cli version solves the issue. I faced the same issue. Upgraded azure cli version using the below command. After the upgrade acr commands worked fine.
pip install --upgrade azure-cli

Airflow gives error ImportError: No module named MySQLdb upon changing its config file for celery

I have installed airflow with celery in my ec2 linux instance and airflow is working like a charm. Now when I made changes in its config file to use celery with airflow it is throwing the following error.
[2020-04-03 07:24:57,234] {settings.py:253} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=4851
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 25, in <module>
from airflow.configuration import conf
File "/usr/local/lib/python2.7/site-packages/airflow/__init__.py", line 47, in <module>
settings.initialize()
File "/usr/local/lib/python2.7/site-packages/airflow/settings.py", line 377, in initialize
configure_orm()
File "/usr/local/lib/python2.7/site-packages/airflow/settings.py", line 266, in configure_orm
engine = create_engine(SQL_ALCHEMY_CONN, **engine_args)
File "/usr/local/lib64/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 479, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/local/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/local/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 118, in dbapi
return __import__("MySQLdb")
ImportError: No module named MySQLdb
pip install MySQL-python
Should fix this

AttributeError in generating peewee model from mysql using pwiz

When i run pwiz to generate a peewee modem from existing database it shows following error:
root#server:~# python -m pwiz -e mysql -P -H 127.0.0.1 mysql
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/pwiz.py", line 202, in <module>
print_models(introspector, tables, preserve_order=options.preserve_order)
File "/usr/local/lib/python2.7/dist-packages/pwiz.py", line 47, in print_models
database = introspector.introspect(table_names=tables)
File "/usr/local/lib/python2.7/dist-packages/playhouse/reflection.py", line 440, in introspect
tables = self.metadata.database.get_tables()
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3089, in get_tables
return [table for table, in self.execute_sql('SHOW TABLES')]
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2459, in execute_sql
cursor = self.cursor(commit)
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2445, in cursor
self.connect()
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2411, in connect
self._state.set_connection(self._connect())
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3083, in _connect
return mysql.connect(db=self.database, **self.connect_params)
AttributeError: 'NoneType' object has no attribute 'connect'
What is the problem? The username and password of database is correct.
PyMySql is not installed. Install it using pip or other available options:
pip install PyMySql
Unfortunately, peewee does not write `PyMySql1 module of python in its dependency list, so it should be installed separately.

FIWARE IDM installation error

I tried to install Fiware IDM in Ubuntu 12.04 from scratch (just only Ubuntu 12.04 was installed, no any more packages). I have followed the guide https://github.com/ging/fi-ware-idm/wiki/Installation-guide
Installation finished OK, but when I try to start fi-lab home page, http://localhost:8000, I've got the following error:
DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_config instead.
DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_config instead.
Validating models...
0 errors found
July 09, 2015 - 13:17:37
Django version 1.6.11, using settings 'openstack_dashboard.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
DEBUG:idm_logger:Creating a new internal keystoneclient connection to https://127.0.0.1:5000/v3.
InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
WARNING:py.warnings:InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
Recoverable error: SSL exception connecting to https://127.0.0.1:5000/v3/auth/tokens
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 67, in __call__
return self.application(environ, start_response)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
self.load_middleware()
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 47, in load_middleware
mw_instance = mw_class()
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/middleware/locale.py", line 24, in __init__
for url_pattern in get_resolver(None).url_patterns:
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 365, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/home/juan/idm/horizon/.venv/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/home/juan/idm/horizon/openstack_dashboard/urls.py", line 36, in <module>
from openstack_dashboard.dashboards.idm_admin.user_accounts \
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/views.py", line 27, in <module>
from openstack_dashboard.dashboards.idm_admin.user_accounts \
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 202, in <module>
class UpdateAccountForm(forms.SelfHandlingForm, UserAccountsLogicMixin, fiware_auth.TemplatedEmailMixin):
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 209, in UpdateAccountForm
choices=get_account_choices())
File "/home/juan/idm/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 179, in get_account_choices
use_idm_account=True),
File "/home/juan/idm/horizon/openstack_dashboard/fiware_api/keystone.py", line 783, in get_basic_role
exceptions.handle(request)
File "/home/juan/idm/horizon/horizon/exceptions.py", line 324, in handle
messages.error(request, message or log_entry)
File "/home/juan/idm/horizon/horizon/messages.py", line 83, in error
fail_silently=fail_silently)
File "/home/juan/idm/horizon/horizon/messages.py", line 41, in add_message
if not horizon_message_already_queued(request, message):
File "/home/juan/idm/horizon/horizon/messages.py", line 28, in horizon_message_already_queued
if request.is_ajax():
AttributeError: 'NoneType' object has no attribute 'is_ajax'
Does anybody know whether we should install additional packages?
For development purposes, change this variable
from
OPENSTACK_KEYSTONE_URL = "https://%s:5000/v3" % OPENSTACK_HOST to
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v3" % OPENSTACK_HOST
inside idm/horizon/openstack_dashboard/loca/local_settings.py (arround 130th line)