Getting error with latest zato 3 sources


#1

I have pulled the latest sources and configured the cluster too.
Zato version is : Zato 3.0.0rc1+rev.82ecf462
While starting zato using ./zato-qs-start.sh got below error:
Starting Zato cluster perch
Running sanity checks
AttributeError: ("‘int’ object has no attribute ‘encode’",) (Hint: re-run with --verbose for full traceback)

After further looking into the code understood that password is not encrypted properly, hence tried to do the same using

Starting Zato cluster perch
Running sanity checks
AttributeError: ("‘int’ object has no attribute ‘encode’",) (Hint: re-run with --verbose for full traceback)

got below error for this statement:

Traceback (most recent call last):
File “/home/zato/zato/code/bin/zato”, line 11, in
load_entry_point(‘zato-cli’, ‘console_scripts’, ‘zato’)()
File “/home/zato/zato/code/zato-cli/src/zato/cli/zato_command.py”, line 362, in main
return run_command(get_parser().parse_args())
File “/home/zato/zato/code/zato-cli/src/zato/cli/init.py”, line 354, in run_command
command_classargs.command.run(args)
File “/home/zato/zato/code/zato-cli/src/zato/cli/init.py”, line 630, in run
return_code = self.execute(args)
File “/home/zato/zato/code/zato-cli/src/zato/cli/crypto.py”, line 39, in execute
cm = CryptoManager(pub_key_location=os.path.abspath(args.path))


#2

Hello,

I created a new quickstart cluster from the same git revision and can start it using zato-qs-start.sh without any issues. Does that work for you?

Regards.


#3

No,

While running sanity check got the below error:

AttributeError: ("‘int’ object has no attribute ‘encode’",) (Hint: re-run with --verbose for full traceback)


#4

Then tried zato encrypt that has failed with below message:

Traceback (most recent call last):
File “/home/zato/zato/code/bin/zato”, line 11, in
load_entry_point(‘zato-cli’, ‘console_scripts’, ‘zato’)()
File “/home/zato/zato/code/zato-cli/src/zato/cli/zato_command.py”, line 362, in main
return run_command(get_parser().parse_args())
File “/home/zato/zato/code/zato-cli/src/zato/cli/init.py”, line 354, in run_command
command_classargs.command.run(args)
File “/home/zato/zato/code/zato-cli/src/zato/cli/init.py”, line 630, in run
return_code = self.execute(args)
File “/home/zato/zato/code/zato-cli/src/zato/cli/crypto.py”, line 39, in execute
cm = CryptoManager(pub_key_location=os.path.abspath(args.path))
TypeError: init() got an unexpected keyword argument ‘pub_key_location’


#5

I’m not able to reproduce the situation hence I’m asking you to send concrete instructions step-by-step how to do it.

Instead of the textual description, please send the exact commands, copy-paste from the terminal, the whole of it, from the moment you clone the repository, switch to a branch of choice, through the creation of an environment up to the exception.


#6

I have followed below steps:

$ sudo - i
$ adduser zato
$ usermod -G adm,sudo zato

$ su - zato
$ git clone https://github.com/zatosource/zato && cd zato/code
$ ./install.sh

$su - zato
$ mkdir ~/perch
$ export PATH=$PATH:/home/zato/zato/code/bin:/home/zato/perch
$ echo “export PATH=$PATH:/home/zato/zato/code/bin:/home/zato/perch” >> ~/.bashrc
$ zato quickstart create ~/perch postgresql localhost 6379 --odb_host 127.0.0.1 --odb_port 5432 --odb_user perch --odb_db_name test_perch --cluster_name perch --servers 2 --verbose

$ ./zato-qs-start.sh


#7

while executing install.sh, I have seen below error too:

Building wheels for collected packages: suds-ovnicraft, dpath, globre, distribute
Running setup.py bdist_wheel for suds-ovnicraft … done
Stored in directory: /tmp/pip-ephem-wheel-cache-19GQe1/wheels/ae/71/84/d1faf106f3c8151b928776fd9a12a307687b9b50038f266e5e
Running setup.py bdist_wheel for dpath … done
Stored in directory: /tmp/pip-ephem-wheel-cache-19GQe1/wheels/b3/4b/c5/af1e0dae6a517453af1db996777fc0ea5b8c4e8db15bc7e5ce
Running setup.py bdist_wheel for globre … done
Stored in directory: /tmp/pip-ephem-wheel-cache-19GQe1/wheels/96/7c/7e/884e3bbe542be4e758c470f36f48082673387a1fcb30119f82
Running setup.py bdist_wheel for distribute … error
Complete output from command /home/zato/zato/code/bin/python2.7 -u -c “import setuptools, tokenize;file=’/tmp/pip-install-q84109/distribute/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” bdist_wheel -d /tmp/pip-wheel-TZbDLA --python-tag cp27:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-q84109/distribute/setup.py”, line 58, in
setuptools.setup(**setup_params)
File “/usr/lib/python2.7/distutils/core.py”, line 137, in setup
ok = dist.parse_command_line()
File “setuptools/dist.py”, line 276, in parse_command_line
result = _Distribution.parse_command_line(self)
File “/usr/lib/python2.7/distutils/dist.py”, line 467, in parse_command_line
args = self._parse_command_opts(parser, args)
File “setuptools/dist.py”, line 602, in _parse_command_opts
nargs = _Distribution._parse_command_opts(self, parser, args)
File “/usr/lib/python2.7/distutils/dist.py”, line 523, in _parse_command_opts
cmd_class = self.get_command_class(command)
File “setuptools/dist.py”, line 406, in get_command_class
ep.require(installer=self.fetch_build_egg)
File “pkg_resources.py”, line 2254, in require
working_set.resolve(self.dist.requires(self.extras),env,installer)))
File “pkg_resources.py”, line 2471, in requires
dm = self._dep_map
File “pkg_resources.py”, line 2682, in _dep_map
self.__dep_map = self._compute_dependencies()
File “pkg_resources.py”, line 2699, in _compute_dependencies
from _markerlib import compile as compile_marker
ImportError: No module named _markerlib


#8

The “No module named _markerlib” is harmless, it belongs to one of sub-dependencies.

As for the the main subject of this topic, I still cannot reproduce it. I’m using Ubuntu 16.04 64-bit, can you tell me what your system is?

Is anyone else able to reproduce it?


#9

Hi,

I was able to reproduce the same issue on both 16.04 and 14.04 Ubuntu 64bit machines.

I have asked one of my teammate to try today.

Thanks,
Prasantarmaye


#10

Hi,

I was able to reproduce the error. This is happening when kvdb (Redis) has a password, I’ve set Redis password as “123456” and also tried "abcdef’. For both the passwords, I was getting below error:

When I removed the authentication at Redis (i.e., with no password), and adjusted server config then zato cluster started without issue.

Thanks,
Umesh


#11

Thanks @umesh - just to confirm it, can you tell me how and where you set the password to Redis?


#12

Redid password can be set in /etc/redis/redis.conf file as a value for parameter ‘requirepass’


#13

Hello @prasantarmaye - I was thinking more about how you set it in server.conf, simply by providing the password in clear-text, is that right?

That is, if the password was ‘abcdef’, you entered ‘abcdef’ into server.conf, without encrypting it first?


#14

On executing zato quickstart create command, it has prompted for both db and kvdb passwords. The later takes the password of redis.


#15

This is done - you can pull the latest changes from GitHub. Your environment does not have to be recreated. Regards.