我在这里的另一篇文章中看到了这个错误,但无法评论。我尝试添加子网时收到的错误是“额外数据:第 1 行第 6 列(字符 5)”。我尝试了多种方法来添加它,使用一个 DNS、两个 DNS、未标记和标记、有名称和无名称,结果相同。
刚刚再次尝试/var/log/syslog
,结果出现了 python 错误!
Jun 23 13:12:12 usw1maas001 sh[11770]: 2016-06-23 13:12:12 [-] Error on request (51) subnet.create: Extra data: line 1 column 6 (char 5)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011Traceback (most recent call last):
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3.5/threading.py", line 862, in run
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 self._target(*self._args, **self._kwargs)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 841, in worker
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return target()
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 task()
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 task()
Jun 23 13:12:12 usw1maas001 sh[11770]: #011--- <exception caught here> ---
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 result = inContext.theWork()
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return self.currentContext().callWithContext(ctx, func, *args, **kw)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return func(*args,**kw)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 874, in callInContext
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return func(*args, **kwargs)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 516, in call_within_transaction
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return func_outside_txn(*args, **kwargs)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 343, in retrier
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return func(*args, **kwargs)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3.5/contextlib.py", line 30, in inner
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return func(*args, **kwds)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 380, in create
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 obj.save()
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/maasserver/models/cleansave.py", line 28, in save
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 self.full_clean()
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 1149, in full_clean
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 self.clean_fields(exclude=exclude)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/maasserver/models/subnet.py", line 389, in clean_fields
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 super().clean_fields(*args, **kwargs)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 1191, in clean_fields
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 setattr(self, f.attname, f.clean(raw_value, self))
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/django/db/models/fields/__init__.py", line 587, in clean
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 value = self.to_python(value)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3/dist-packages/django/contrib/postgres/fields/array.py", line 88, in to_python
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 vals = json.loads(value)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 return _default_decoder.decode(s)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 File "/usr/lib/python3.5/json/decoder.py", line 342, in decode
Jun 23 13:12:12 usw1maas001 sh[11770]: #011 raise JSONDecodeError("Extra data", s, end)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011json.decoder.JSONDecodeError: Extra data: line 1 column 6 (char 5)
Jun 23 13:12:12 usw1maas001 sh[11770]: #011