Project

General

Profile

Bug #28920

support.fetch_categories ws call is broken,

Added by Vaibhav Chauhan over 2 years ago. Updated over 2 years ago.

Status:
Done
Priority:
Critical
Assignee:
Erin Clark
Category:
Middleware
Severity:
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

so when I am entering correct password for my username vb8188, I get ws response like,

Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/support.py", line 54, in fetch_categories
    data = r.json()
  File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 894, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/simplejson/__init__.py", line 516, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 150, in call_method
    result = await self.middleware.call_method(self, message)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 907, in call_method
    return await self._call(message['method'], serviceobj, methodobj, params, app=app)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 885, in _call
    return await self.run_in_thread(methodobj, *args)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 848, in run_in_thread
    return await self.run_in_thread_pool(self.__threadpool, method, *args, **kwargs)
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 128, in throw
    return self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 844, in run_in_thread_pool
    await task
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 506, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/support.py", line 57, in fetch_categories
    raise CallError('Invalid proxy server response', errno.EBADMSG)
middlewared.service_exception.CallError: [EBADMSG] Invalid proxy server response

this can be confirmed on both new ui and old ui, please see screenshots as well.
assigning to william as I do not know who else to assign to.


Related issues

Has duplicate FreeNAS - Bug #28890: Cannot submit support tickets from freenas web guiClosed2018-02-27
Blocks FreeNAS - Feature #28632: New UI doesn't say support ticket has been updated, nor redirect away from formDone2018-02-21

History

#1 Updated by Vaibhav Chauhan over 2 years ago

  • Blocks Feature #28632: New UI doesn't say support ticket has been updated, nor redirect away from form added

#2 Updated by William Grzybowski over 2 years ago

  • Assignee changed from William Grzybowski to Erin Clark

Erin, could you please look at the proxy server logs to see what is going on? Or how would I check that?

#3 Updated by William Grzybowski over 2 years ago

  • Has duplicate Bug #28890: Cannot submit support tickets from freenas web gui added

#4 Updated by Erin Clark over 2 years ago

  • Private changed from No to Yes

I attempted to call the categories with a simple script using the redmine api and I am getting this:

Traceback (most recent call last):
File "./check_categories.py", line 9, in <module>
for category in categories:
File "/usr/local/lib/python2.7/site-packages/redmine/resultsets.py", line 101, in iter
self._evaluate()
File "/usr/local/lib/python2.7/site-packages/redmine/resultsets.py", line 80, in evaluate
offset=self.manager.params.get('offset', self.offset)
File "/usr/local/lib/python2.7/site-packages/redmine/managers.py", line 60, in retrieve
response = self.redmine.request('get', self.url, params=dict(self.params, limit=limit, offset=offset))
File "/usr/local/lib/python2.7/site-packages/redmine/
_init__.py", line 130, in request
raise AuthError
redmine.exceptions.AuthError: Invalid authentication details

Something appears to be wrong with the support-proxy user, I'll ask DPD or lance to look at this with me in a bit

#5 Updated by Erin Clark over 2 years ago

  • Status changed from Not Started to In Progress
  • Assignee changed from Erin Clark to William Grzybowski

This is fixed in my pr https://github.com/iXsystems/support-proxy-php/pull/3, I have already deployed the fix and the categories are working again and I was able to submit a ticket, would you mind reviewing the PR, William?

#6 Updated by William Grzybowski over 2 years ago

  • Assignee changed from William Grzybowski to Erin Clark

Reviewed

#7 Updated by Erin Clark over 2 years ago

  • Status changed from In Progress to Done

#8 Updated by Dru Lavigne over 2 years ago

  • Private changed from Yes to No

Also available in: Atom PDF