(Migrated) Installing Zato on Ubuntu

(This message has been automatically imported from the retired mailing list)

Hello,

I’m trying install Zato on Ubuntu but got the error below:

Zato tests

danilochilene@ambush:~/python/zato/zato-1.1
=E2=86=92 lsb_release
-a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.04
Release: 13.04
Codename: raring

danilochilene@ambush:~/python/zato/zato-1.1
=E2=86=92 python
-V

Python 2.7.4

danilochilene@ambush:~/python/zato/zato-1.1
=E2=86=92 ./bin/zato
–version

Zato 1.1
danilochilene@ambush:~/python/zato/zato-1.1
=E2=86=92 mkdir
/tmp/zato

danilochilene@ambush:~/python/zato/zato-1.1
=E2=86=92 bin/zato quickstart create /tmp/zato
\

postgresql localhost 5432 zato1 zato1
localhost 6379 --verbose

ODB database password (will not be echoed):
Enter the odb_password again (will not be echoed):

Key/value database password (will not be echoed):
Enter the kvdb_password again (will not be echoed):
[1/8] Certificate authority created
[2/8] ODB schema created
[3/8] ODB initial data created
[4/8] server1 created
[5/8] server2 created
[6/8] Load-balancer created
Superuser created successfully.
[7/8] Web admin created
[8/8] Management scripts created
Quickstart cluster quickstart-729474 created
Web admin user:[admin], password:[ooot-oben-anaz-oret]
Start the cluster by issuing the /tmp/zato/zato-qs-start.sh command
Visit https://zato.io/support for more information and support options
danilochilene@ambush:~/python/zato/zato-1.1

danilochilene@ambush:~/python/zato/zato-1.1
=E2=86=92
/tmp/zato/zato-qs-start.sh

Starting the Zato quickstart environment
Running sanity checks
/tmp/zato/zato-qs-start.sh: line 21: zato: command not found

After changing the script /tmp/zato/zato-qs-start.sh

danilochilene@ambush:~/python/zato/zato-1.1
=E2=86=92
/tmp/zato/zato-qs-start.sh

Starting the Zato quickstart environment
Running sanity checks
Traceback (most recent call last):
File “/home/danilochilene/python/zato/zato-1.1/bin/zato”, line 90, in

sys.exit(zato.cli.zato_command.main())
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/zato_comman=
d.py",
line 227, in main
return run_command(get_parser().parse_args())
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/init.py=
",
line 164, in run_command
command_classargs.command.run(args)
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/init.py=
",
line 358, in run
sys.exit(self.execute(args))
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/init.py=
",
line 612, in execute
self._get_dispatch()json_data[‘component’]
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/check_confi=
g.py",
line 53, in _on_server
kvdb.init()
File
"/home/danilochilene/python/zato/zato-1.1/zato-common/src/zato/common/kvdb.=
py",
line 59, in init
config[‘password’] =3D self.decrypt_func(self.config.password)
File
"/home/danilochilene/python/zato/zato-1.1/zato-common/src/zato/common/crypt=
o.py",
line 67, in encrypt
encrypted =3D self.pub_key.public_encrypt(data, padding)
AttributeError: ‘NoneType’ object has no attribute ‘public_encrypt’

Any tips?

On 07/01/2013 09:43 PM, Danilo Chilene wrote:

Running sanity checks
/tmp/zato/zato-qs-start.sh: line 21: zato: command not found

After changing the script /tmp/zato/zato-qs-start.sh

Starting the Zato quickstart environment
Running sanity checkse/python/zato/zato-1.1/zato-common/src/zato/common/crypto.py",
line 67, in encrypt
encrypted = self.pub_key.public_encrypt(data, padding)
AttributeError: ‘NoneType’ object has no attribute ‘public_encrypt’

Any tips?

Hi Danilo,

I believe this won’t make much difference but can you please add
INSTALL_DIR/bin to $PATH as documented here

https://zato.io/docs/admin/guide/install-zato.html

instead of changing zato-qs-start.sh ?

I’d just like to make sure you use the same thing the docs mention and
then I’ll be able to reproduce it locally

thanks,

On 07/01/2013 09:43 PM, Danilo Chilene wrote:

Running sanity checks
/tmp/zato/zato-qs-start.sh: line 21: zato: command not found

After changing the script /tmp/zato/zato-qs-start.sh

Starting the Zato quickstart environment
Running sanity checkse/python/zato/zato-1.1/zato-common/src/zato/common/crypto.py",
line 67, in encrypt
encrypted = self.pub_key.public_encrypt(data, padding)
AttributeError: ‘NoneType’ object has no attribute ‘public_encrypt’

