"error": "Failed to apply new configuration." - REG
When I modified the config.json and ran the below curl command I got this issue - "error": "Failed to apply new configuration."
Details: Server: Ubuntu | Django Deployment curl command: sudo curl -X PUT --data-binary @config.json --unix-socket /var/run/control.unit.sock http://localhost/config/ config.json:
{
"listeners": {
"*:80": {
"pass": "routes"
}
},
"routes": [
{
"action": {
"pass": "applications/django"
}
}
],
"applications": {
"django": {
"type": "python 3.10",
"path": "//home/ubuntu/vittae/",
"home": "/home/ubuntu/venv/",
"module": "unit.wsgi"
}
}
}
Language modules typically don't have spaces in them (especially if you're using the official packages).
Try
"type": "python"
Our docs do suggest specifying language versions:
Except for
externalandwasm, you can detail the runtime version:"type": "python 3","type": "python 3.4", or even"type": "python 3.4.9rc1". Unit searches its modules and uses the latest matching one, reporting an error if none match.
...so in this case I suspect we're not finding a Python 3.10 and just returning a poor error to the user.
@harishvgts What version of Ubuntu are you using, how did you install Unit, and what are the contents of /usr/lib/unit/modules/?