You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/08/05 15:20:40 UTC
[GitHub] [couchdb] mattpr opened a new issue, #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
mattpr opened a new issue, #4138:
URL: https://github.com/apache/couchdb/issues/4138
Moving to couch3.
We pre-populate debconf for unattended installs when provisioning servers. Something like...
```bash
echo "couchdb couchdb/mode select standalone
couchdb couchdb/adminpass password <somepass>
couchdb couchdb/adminpass_again password <somepass>
couchdb couchdb/bindaddress string 127.0.0.1
couchdb couchdb/nodename string couchdb@localhost
couchdb couchdb/postrm_remove_databases boolean false
couchdb couchdb/cookie string <somecookie>
" | debconf-set-selections
```
followed by
```bash
DEBIAN_FRONTEND=noninteractive apt-get install -y couchdb
```
However when starting up couchdb we get the following:
```
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
No Admin Account Found, aborting startup.
Please configure an admin account in your local.ini file.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
```
However if we clear the debconf values and do a manual interactive install of couchdb, the admin account is properly set and couchdb starts up without issue.
```bash
apt-get remove couchdb
apt-get install debconf-utils
echo PURGE | debconf-communicate couchdb
debconf-get-selections | grep -E '^couchdb'
apt-get install couchdb
```
Is there a way we can utilize debconf preseed to ensure the admin is created?
I know I can also set the password in a local ini and couch will salt/hash it on next startup...however we would like to use debconf if possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] big-r81 commented on issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
big-r81 commented on issue #4138:
URL: https://github.com/apache/couchdb/issues/4138#issuecomment-1225985235
@mattpr ^
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] mattpr commented on issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
mattpr commented on issue #4138:
URL: https://github.com/apache/couchdb/issues/4138#issuecomment-1348870274
Hey @big-r81 -- really sorry I ghosted you. It wasn't on purpose. I didn't see any notifications (probably just missed it on a busy inbox day) and don't normally check notifications directly on github.
Unfortunately it has been so long I don't have the repro or issue top of mind anymore, but I did save a backup of the debconf we were using from around this time and there was some extra whitespace on `couchdb/adminpass`.
```
couchdb couchdb/adminpass password XXXXXXXXXXXXXXX
couchdb couchdb/adminpass_again password XXXXXXXXXXXXXXX
...
```
Our updated debconf doesn't have the extra whitespaces.
I've deployed couchdb recently for a new app and the debconf does work for the admin user now...so yes I would say one way or another (it was probably the same whitespace issue), this has been resolved.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] mattpr commented on issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
mattpr commented on issue #4138:
URL: https://github.com/apache/couchdb/issues/4138#issuecomment-1206609088
Well I found at least one interesting thing.
This debconf...
```
couchdb couchdb/bindaddress string 127.0.0.1
```
...results in...
```
cat /opt/couchdb/etc/default.d/10-bind-address.ini
# Package-introduced bind address
[chttpd]
bind_address = 127.0.0.1
```
...which prevents couchdb from starting. The error in the log is the following:
```
Application chttpd exited with reason: {{shutdown,{failed_to_start_child,chttpd,invalid_bind_address}},{chttpd_app,start,[normal,[]]}}
```
This is because there is 2 spaces between the `=` and the `127`. Apparently couchdb doesn't trim whitespace when parsing config files (at least in 3.2.2).
The fix is that all excess whitespace needs to be removed from the debconf pre-populated values (single space separating each token only).
This doesn't resolve the admin user not getting created, but is a related debconf issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] mattpr commented on issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
mattpr commented on issue #4138:
URL: https://github.com/apache/couchdb/issues/4138#issuecomment-1206630568
I did find another debconf related issue.
This debconf preseed...
```
couchdb couchdb/bindaddress string 127.0.0.1
```
...results in...
```
cat /opt/couchdb/etc/default.d/10-bind-address.ini
# Package-introduced bind address
[chttpd]
bind_address = 127.0.0.1
```
...which prevents couchdb from starting due to error...
```
Application chttpd exited with reason: {{shutdown,{failed_to_start_child,chttpd,invalid_bind_address}},{chttpd_app,start,[normal,[]]}}
```
This is due to an extra space after the `=` and before the `127`. Apparently couchdb in 3.2.2 does not trim whitespace from config values.
The solution is to remove ALL extra whitespace in your debconf preseeds (single space char only between each token).
Perhaps the config is trimmed in a later version of couchdb...but still good for people to be aware of.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] big-r81 closed issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
big-r81 closed issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
URL: https://github.com/apache/couchdb/issues/4138
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] big-r81 commented on issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
big-r81 commented on issue #4138:
URL: https://github.com/apache/couchdb/issues/4138#issuecomment-1273628141
I think this issue is fixed. Closing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] big-r81 commented on issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
big-r81 commented on issue #4138:
URL: https://github.com/apache/couchdb/issues/4138#issuecomment-1214817155
Hi, I suspect that the problems are entirely due to the leading/trailing white spaces. Did the admin-config value also have leading white-spaces in it?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] big-r81 commented on issue #4138: 3.2.2 on Ubuntu 22.04 -- interactive install creates admin, pre-populated debconf does not -- couchdb refuses to start
Posted by GitBox <gi...@apache.org>.
big-r81 commented on issue #4138:
URL: https://github.com/apache/couchdb/issues/4138#issuecomment-1349009218
👍🏼
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org