Any tips?

Hi Danilo,

I believe this won’t make much difference but can you please add
INSTALL_DIR/bin to $PATH as documented here

https://zato.io/docs/admin/guide/install-zato.html

instead of changing zato-qs-start.sh ?

I’d just like to make sure you use the same thing the docs mention and
then I’ll be able to reproduce it locally

thanks,

On 07/01/2013 09:43 PM, Danilo Chilene wrote:

 encrypted = self.pub_key.public_encrypt(data, padding)

AttributeError: ‘NoneType’ object has no attribute ‘public_encrypt’

Any tips?

OK, I got it - if you pull the latest hotfixes

https://zato.io/docs/admin/guide/hotfixes.html

everything will be as expected.

It was to do with how Redis passwords were handled. It worked by default
when it was empty but you must’ve set it to something else hence the
issue you had.

Thanks for spotting it!

On 07/01/2013 09:43 PM, Danilo Chilene wrote:

 encrypted = self.pub_key.public_encrypt(data, padding)

AttributeError: ‘NoneType’ object has no attribute ‘public_encrypt’

Any tips?

OK, I got it - if you pull the latest hotfixes

https://zato.io/docs/admin/guide/hotfixes.html

everything will be as expected.

It was to do with how Redis passwords were handled. It worked by default
when it was empty but you must’ve set it to something else hence the
issue you had.

Thanks for spotting it!

Hello Dariusz,

The installation went fine now.

But seems like redis isn’t running:

=E2=86=92
./zato-qs-start.sh
Ter 02 Jul 14:25
Starting the Zato quickstart environment
Running sanity checks
Traceback (most recent call last):
File “/home/danilochilene/python/zato/zato-1.1/bin/zato”, line 90, in

sys.exit(zato.cli.zato_command.main())
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/zato_comman=
d.py",
line 227, in main
return run_command(get_parser().parse_args())
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/init.py=
",
line 164, in run_command
command_classargs.command.run(args)
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/init.py=
",
line 358, in run
sys.exit(self.execute(args))
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/init.py=
",
line 612, in execute
self._get_dispatch()json_data[‘component’]
File
"/home/danilochilene/python/zato/zato-1.1/zato-cli/src/zato/cli/check_confi=
g.py",
line 55, in _on_server
kvdb.conn.info()
File
"/home/danilochilene/python/zato/zato-1.1/eggs/redis-2.4.13-py2.7.egg/redis=
/client.py",
line 342, in info
return self.execute_command(‘INFO’)
File
"/home/danilochilene/python/zato/zato-1.1/eggs/redis-2.4.13-py2.7.egg/redis=
/client.py",
line 283, in execute_command
connection.send_command(*args)
File
"/home/danilochilene/python/zato/zato-1.1/eggs/redis-2.4.13-py2.7.egg/redis=
/connection.py",
line 260, in send_command
self.send_packed_command(self.pack_command(*args))
File
"/home/danilochilene/python/zato/zato-1.1/eggs/redis-2.4.13-py2.7.egg/redis=
/connection.py",
line 243, in send_packed_command
self.connect()
File
"/home/danilochilene/python/zato/zato-1.1/eggs/redis-2.4.13-py2.7.egg/redis=
/connection.py",
line 191, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting localhost:6379.
Connection refused.

On Mon, Jul 1, 2013 at 6:34 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 07/01/2013 09:43 PM, Danilo Chilene wrote:

  encrypted =3D self.pub_key.public_encrypt(**data, padding)

AttributeError: ‘NoneType’ object has no attribute ‘public_encrypt’

Any tips?

OK, I got it - if you pull the latest hotfixes

https://zato.io/docs/admin/**guide/hotfixes.html<https://zato.io/docs/adm=
in/guide/hotfixes.html>

everything will be as expected.

It was to do with how Redis passwords were handled. It worked by default
when it was empty but you must’ve set it to something else hence the issu=
e
you had.

Thanks for spotting it!


Dariusz Suchojad

https://zato.io
The next generation ESB and application server. Open-source. In Python.

Yeah,

Sorry, was my bad forgot to install it.

On Tue, Jul 2, 2013 at 2:29 PM, Dariusz Suchojad dsuch@zato.io wrote:

The installation went fine now.

But seems like redis isn’t running:

  raise ConnectionError(self._error_**message(e))

redis.exceptions.**ConnectionError: Error 111 connecting localhost:6379.
Connection refused.

Yup, Redis is an external component, like PostgreSQL or Oracle, it’s not
bundled with Zato - you need to start it manually.

On Ubuntu it will be

