(Migrated) Edit a FTP connection in the admin GUI + Float issue

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

I had set up an outgoing FTP connection set up that failed miserably,
complaining about needing a “Float” value somewhere.
The “timeout” parameter in the web gui was set to “60” and that
apparently crashed it.

I deleted the service, set it up again without the timeout parameter.
Everything works.

To verify that it actually was the timeout paramter I tried editing
the FTP connection, setting the timeout parameter to “60” again and
then clicking save:

Traceback (most recent call last):
File “/opt/zato/1.1/zato-web-admin/src/zato/admin/web/views/init.py”,
line 294, in call
raise ZatoException(msg=msg)
ZatoException: response:[<ServiceInvokeResponse at 0x7fc9af6aaa50
ok:[False] inner.status_code:[500] cid:[K2615…28837],
inner.text:[{“zato_env”: {“details”: “Traceback (most recent call
last):\n File “/opt/zato/1.1/zato-server/src/zato/server/connection/http_soap/channel.py”,
line 157, in dispatch\n self.simple_io_config, data_format,
path_info)\n File
”/opt/zato/1.1/zato-server/src/zato/server/connection/http_soap/channel.py",
line 275, in handle\n worker_store, cid, simple_io_config,
service_info=service_info, wsgi_environ=wsgi_environ)\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/init.py",
line 590, in update_handle\n service.handle()\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/internal/service.py",
line 266, in handle\n response = func(id_, payload, channel,
data_format, transport, serialize=True)\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/init.py",
line 611, in invoke\n return
self.invoke_by_impl_name(self.server.service_store.name_to_impl_name[name],
*args, **kwargs)\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/init.py",
line 608, in invoke_by_impl_name\n self.cid,
self.request.simple_io_config, serialize=serialize,
as_bunch=as_bunch)\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/init.py",
line 586, in update_handle\n job_type=kwargs.get(‘job_type’))\n
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 878, in update\n service._init()\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/init.py",
line 565, in init\n self.request.init(self.cid, self.SimpleIO,
self.data_format)\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/init.py",
line 182, in init\n params = self.get_params(required_list,
path_prefix, default_value, use_text)\n File
"/opt/zato/1.1/zato-server/src/zato/server/service/init.py",
line 228, in get_params\n raise ValueError(‘Required parameter [{}]
missing - value is [{}]’.format(param_name, repr(value)))\nValueError:
Required parameter [cluster_id] missing - value is [None]\n",
“result”: “ZATO_ERROR”, “cid”:
“K261525848329832191409605415519043428837”}}]>],
details.response.details:[Traceback (most recent call last):
File “/opt/zato/1.1/zato-server/src/zato/server/connection/http_soap/channel.py”,
line 157, in dispatch
self.simple_io_config, data_format, path_info)
File “/opt/zato/1.1/zato-server/src/zato/server/connection/http_soap/channel.py”,
line 275, in handle
worker_store, cid, simple_io_config, service_info=service_info,
wsgi_environ=wsgi_environ)
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 590, in update_handle
service.handle()
File “/opt/zato/1.1/zato-server/src/zato/server/service/internal/service.py”,
line 266, in handle
response = func(id
, payload, channel, data_format, transport,
serialize=True)
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 611, in invoke
return self.invoke_by_impl_name(self.server.service_store.name_to_impl_name[name],
*args, **kwargs)
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 608, in invoke_by_impl_name
self.cid, self.request.simple_io_config, serialize=serialize,
as_bunch=as_bunch)
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 586, in update_handle
job_type=kwargs.get(‘job_type’))
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 878, in update
service._init()
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 565, in _init
self.request.init(self.cid, self.SimpleIO, self.data_format)
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 182, in init
params = self.get_params(required_list, path_prefix,
default_value, use_text)
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 228, in get_params
raise ValueError(‘Required parameter [{}] missing - value is
[{}]’.format(param_name, repr(value)))

ValueError: Required parameter [cluster_id] missing - value is [None]

I cannot edit any existing FTP connection. Might this be a bug in the gui?
Secondly, setting a value in the timeout parameter results in a python
TypeError upon service execution.

