xst icon indicating copy to clipboard operation
xst copied to clipboard

keep on getting "Package installation failed. User "guest" is not a member of the "dba" group."

Open JoernT opened this issue 1 year ago • 3 comments

What happened?

I have an existing .existdb.json which is configured with user 'admin' and empty pass (for local development) but xst keeps on complaining : "Package installation failed. User "guest" is not a member of the "dba" group."

System Information

Build: eXist-6.2.0 (c8fa4958b6d4a50bd0cba7f3e76a150226414187)
Java: 1.8.0_382 (Azul Systems, Inc.)
OS: Mac OS X 14.2.1 (aarch64)

(should output xst version too). It is:
1.6.1

Relevant shell output

Package installation failed. User "guest" is not a member of the "dba" group.

JoernT avatar Feb 26 '24 10:02 JoernT

same applies when using latest 1.9.4

JoernT avatar Feb 26 '24 10:02 JoernT

for completeness: here's my .existdb.json


{
    "servers": {
        "localhost": {
            "server": "http://localhost:8080/exist",
            "user": "admin",
            "password": "",
            "root": "/db/apps/jhb"
        }
    },
    "sync": {
        "server": "localhost",
        "ignore": [
            ".existdb.json",
            ".git/**",
            "components/**",
            "node_modules/**",
            "bower_components/**",
            "build/**",
            "webtest/**"
        ]
    }
}

JoernT avatar Feb 26 '24 10:02 JoernT

What is the command you are running? Are you passing --config path/to/my/.existdb.json?

line-o avatar Aug 22 '24 09:08 line-o

Getting the same. The defaults documented in https://github.com/eXist-db/xst?tab=readme-ov-file#with-environment-variables are not applied.

To repro: go to a random folder and run

touch repro.xar;
xst package install ./repro.xar;

Expected:

Error: experr:EXPATH00 Missing descriptor from package: /db/pkgtmp/repro.xar

Actual:

Package installation failed. User "guest" is not a member of the "dba" group.

Getting the env variables is delegated to node-exist, which defaults to guest/guest: https://github.com/eXist-db/node-exist/blob/main/components/connection.js#L45.

If we want to do our documented defaulting, we should fix it at https://github.com/eXist-db/xst/blob/main/utility/connection.js#L27. Just do something like this:

// Apply our defaults: XST usually requires admin privileges. the guest user node_exist defaults to is usually not sufficient (and often does not exist)
connectionOptions.basic_auth = { user: 'admin', 'password': '', ...connectionOptions.basic_auth };

DrRataplan avatar Oct 29 '24 08:10 DrRataplan

:tada: This issue has been resolved in version 2.1.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Apr 08 '25 07:04 github-actions[bot]