Hello,
I started today with the plan of contributing Moonshot Chassis Manager 2.0 improvements to MAAS, but I seem to have become stuck at the first step; getting things running.
Using a pristine Ubuntu 20.04 server (with git, golang, and build-essential installed), I’ve tried to build from source using different branches/tags, but no luck. Taking 2.9.2 as an example:
-
make install-dependencies
- OK -
make
- OK -
make syncdb
- OK -
make run
- Not working…
The main symptom is that when I visit http://server:5240/
I get redirected to http://server:5240/MAAS/r/
and I get a 404 No Such Resource error. “File not found.”
In the logs I see:
2021-03-11 14:22:50 regiond: [info] 192.168.50.193 GET /MAAS/r/ HTTP/1.1 --> 404 NOT_FOUND (referrer: -; agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0)
There’s a lot of activity continuously output by the logs; a lot of it looks healthy, some of it looks problematic, but I don’t know if any of it might be a cause.
2021-03-11 14:23:53 provisioningserver.utils.service_monitor: [debug] [try:1] Service monitor executing cmd: sudo --non-interactive systemctl restart chrony
2021-03-11 14:23:53 provisioningserver.utils.service_monitor: [debug] [try:1] Service monitor got exit code '5' from cmd: sudo --non-interactive systemctl restart chrony
2021-03-11 14:23:53 maas.service_monitor: [error] Service 'ntp_region' failed to restart: Failed to restart chrony.service: Unit chrony.service not found.
2021-03-11 14:23:53 maasserver.regiondservices.ntp: [critical] Failed to update NTP configuration.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 501, in errback
self._startRunCallbacks(fail)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
self._runCallbacks()
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1475, in gotResult
_inlineCallbacks(r, g, status)
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/service_monitor.py", line 354, in restartService
yield self._performServiceAction(service, "restart")
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/service_monitor.py", line 561, in _performServiceAction
raise ServiceActionError(error_msg)
provisioningserver.utils.service_monitor.ServiceActionError: Service 'ntp_region' failed to restart: Failed to restart chrony.service: Unit chrony.service not found.
2021-03-11 14:23:58 stderr: [error] request to http://127.0.0.1:5240/MAAS/metadata/2012-03-01/ failed. sleeping 16.: HTTP Error 503: Service Unavailable
2021-03-11 14:24:21 maasserver.regiondservices.syslog: [critical] Failed to update syslog configuration.
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/twisted.py", line 825, in worker
return target()
File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
task()
File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
task()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
result = inContext.theWork()
File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/twisted.py", line 860, in callInContext
return func(*args, **kwargs)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/twisted.py", line 192, in wrapper
result = func(*args, **kwargs)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/syslog/config.py", line 93, in write_config
atomic_write(content, target_path, overwrite=True, mode=0o644)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/fs.py", line 123, in atomic_write
temp_file = _write_temp_file(content, filename)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/fs.py", line 83, in _write_temp_file
temp_fd, temp_file = tempfile.mkstemp(
File "/usr/lib/python3.8/tempfile.py", line 471, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
builtins.FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/maas/.rsyslog.conf.gf_pp9fl.tmp'
2021-03-11 14:24:22 provisioningserver.utils.service_monitor: [debug] [try:2] Service monitor got exit code '4' from cmd: sudo --non-interactive systemctl status maas-http
2021-03-11 14:24:22 provisioningserver.rackdservices.http: [critical] Failed to update HTTP configuration.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 501, in errback
self._startRunCallbacks(fail)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
self._runCallbacks()
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1475, in gotResult
_inlineCallbacks(r, g, status)
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/service_monitor.py", line 400, in reloadService
state = yield self.ensureService(name)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/service_monitor.py", line 687, in _ensureService
state = yield self.getServiceState(service.name, now=True)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 491, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/service_monitor.py", line 283, in getServiceState
active_state, process_state = yield self._loadServiceState(service)
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/home/bob/projects/maas-2.9.2/src/provisioningserver/utils/service_monitor.py", line 628, in _loadSystemDServiceState
raise ServiceParsingError(
provisioningserver.utils.service_monitor.ServiceParsingError: Unable to parse the output from systemd for service 'maas-http'.
Can anyone please help? A bit dejected I’ve not been able to get it running locally so that I can do some debugging yet.
Cheers.