couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Installation results in warning (and CouchDB likely not starting correctly) when choosing a password that contains spaces

Open schultzdavid opened this issue 6 months ago • 1 comments

Description

When choosing an admin password containing spaces during installation (or rather, in the initial setup tool that gets opened then), I get the following warning:

WARNING: Unable to create standalone system databases.
CouchDB may not have started correctly (no init?)

Once CouchDB has started correctly, run the following:

  curl -X PUT http://<admin-user>:<admin-pass>@127.0.0.1:5984/_users
  curl -X PUT http://<admin-user>:<admin-pass>@127.0.0.1:5984/_replicator

(I ran into this when trying to install a YunoHost app relying on CouchDB, with the result that the overarching installation script of that YunoHost app aborts with an error. The behavior of CouchDB itself, i.e. the warning it throws, is the same when installing it directly via apt, without any connection to YunoHost.)

When choosing a password without spaces, no such warning or error ever occurs.

Steps to Reproduce

Install CouchDB on a fresh Debian Bookworm machine via the commands stated in the installation instructions from the docs. In the console setup dialog that gets opened, choose Standalone Installation, then as IP e.g. 127.0.0.1 or 0.0.0.0, and as admin password choose one that contains one or more space characters.

Expected Behaviour

Installation going through without errors/warnings about a possible (probable) incorrect start-up of CouchDB

Your Environment

  • CouchDB version used: amd64 couchdb 3.5.0.~bookworm
  • Operating system and version: Debian Bookworm 12.11 (tested both on a Dell Wyse 5070 with an Intel J4105 64-bit CPU, and on a Raspberry Pi 3)

Additional Context

This is the command I run and the full resulting console output when choosing, in the intermittent setup dialog, a password containing spaces:

root@machine:/home/user# apt install -y couchdb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  couchdb-nouveau
The following NEW packages will be installed:
  couchdb
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/73.9 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package couchdb.
(Reading database ... 93026 files and directories currently installed.)
Preparing to unpack .../couchdb_3.5.0~bookworm_amd64.deb ...
Unpacking couchdb (3.5.0~bookworm) ...
Setting up couchdb (3.5.0~bookworm) ...
Created symlink /etc/systemd/system/multi-user.target.wants/couchdb.service → /lib/systemd/system/couchdb.service.
WARNING: Unable to create standalone system databases.
CouchDB may not have started correctly (no init?)
Once CouchDB has started correctly, run the following:

  curl -X PUT http://<admin-user>:<admin-pass>@127.0.0.1:5984/_users
  curl -X PUT http://<admin-user>:<admin-pass>@127.0.0.1:5984/_replicator

Processing triggers for man-db (2.11.2-2) ...

These two proposed curl commands suggest what the root of the issue could be: If similar commands are used in the installation script, it'd be no wonder that inserting spaces in the admin password messes things up.

schultzdavid avatar Jun 16 '25 15:06 schultzdavid

cc @rnewson

big-r81 avatar Jun 17 '25 18:06 big-r81