$ sudo service redis-server restart
Stopping redis-server: redis-server.
Starting redis-server: redis-server.
$

Also, don’t forget to set the password you picked in /etc/redis/redis.conf
(requirepass key).

Hello,

It’s working now.

Tested on Ubuntu 13.04

(zato-1.1)danilochilene@ambush:/tmp/zato
=E2=86=92 curl localhost:11223/zato/ping -d
’{}'
Ter 02 Jul 14:34
{“zato_env”: {“details”: “”, “result”: “ZATO_OK”, “cid”:
“K222307372824749979552165106275094583845”}, “zato_ping_response”: {“pong”:
“zato”}}%

On Tue, Jul 2, 2013 at 2:33 PM, Danilo Chilene bicofino@gmail.com wrote:

Yeah,

Sorry, was my bad forgot to install it.

On Tue, Jul 2, 2013 at 2:29 PM, Dariusz Suchojad dsuch@zato.io wrote:

The installation went fine now.

But seems like redis isn’t running:

  raise ConnectionError(self._error_**message(e))

redis.exceptions.**ConnectionError: Error 111 connecting localhost:6379=
.

Connection refused.

Yup, Redis is an external component, like PostgreSQL or Oracle, it’s not
bundled with Zato - you need to start it manually.

On Ubuntu it will be

$ sudo service redis-server restart
Stopping redis-server: redis-server.
Starting redis-server: redis-server.
$

Also, don’t forget to set the password you picked in
/etc/redis/redis.conf (requirepass key).

The installation went fine now.

But seems like redis isn’t running:

 raise ConnectionError(self._error_message(e))

redis.exceptions.ConnectionError: Error 111 connecting localhost:6379.
Connection refused.

Yup, Redis is an external component, like PostgreSQL or Oracle, it’s not
bundled with Zato - you need to start it manually.

On Ubuntu it will be

$ sudo service redis-server restart
Stopping redis-server: redis-server.
Starting redis-server: redis-server.
$

Also, don’t forget to set the password you picked in
/etc/redis/redis.conf (requirepass key).

(zato-1.1)danilochilene@ambush:/tmp/zato
→ curl localhost:11223/zato/ping -d
’{}'
Ter 02 Jul 14:34
{“zato_env”: {“details”: “”, “result”: “ZATO_OK”, “cid”:
“K222307372824749979552165106275094583845”}, “zato_ping_response”:
{“pong”: “zato”}}%

Cool! :slight_smile:

One thing to note though - if you have a look at _install-deb.sh you’ll
notice Zato installs itself under a virtualenv so I think you don’t need
to create your own.

I’m not sure if that causes any troubles, funnily enough I don’t use
virtualenv that much, almost everything I do runs under buildout. But
I’m just saying.

Hello Darius,

I got a new error on Ubuntu 13.04:

(zato)danilochilene@ambush:/tmp/zato-1.1/bin$ ./zato -v
Traceback (most recent call last):
File “./zato”, line 87, in
import zato.cli.zato_command
File “/tmp/zato-1.1/zato-cli/src/zato/cli/zato_command.py”, line 16, in

from zato.cli import ca_create_ca as ca_create_ca_mod,
ca_create_lb_agent as ca_create_lb_agent_mod,
File “/tmp/zato-1.1/zato-cli/src/zato/cli/check_config.py”, line 22, in

from zato.common.crypto import CryptoManager
File “/tmp/zato-1.1/zato-common/src/zato/common/crypto.py”, line 17, in

from M2Crypto import BIO, RSA
ImportError: No module named M2Crypto
(zato)danilochilene@ambush:/tmp/zato-1.1/bin$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import M2Crypto
Traceback (most recent call last):
File “”, line 1, in
File
"/home/danilochilene/envs/zato/local/lib/python2.7/site-packages/M2Crypto/_=
init_.py",
line 22, in
import m2crypto
ImportError:
/home/danilochilene/envs/zato/local/lib/python2.7/site-packages/M2Crypto/
=
m2crypto.so:
undefined symbol: SSLv2_method

(zato)danilochilene@ambush:/tmp/zato-1.1/bin$

On Tue, Jul 2, 2013 at 2:38 PM, Dariusz Suchojad dsuch@zato.io wrote:

(zato-1.1)danilochilene@ambush**:/tmp/zato

=E2=86=92 curl localhost:11223/zato/ping -d
’{}'
Ter 02 Jul 14:34
{“zato_env”: {“details”: “”, “result”: “ZATO_OK”, “cid”:
K222307372824749979552165106275094583845”}, “zato_ping_response”:
{“pong”: “zato”}}%

Cool! :slight_smile:

One thing to note though - if you have a look at _install-deb.sh you’ll
notice Zato installs itself under a virtualenv so I think you don’t need =
to
create your own.

I’m not sure if that causes any troubles, funnily enough I don’t use
virtualenv that much, almost everything I do runs under buildout. But I’m
just saying.

Dariusz,

I was able to install on 13.04 outside virtualenv.

But gave same error when I tried to start zato:

danilochilene@ambush:/tmp/zato-esb$ ./zato-qs-start.sh
Starting the Zato quickstart environment
Running sanity checks
./zato-qs-start.sh: line 21: /tmp/zato-1.1/bin/: Is a directory
danilochilene@ambush:/tmp/zato-esb$ vim zato-qs-start.sh
danilochilene@ambush:/tmp/zato-esb$ ./zato-qs-start.sh
Starting the Zato quickstart environment
Running sanity checks
Traceback (most recent call last):
File “/tmp/zato-1.1/bin/zato”, line 87, in
import zato.cli.zato_command
File “/tmp/zato-1.1/zato-cli/src/zato/cli/zato_command.py”, line 16, in

from zato.cli import ca_create_ca as ca_create_ca_mod,
ca_create_lb_agent as ca_create_lb_agent_mod,
File “/tmp/zato-1.1/zato-cli/src/zato/cli/check_config.py”, line 22, in

from zato.common.crypto import CryptoManager
File “/tmp/zato-1.1/zato-common/src/zato/common/crypto.py”, line 17, in

from M2Crypto import BIO, RSA
File “/tmp/zato-1.1/lib/python2.7/site-packages/M2Crypto/init.py”,
line 22, in
import __m2crypto
ImportError:
/tmp/zato-1.1/lib/python2.7/site-packages/M2Crypto/__m2crypto.so: undefined
symbol: SSLv2_method

On Mon, Aug 26, 2013 at 2:14 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 08/26/2013 07:05 PM, Danilo Chilene wrote:

I got a new error on Ubuntu 13.04:

ImportError:

/home/danilochilene/envs/zato/local/lib/python2.7/site-
packages/M2Crypto/__m2crypto.**so:
undefined symbol: SSLv2_method

Thanks Danilo,

looks like some sort of 13.04-specific thing - I’ll set up a virtualbox
and let you know of any findings.

M2Crypto is used in pretty much once place only, for encrypting/decrypting
things using RSA when servers are starting, i.e. it’s rarely needed.

I’m sure there are pure-Python modules that can do just as much. It will
make sense to use of them in Zato 1.2.

thanks again,


Dariusz Suchojad

https://zato.io
ESB, SOA and cloud integrations in Python

On 08/26/2013 07:05 PM, Danilo Chilene wrote:

I got a new error on Ubuntu 13.04:

ImportError:
/home/danilochilene/envs/zato/local/lib/python2.7/site-packages/M2Crypto/__m2crypto.so:
undefined symbol: SSLv2_method

Thanks Danilo,

looks like some sort of 13.04-specific thing - I’ll set up a virtualbox
and let you know of any findings.

M2Crypto is used in pretty much once place only, for
encrypting/decrypting things using RSA when servers are starting, i.e.
it’s rarely needed.

I’m sure there are pure-Python modules that can do just as much. It will
make sense to use of them in Zato 1.2.

thanks again,

On 08/26/2013 07:32 PM, Danilo Chilene wrote:

I was able to install on 13.04 outside virtualenv.

ImportError:
/tmp/zato-1.1/lib/python2.7/site-packages/M2Crypto/__m2crypto.so:
undefined symbol: SSLv2_method

Ah, thanks for the update.

The reason for this error is clear

but I don’t quite get how come it stopped to work on 13.04 only for you.
I mean, Ubuntu seemed to have disabled it long time ago, apparently?

Nice Darius!

I don’t got the error message again.

On Thu, Sep 26, 2013 at 7:47 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 08/26/2013 07:35 PM, Dariusz Suchojad wrote:

On 08/26/2013 07:32 PM, Danilo Chilene wrote:

ImportError:

/tmp/zato-1.1/lib/python2.7/**site-packages/M2Crypto/__**m2crypto.so:
undefined symbol: SSLv2_method

Ah, thanks for the update.

The reason for this error is clear

http://stackoverflow.com/a/**8219807 http://stackoverflow.com/a/8219807

For posterity - we confirmed it on IRC that recent changes in git, namely
replacing M2Crypto with rsa and PyCrypto [1] - made the error go away.

[1] https://github.com/zatosource/**zato/commit/e3366d884https://github.com/zatosource/zato/commit/e3366d884