zatosource / zato

ESB, SOA, REST, APIs and Cloud Integrations in Python
https://zato.io
GNU Affero General Public License v3.0
1.12k stars 240 forks source link

zato_ide_password exception #1193

Closed gs1-rob-392 closed 2 years ago

gs1-rob-392 commented 2 years ago

Hi, I'm starting with zato toutorial and I would install it on Docker. When I run this command:

sudo docker run --pull=always -it --rm -p 22022:22 -p 8183:8183 -p 11223:11223 --name zato registry.gitlab.com/zatosource/docker-registry/quickstart:3.2

Zato starts, but it also logs this error:

Write out database with 1 new entries
Data Base Updated
[1/8] Certificate authority created
[2/8] ODB schema created
[3/8] ODB initial data created
[4/8] server1 created
[5/8] Load-balancer created
Superuser created successfully.
[6/8] Dashboard created
[7/8] Scheduler created
[8/8] Management scripts created
Quickstart cluster quickstart-888632 created
Web admin user:[admin], password:[61pLTRdfyvlBJYlQJM-LPrkbMS0B6InN]
Start the cluster by issuing this command: /opt/zato/env/qs-1/zato-qs-start.sh
Visit https://zato.io/support for more information and support options
+ /opt/zato/current/bin/zato set-ide-password --verbose --password '' /opt/zato/env/qs-1/server1
+ tee /opt/zato/zato_ide_password
File "/opt/zato/current/bin/zato", line 16, in <module>
    sys.exit(main())
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/zato_command.py", line 987, in main
    return run_command(args)
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/__init__.py", line 215, in run_command
    return instance.run(args)
  Traceback (most recent call last):
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/__init__.py", line 609, in run
    return_code = self.execute(args)
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/ide.py", line 76, in execute
    invoker.invoke('zato.security.basic-auth.change-password', {
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/util/cli.py", line 139, in invoke
    return self.invoke_cli(cli_params)
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/util/cli.py", line 117, in invoke_cli
    out = command(*cli_params)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 1427, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 774, in __init__
    self.wait()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_16:

  RAN: /opt/zato/current/bin/zato service invoke --payload {"id": 4, "password1": "ZXWgsU6rucceh4mYpbYU2XrMF8AbQ7", "password2": "ZXWgsU6rucceh4mYpbYU2XrMF8AbQ7"} /opt/zato/env/qs-1/server1 zato.security.basic-auth.change-password

  STDOUT:
ConnectionError: (MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/admin/invoke (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd8b64176a0>: Failed to establish a new connection: [Errno 111] Connection refused'))"),) (Hint: re-run with --verbose for full traceback)

  STDERR:
Waiting for `http://127.0.0.1:17010/zato/ping` (HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd8b6459dc0>: Failed to establish a new connection: [Errno 111] Connection refused')))
Waiting for `http://127.0.0.1:17010/zato/ping` (HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd8b63f4310>: Failed to establish a new connection: [Errno 111] Connection refused')))
Waiting for `http://127.0.0.1:17010/zato/ping` (HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/pin... (167856 more, please see e.stderr)

And when I run this code:

sudo docker exec zato /opt/zato/get-credentials

It show this:

SSH: bPjHdZEE7PIw
  IDE: File "/opt/zato/current/bin/zato", line 16, in <module>
    sys.exit(main())
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/zato_command.py", line 987, in main
    return run_command(args)
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/__init__.py", line 215, in run_command
    return instance.run(args)
  Traceback (most recent call last):
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/__init__.py", line 609, in run
    return_code = self.execute(args)
  File "/opt/zato/3.2.0/code/zato-cli/src/zato/cli/ide.py", line 76, in execute
    invoker.invoke('zato.security.basic-auth.change-password', {
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/util/cli.py", line 139, in invoke
    return self.invoke_cli(cli_params)
  File "/opt/zato/3.2.0/code/zato-common/src/zato/common/util/cli.py", line 117, in invoke_cli
    out = command(*cli_params)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 1427, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 774, in __init__
    self.wait()
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/opt/zato/3.2.0/code/lib/python3.8/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_16:

  RAN: /opt/zato/current/bin/zato service invoke --payload {"id": 4, "password1": "ZXWgsU6rucceh4mYpbYU2XrMF8AbQ7", "password2": "ZXWgsU6rucceh4mYpbYU2XrMF8AbQ7"} /opt/zato/env/qs-1/server1 zato.security.basic-auth.change-password

  STDOUT:
ConnectionError: (MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/admin/invoke (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd8b64176a0>: Failed to establish a new connection: [Errno 111] Connection refused'))"),) (Hint: re-run with --verbose for full traceback)

  STDERR:
Waiting for `http://127.0.0.1:17010/zato/ping` (HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd8b6459dc0>: Failed to establish a new connection: [Errno 111] Connection refused')))
Waiting for `http://127.0.0.1:17010/zato/ping` (HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/ping (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd8b63f4310>: Failed to establish a new connection: [Errno 111] Connection refused')))
Waiting for `http://127.0.0.1:17010/zato/ping` (HTTPConnectionPool(host='127.0.0.1', port=17010): Max retries exceeded with url: /zato/pin... (167856 more, please see e.stderr)
Dashboard: 61pLTRdfyvlBJYlQJM-LPrkbMS0B6InN

I've also tried to use environment variable -e ZATO_IDE_PASSWORD=anypassword , but the result is the same.

dsuch commented 2 years ago

Thank you for reporting it, I am going to check it and let you know.

dsuch commented 2 years ago

Hello,

there is a new Docker image - can you please try it out now and let me know of the outcome?

If there is still anything needed afterwards, I will have a closer look.

Thank you.

dsuch commented 2 years ago

Hello again,

can you please tell me if the new image resolved your situation?

Also, I ask you to fill out your name in GitHub - otherwise, it will be impossible with me to interact with someone who presents himself or herself as only "gs1-rob-392".

Thank you.

gs1-rob-392 commented 2 years ago

Hi Dariusz, thanks for your quick reply, I've the same problem also with the new docker image. I don't know if it can help, I'm trying it on MacOS on Docker Desktop 4.6.1 P.S. I've updated my profile.

dsuch commented 2 years ago

Thanks for everything - I wanted to make sure that the image contained the latest code.

I am going to have a deeper look into that in this case. I will let you know as soon as I can.

dsuch commented 2 years ago

Hello Roberto,

just to keep you updated.

Independently of this ticket, there is a new Docker quickstart image available already that requires some final testing and documentation.

https://github.com/zatosource?tab=packages

This is a completely new image, hosted on GH rather than GL. I am going to work on the documentation for it, along with testing, and then I will ask you to use it.

I will follow up with details when I have completed that.

Regards.

gs1-rob-392 commented 2 years ago

Hi Dariusz, thanks for your help, I will wait your updates. Regards.

dsuch commented 2 years ago

Hello again,

here are the instructions for the new image that we talked about. Please try it out and let me know of the outcome.

https://zato.io/en/docs/3.2/admin/guide/install/docker.html

Thank you.

dsuch commented 2 years ago

Hello,

it looks that this ticket is no longer needed in which case I am closing it - please feel free to reopen at any time if you have any additional questions.

Regards.