It is as if the GUI expects an integer but something in the back wants
a Float. Trying “60.0” does not work in the GUI either.

zato@zatoTest:~$ curl localhost:11223/ftp/test
Traceback (most recent call last):
File “/opt/zato/1.1/zato-server/src/zato/server/connection/http_soap/channel.py”,
line 157, in dispatch
self.simple_io_config, data_format, path_info)
File “/opt/zato/1.1/zato-server/src/zato/server/connection/http_soap/channel.py”,
line 275, in handle
worker_store, cid, simple_io_config, service_info=service_info,
wsgi_environ=wsgi_environ)
File “/opt/zato/1.1/zato-server/src/zato/server/service/init.py”,
line 590, in update_handle
service.handle()
File “/opt/zato/tmp/qs/server2/work/hot-deploy/current/ftpservice.py”,
line 5, in handle
conn = self.outgoing.ftp.get(‘testbox1’)
File “/opt/zato/1.1/zato-server/src/zato/server/connection/ftp.py”,
line 72, in get
return FTPFacade(params.host, params.user, params.get(‘password’),
params.acct, timeout, int(params.port), params.dircache)
File “/opt/zato/1.1/eggs/fs-0.5.0-py2.7.egg/fs/ftpfs.py”, line 929,
in init
self.ftp
File “/opt/zato/1.1/eggs/fs-0.5.0-py2.7.egg/fs/ftpfs.py”, line 852, in deco
self._translate_exception(args[0] if args else ‘’, e)
File “/opt/zato/1.1/eggs/fs-0.5.0-py2.7.egg/fs/errors.py”, line 257,
in wrapper
return func(self,*args,**kwds)
File “/opt/zato/1.1/eggs/fs-0.5.0-py2.7.egg/fs/ftpfs.py”, line 1162,
in _translate_exception
raise exception
TypeError: a float is required

On 31/07/14 09:06, Baad Sequel wrote:

I had set up an outgoing FTP connection set up that failed miserably, complaining about needing a “Float” value somewhere.
The “timeout” parameter in the web gui was set to “60” and that apparently crashed it.

Thanks Baad,

it’s been fixed some time ago in master but never made it to backported
hotfixes:

Could you now please do the following?

$ cd /opt/zato/1.1
$ ./hotfixman.sh

And next set the timeout to 60 in the GUI?

thanks a lot,

On 31/07/14 09:06, Baad Sequel wrote:

I had set up an outgoing FTP connection set up that failed miserably, complaining about needing a “Float” value somewhere.
The “timeout” parameter in the web gui was set to “60” and that apparently crashed it.

Thanks Baad,

it’s been fixed some time ago in master but never made it to backported
hotfixes:

Could you now please do the following?

$ cd /opt/zato/1.1
$ ./hotfixman.sh

And next set the timeout to 60 in the GUI?

thanks a lot,

Hi,

works fine with timeout parameter now. The FTP channel do forget password
when you edit it, but that is perhaps by design.

Thanx

On Thu, Jul 31, 2014 at 12:45 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 31/07/14 09:06, Baad Sequel wrote:

I had set up an outgoing FTP connection set up that failed miserably,
complaining about needing a “Float” value somewhere.
The “timeout” parameter in the web gui was set to “60” and that
apparently crashed it.

Thanks Baad,

it’s been fixed some time ago in master but never made it to backported
hotfixes:

https://github.com/zatosource/zato/commit/0a1b93c0b44c04350fba4d4e74d232a6519646e4

Could you now please do the following?

$ cd /opt/zato/1.1
$ ./hotfixman.sh

And next set the timeout to 60 in the GUI?

thanks a lot,


Dariusz Suchojad

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

Sorry, time flies.

Hotfixes pulled some days ago. Worked like a charm then.

On Thu, Jul 31, 2014 at 3:45 PM, Dariusz Suchojad dsuch@zato.io wrote:

On 31/07/14 13:29, Baad Sequel wrote:

The FTP channel do forget password when you edit it, but that is perhaps
by design.

Thanks again, Baaz, this wasn’t by design and has been just fixed.

Can you please pull the hotfixes again?