Project

General

Profile

Bug #26505

Fix FTP traceback

Added by Simon Englisch 12 months ago. Updated 11 months ago.

Status:
Resolved
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
GUI (new)
Target version:
Seen in:
Sprint:
Severity:
New
Backlog Priority:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

HP ProLiant N40L Microserver
16 GB Ram
3 x 3 TB Western Digital Red

ChangeLog Required:
No

Description

When trying to edit FTP service settings and setting a certificate I get this error:

Request Method: POST
Request URL: http://192.168.178.10/admin/services/ftp/edit/1/
Software Version: FreeNAS-11.1-RC1 (ff06285bd)
Exception Type: TypeError
Exception Value:

Object of type 'Certificate' is not JSON serializable

Exception Location: /usr/local/lib/python3.6/json/encoder.py in default, line 180
Server time: Sun, 5 Nov 2017 08:52:46 +0100

Environment:

Software Version: FreeNAS-11.1-RC1 (ff06285bd)
Request Method: POST
Request URL: http://192.168.178.10/admin/services/ftp/edit/1/

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  42.             response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.             response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  178.             response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
  162.         return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.                 return view_func(request, *args, **kwargs)
File "./freenasUI/freeadmin/options.py" in wrapper
  210.                 return self._admin.admin_view(view)(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/utils/decorators.py" in _wrapped_view
  149.                     response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)
File "./freenasUI/freeadmin/site.py" in inner
  142.             return view(request, *args, **kwargs)
File "./freenasUI/freeadmin/options.py" in edit
  571.                     mf.save()
File "./freenasUI/middleware/form.py" in save
  42.         result = self.__save()
File "./freenasUI/middleware/form.py" in __save
  84.                     raise
File "./freenasUI/middleware/form.py" in __save
  79.                 return c.call(f"{self.middleware_plugin}.{self._middleware_action}", *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py" in call
  384.             'params': c.params,
File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py" in _send
  282.         self._ws.send(json.dumps(data))
File "/usr/local/lib/python3.6/site-packages/middlewared/client/ejson.py" in dumps
  33.     return json.dumps(obj, cls=JSONEncoder, **kwargs)
File "/usr/local/lib/python3.6/json/__init__.py" in dumps
  238.         **kw).encode(obj)
File "/usr/local/lib/python3.6/json/encoder.py" in encode
  199.         chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/lib/python3.6/json/encoder.py" in iterencode
  257.         return _iterencode(o, 0)
File "/usr/local/lib/python3.6/site-packages/middlewared/client/ejson.py" in default
  16.         return super(JSONEncoder, self).default(obj)
File "/usr/local/lib/python3.6/json/encoder.py" in default
  180.                         o.__class__.__name__)

Exception Type: TypeError at /admin/services/ftp/edit/1/
Exception Value: Object of type 'Certificate' is not JSON serializable

POST
Variable     Value
__all__     ''
ftp_port     '21'
ftp_clients     '50'
ftp_ipconnections     '10'
ftp_loginattempt     '1'
ftp_timeout     '600'
ftp_anonpath     '/mnt/NAS1/backup/xxx'
ftp_onlylocal     'on'
ftp_banner     ''
ftp_filemask     '66'
ftp_dirmask     '2'
ftp_resume     'on'
ftp_defaultroot     'on'
ftp_reversedns     'on'
ftp_masqaddress     ''
ftp_passiveportsmin     '49152'
ftp_passiveportsmax     '49300'
ftp_localuserbw     '0'
ftp_localuserdlbw     '0'
ftp_anonuserbw     '0'
ftp_anonuserdlbw     '0'
ftp_tls     'on'
ftp_tls_policy     'on'
ftp_tls_opt_allow_client_renegotiations     'on'
ftp_tls_opt_enable_diags     'on'
ftp_tls_opt_no_session_reuse_required     'on'
ftp_ssltls_certificate     '1'
ftp_options     ('<Limit LOGIN>\n' 'Order allow,deny\n' 'Allow from 192.168.178.,xxx.de\n' 'Deny from all\n' '</Limit>')
__form_id     'dialogForm_ftp'

Associated revisions

Revision 1d620371 (diff)
Added by Vladimir Vinogradenko 11 months ago

fix(gui): Fix saving foreign keys in MiddlewareModelForm

Ticket: #26505

Revision 277ef4a8 (diff)
Added by Vladimir Vinogradenko 11 months ago

fix(gui): Fix saving foreign keys in MiddlewareModelForm

Ticket: #26505

History

#1 Updated by Dru Lavigne 12 months ago

  • Assignee changed from Release Council to William Grzybowski

William: please load balance.

#2 Updated by William Grzybowski 11 months ago

  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

#3 Updated by Vladimir Vinogradenko 11 months ago

  • Status changed from Unscreened to Screened

#4 Updated by Vladimir Vinogradenko 11 months ago

  • Status changed from Screened to Needs Developer Review
  • Assignee changed from Vladimir Vinogradenko to William Grzybowski
  • QA Status deleted (Not Tested)

#5 Updated by William Grzybowski 11 months ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from William Grzybowski to Vladimir Vinogradenko

#6 Updated by Dru Lavigne 11 months ago

  • Subject changed from Object of type 'Certificate' is not JSON serializable in UI when editingt FTP to Fix FTP traceback
  • Target version set to 11.1

#7 Updated by Vladimir Vinogradenko 11 months ago

  • Status changed from Reviewed by Developer to Ready For Release

#8 Updated by Dru Lavigne 11 months ago

  • Target version changed from 11.1 to 11.1-RC2

#9 Updated by Dru Lavigne 11 months ago

  • Target version changed from 11.1-RC2 to 11.1-RC3

#10 Updated by Dru Lavigne 11 months ago

  • Status changed from Ready For Release to Resolved

#11 Updated by Bonnie Follweiler 11 months ago

  • Needs QA changed from Yes to No
  • QA Status Test Passes FreeNAS added

Also available in: Atom PDF