Importing SQL Connection with Zato Enmasse

Hi its me again ! I am trying to import a sql connection from zato enmasse to avoid having to enter the dashboard, I am looking for the password to be imported and to use ssl authentication. Is there any way to do this? Regards.

Right now im trying with environment variables in the zato-export file, it takes all the values of the variables except the password and i get this error.

outconn_sql:

  - cluster_id: 1
    db_name: "$DB_NAME"
    engine: mysql+pymysql
    extra: ""
    host: "$HOST"
    id: 1
    is_active: true
    name: outgoing_sql
    pool_size: 1
    port: 3306
    username: "$USERNAME"
    password: "$PASSWORD"
2022-01-13 22:47:10,168 DEBG 'server1' stdout output:
2022-01-13 22:47:10,168 - ERROR - 206:DummyThread-139 - zato:0 - Could not handle broker message: (OUTGOING_SQL_CHANGE_PASSWORD:100813) `Bunch(action='100813', id=1, name='name_of_connection', password='password', password1='zato.secf.gAAAAABh4KvtgRZARq8yqqwE_LdmiiOhr9RSdmY85J3cnMrd2cLjZ4O5eyXpjwfoL-WjK6WVYmKVjR4VqSzTl1PjbOrBcn0y5w==', password2='zato.secf.gAAAAABh4Kvt31tRZupHj3265aFWBGAEC7sAG2H0EYki0yXnyioOYwVOXaioqXfArWeL42w1zOQvy7zunF8jrONQOq93PnInZg==', salt=None, type_='')`, e:`Traceback (most recent call last):
  File "/opt/zato/3.2.0/code/zato-broker/src/zato/broker/__init__.py", line 48, in on_broker_msg
    func(msg)
  File "/opt/zato/3.2.0/code/zato-server/src/zato/server/base/worker/__init__.py", line 1740, in on_broker_msg_OUTGOING_SQL_CHANGE_PASSWORD
    self.sql_pool_store.change_password(msg['name'], msg['password'])
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/odb/api.py", line 507, in change_password
    item = self.get(name, enforce_is_active=False)
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/odb/api.py", line 432, in __getitem__
    return self.wrappers[name]
KeyError: 'name_of_connection'
`

2022-01-13 22:47:10,183 DEBG 'server1' stdout output:
2022-01-13 22:47:10,183 - WARNING - 206:DummyThread-141 - SessionWrapper:0 - Could not ping:`database`, session will be left uninitialised, e:`Traceback (most recent call last):
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2338, in _wrap_pool_connect
    return fn()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 304, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 778, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 495, in checkout
    rec = pool._do_get()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 140, in _do_get
    self._dec_overflow()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.raise_(
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
    return self._create_connection()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
    return _ConnectionRecord(self)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 440, in __init__
    self.__connect(first_connect_check=True)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 661, in __connect
    pool.logger.debug("Error on connect(): %s", e)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.raise_(
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 656, in __connect
    connection = pool._invoke_creator(self)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
    return dialect.connect(*cargs, **cparams)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 493, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 353, in __init__
    self.connect()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 633, in connect
    self._request_authentication()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 907, in _request_authentication
    auth_packet = self._read_packet()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user 'user'@'ip' (using password: YES)")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/odb/api.py", line 158, in _init_session
    self.pool.ping(self.fs_sql_config)
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/odb/api.py", line 371, in ping
    func = self.engine.connect().execute
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2265, in connect
    return self._connection_cls(self, **kwargs)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 104, in __init__
    else engine.raw_connection()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2371, in raw_connection
    return self._wrap_pool_connect(
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2341, in _wrap_pool_connect
    Connection._handle_dbapi_exception_noconnection(
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1583, in _handle_dbapi_exception_noconnection
    util.raise_(
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2338, in _wrap_pool_connect
    return fn()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 304, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 778, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 495, in checkout
    rec = pool._do_get()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 140, in _do_get
    self._dec_overflow()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.raise_(
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 137, in _do_get
    return self._create_connection()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 309, in _create_connection
    return _ConnectionRecord(self)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 440, in __init__
    self.__connect(first_connect_check=True)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 661, in __connect
    pool.logger.debug("Error on connect(): %s", e)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.raise_(
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 656, in __connect
    connection = pool._invoke_creator(self)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
    return dialect.connect(*cargs, **cparams)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 493, in connect
    return self.dbapi.connect(*cargs, **cparams)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 353, in __init__
    self.connect()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 633, in connect
    self._request_authentication()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 907, in _request_authentication
    auth_packet = self._read_packet()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'user'@'ip' (using password: YES)")
(Background on this error at: http://sqlalche.me/e/13/e3q8)

That is what I have tried for now with the password, about the ssl authentication I don’t know how to do it, I appreciate your help. Greetings.

Hello,

please provide more details.

What is your Zato version and the full enmasse command?

You appear to be using environment variables, which is good, but I do not know how you export them. Does the command succeed without them?

How do you confirm that the password is correct? How do you confirm that your user is able to connect from the source IP address?

Thank you.

My version of zato is Zato 3.2+rev.8626f366-py3.8.10-ubuntu.20.04-focal.

I am using the docker image that is generated from the docker file that is in the quickstart folder of zato build (zato-build/docker/quickstart at master · zatosource/zato-build · GitHub) the command of enmasse is the one that comes in the import-utility file:

/opt/zato/current/bin/zato enmasse /opt/zato/env/qs-1/server1/ --input /opt/enmasse/zato-export.yml - -import --replace-odb-objects

I export the environment variables when running the docker container with the zato image:

docker run -it --rm -p 22022:22 -p 8183:8183 -p 11223:11223 -v /opt/zato/services:/opt/hot-deploy/ -v /opt/zato/enmasse:/opt/ enmasse/ -e USERNAME=${db_username} -e PASSWORD=${db_password} -e HOST=${db_host} -e DB_NAME=${db_name} -e ZATO_ENMASSE_FILE=/opt/enmasse/zato-export.yml -- name zato zato-deployment-test:latest

To confirm that the password is correct, this is done by the mysql that I run in a docker container.

I understand it, thanks.

Can you also, please include the full contents of the zato-export.yml file? Not as a screenshot but as copy, directly in a message that you post?

In this forum, you can use syntax highlighting, using Markdown, just like with GitHub, please use it instead of screenshots of files.

Of course. Here is my zato-export.yml file:

channel_amqp: []

channel_jms_wmq: []

channel_plain_http:

  - cache_expiry: 0
    cache_id:
    cache_name:
    cache_type:
    connection: channel
    content_encoding: ""
    content_type:
    data_encoding: utf-8
    data_format: json
    has_rbac: false
    hl7_version: hl7-v2
    host:
    http_accept: "*/*"
    id: 98
    is_active: true
    is_audit_log_received_active: false
    is_audit_log_sent_active: false
    is_internal: false
    is_rate_limit_active: false
    json_path: ""
    match_slash: true
    max_bytes_per_message_received: 500
    max_bytes_per_message_sent: 500
    max_len_messages_received: 50
    max_len_messages_sent: 50
    merge_url_params_req: True
    method: ""
    name: 'Create Cron Job'
    params_pri: channel-params-over-msg
    ping_method: HEAD
    pool_size: 20
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: APPROXIMATE
    sec_def: zato-no-security
    sec_tls_ca_cert_id:
    sec_type:
    sec_use_rbac: false
    security_id:
    security_name:
    serialization_type: string
    service: integrations.common.cron-job-creator
    service_id: 580
    service_name: integrations.common.cron-job-creator
    service_whitelist:
      - ""
    should_parse_on_input: false
    should_return_errors: false
    should_validate: false
    soap_action: ""
    soap_version:
    timeout: 10
    transport: plain_http
    url_params_pri: qs-over-path
    url_path: /create/cron-job/{target_id}/

channel_zmq: []

cloud_aws_s3: []

def_amqp: []

def_cassandra: []

def_jms_wmq: []

def_namespace: []

def_sec:

  - client_def: sec_def:::basic_auth:::ide_publisher
    client_name: sec_def:::basic_auth:::ide_publisher
    id: 1
    name: 'sec_def:::basic_auth:::ide_publisher:::IDE Publishers'
    opaque1:
    role_id: 2
    role_name: 'IDE Publishers'
    type: rbac_client_role

  - id: 1
    name: Create
    opaque1: {}
    type: rbac_permission

  - id: 1
    name: 'IDE Publishers:::zato.ide-deploy.create::Read'
    opaque1:
    perm_id: 2
    perm_name: Read
    role_id: 2
    role_name: 'IDE Publishers'
    service: zato.ide-deploy.create
    service_id: 2
    service_name: zato.ide-deploy.create
    type: rbac_role_permission

  - id: 1
    name: Root
    parent_id:
    parent_name:
    type: rbac_role

  - id: 2
    name: Read
    opaque1: {}
    type: rbac_permission

  - id: 2
    name: 'IDE Publishers:::zato.ide-deploy.create::Create'
    opaque1:
    perm_id: 1
    perm_name: Create
    role_id: 2
    role_name: 'IDE Publishers'
    service: zato.ide-deploy.create
    service_id: 2
    service_name: zato.ide-deploy.create
    type: rbac_role_permission

  - id: 2
    name: 'IDE Publishers'
    parent_id: 1
    parent_name: Root
    type: rbac_role

  - id: 3
    is_active: true
    is_rate_limit_active: false
    name: zato.internal.invoke
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato internal invoker'
    type: basic_auth
    username: zato.internal.invoke.user

  - id: 3
    name: Update
    opaque1: {}
    type: rbac_permission

  - id: 3
    name: 'IDE Publishers:::zato.ide-deploy.create::Update'
    opaque1:
    perm_id: 3
    perm_name: Update
    role_id: 2
    role_name: 'IDE Publishers'
    service: zato.ide-deploy.create
    service_id: 2
    service_name: zato.ide-deploy.create
    type: rbac_role_permission

  - id: 4
    is_active: true
    is_rate_limit_active: false
    name: ide_publisher
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: ide_publisher
    type: basic_auth
    username: ide_publisher

  - id: 4
    name: Delete
    opaque1: {}
    type: rbac_permission

  - id: 5
    is_active: true
    is_rate_limit_active: false
    name: zato.ping.plain_http.basic_auth
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato ping'
    type: basic_auth
    username: zato.ping.plain_http.basic_auth

  - id: 6
    is_active: true
    is_rate_limit_active: false
    name: zato.ping.soap.basic_auth
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato ping'
    type: basic_auth
    username: zato.ping.soap.basic_auth

  - id: 7
    is_active: true
    name: zato.ping.soap.wss.clear_text
    nonce_freshness_time: 3600
    password_type: clear_text
    reject_empty_nonce_creat: false
    reject_expiry_limit: 3600
    reject_stale_tokens: true
    type: wss
    username: zato.ping.soap.wss.clear_text

  - id: 8
    is_active: true
    is_rate_limit_active: false
    name: zato.default.cache.client
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato cache'
    type: basic_auth
    username: zato.cache

  - id: 9
    is_active: true
    is_rate_limit_active: false
    name: zato.default.crypto.client
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato crypto'
    type: basic_auth
    username: zato.crypto

  - id: 10
    is_active: true
    is_rate_limit_active: false
    name: zato.pubsub.demo.secdef
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato pub/sub demo'
    type: basic_auth
    username: zato.pubsub.demo

  - id: 11
    is_active: true
    is_rate_limit_active: false
    name: zato.pubsub.internal.secdef
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato pub/sub internal'
    type: basic_auth
    username: zato.pubsub.internal

  - id: 12
    is_active: true
    is_rate_limit_active: false
    name: zato.connector.wmq
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato IBM MQ'
    type: basic_auth
    username: zato.connector.wmq

  - id: 13
    is_active: true
    is_rate_limit_active: false
    name: zato.connector.sftp
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato SFTP'
    type: basic_auth
    username: zato.connector.sftp

  - id: 14
    is_active: true
    is_rate_limit_active: false
    name: pub.zato.cache
    rate_limit_check_parent_def: false
    rate_limit_def: ""
    rate_limit_type: ""
    realm: 'Zato Cache'
    type: basic_auth
    username: pub.zato.cache

  - id: 15
    is_active: true
    is_rate_limit_active: false
    name: 'API Credentials'
    rate_limit_check_parent_def: false
    rate_limit_def:
    rate_limit_type: APPROXIMATE
    realm: API
    type: basic_auth
    username: api

email_imap: []

email_smtp: []

json_pointer: []

json_rpc: []

notif_sql: []

outconn_amqp: []

outconn_ftp: []

outconn_jms_wmq: []

outconn_odoo: []

outconn_sap: []

outconn_sql:

  - cluster_id: 1
    db_name: "$DB_NAME"
    engine: mysql+pymysql
    extra: ""
    host: "$HOST"
    id: 1
    is_active: true
    name: outgoing_sql
    pool_size: 1
    port: 3306
    username: "$USERNAME"
    password: "$PASSWORD"



outconn_zmq: []

pubsub_endpoint: []

pubsub_topic: []

query_cassandra: []

scheduler:

  - cron_definition:
    days:
    extra: ""
    hours:
    id: 2
    is_active: true
    job_type: interval_based
    minutes: 30
    name: zato.wsx.cleanup.pub-sub
    repeats:
    seconds:
    service: pub.zato.channel.web-socket.cleanup-wsx-pub-sub
    service_id: 271
    service_name: pub.zato.channel.web-socket.cleanup-wsx-pub-sub
    start_date: '2021-12-21 18:59:21.744537'
    weeks:

  - cron_definition:
    days:
    extra: ""
    hours:
    id: 3
    is_active: true
    job_type: interval_based
    minutes: 30
    name: zato.wsx.cleanup
    repeats:
    seconds:
    service: pub.zato.channel.web-socket.cleanup-wsx
    service_id: 88
    service_name: pub.zato.channel.web-socket.cleanup-wsx
    start_date: '2021-12-21 18:59:21.744537'
    weeks:

search_es: []

search_solr: []

web_socket: []

xpath: []

zato_cache_builtin:

  - cache_id: 1
    cache_type: builtin
    current_size: 0
    extend_expiry_on_get: true
    extend_expiry_on_set: true
    id: 1
    is_active: true
    is_default: true
    max_item_size: 10000
    max_size: 10000
    name: default
    opaque1: {}
    persistent_storage: sql
    sync_method: in-background

zato_cache_memcached: []

zato_generic_connection: []

zato_sms_twilio: []

Hello, I think I found the problem but I’m not sure. I was checking the traceback of the error of not being able to include the password with enmasse. And the error itself is that when you want to get the value of wrappers in the slq connection, that key is not there. Checking the function on_broker_msg_OUTGOING_SQL_CHANGE_PASSWORD in its comments says that it removes the connection pool and recreates it. Is it possible that it is not recreating it correctly and that is why it is not found in wrappers?

"/opt/zato/3.2.0/code/zato-server/src/zato/server/base/worker/__init__.py"

def on_broker_msg_OUTGOING_SQL_CHANGE_PASSWORD(self, msg, *args):
        """ Deletes an outgoing SQL connection pool and recreates it using the
        new password.
        """
        self.sql_pool_store.change_password(msg['name'], msg['password'])

"/opt/zato/3.2.0/code/zato-common/src/zato/common/odb/api.py"
   def change_password(self, name, password):
        """ Updates the password which means recreating the pool using the new
        password.
        """
        with self._lock:
            # Do not check if the connection is active when changing the password,
            # sometimes it is desirable to change it even if it is Inactive.
            item = self.get(name, enforce_is_active=False)
            item.pool.engine.dispose()
            config = deepcopy(self.wrappers[name].pool.config)
            config['password'] = password
            self[name] = config

    def __getitem__(self, name, enforce_is_active=True):
        """ Checks out the connection pool. If enforce_is_active is False,
        the pool's is_active flag will be ignored.
        """
        with self._lock:
            if enforce_is_active:
                wrapper = self.wrappers[name]
                if wrapper.config['is_active']:
                    return wrapper
                raise Inactive(name)
            else:
                return self.wrappers[name]


How my error currently looks:

2022-01-17 14:48:13,822 DEBG 'server1' stdout output:
2022-01-17 14:48:13,822 - ERROR - 208:DummyThread-139 - zato:0 - Could not handle broker message: (OUTGOING_SQL_CHANGE_PASSWORD:100813) `Bunch(action='100813', id=1, name='outgoing_sql_name', password='password', password1='zato.secf.gAAAAABh5YGtTwRlhj9AJg8VRxgBt7PqC3--wxrsR3xuHBvQAwduALxjzTR_BS3rVR6p20HMOOKOGFJEouyOnK35169CzBLXjg==', password2='zato.secf.gAAAAABh5YGtuGaWX36TnDBjVg0v4KracDOnQGq0s_H3ca4e7VregzRT8cAC-MwtJ_A6O5GyaZg7z4H9OUiUOVLAeyWaUdh2Sw==', salt=None, type_='')`, e:`Traceback (most recent call last):
  File "/opt/zato/3.2.0/code/zato-broker/src/zato/broker/__init__.py", line 48, in on_broker_msg
    func(msg)
  File "/opt/zato/3.2.0/code/zato-server/src/zato/server/base/worker/__init__.py", line 1740, in on_broker_msg_OUTGOING_SQL_CHANGE_PASSWORD
    self.sql_pool_store.change_password(msg['name'], msg['password'])
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/odb/api.py", line 507, in change_password
    item = self.get(name, enforce_is_active=False)
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/odb/api.py", line 432, in __getitem__
    return self.wrappers[name]
KeyError: 'outgoing_sql_name'
`

Hi @JoelVega,

I have not checked it yet and I cannot confirm it.

In the meantime, if you would like to try it out, you can follow these instructions to run a Zato server under debugger with VS Code to gather more details.

Regards.

I am unable to reproduce it unless I use credentials that are truly incorrect. If they are correct, it works as expected.

What happens when you have a simple enmase file like the one below, after you enter your correct credentials?


outconn_sql:
  - db_name: "dbname"
    engine: mysql+pymysql
    host: "localhost"
    is_active: true
    name: outgoing_sql
    pool_size: 1
    port: 3306
    username: "username"
    password: "password"

Without any environment variables, substitutions or anything, log in to the container and run:

$ zato enmasse ~/env/qs-1/server1/ \
  --import --input ./enmasse.yml \
  --replace-odb-objects --verbose

What happens then?

I previously asked a question that you did not answer, how do you confirm that your credentials in environment variables are correct?

Regards.