graphfoundation / ongdb

ONgDB is an independent fork of Neo4j® Enterprise Edition version 3.4.0.rc02 licensed under AGPLv3 and/or Community Edition licensed under GPLv3
https://www.graphfoundation.org/projects/ongdb/
380 stars 57 forks source link

neo4j-admin 3.5 backup does not explain it could not connect to server #40

Closed jsoref closed 3 years ago

jsoref commented 4 years ago

Guidelines

To help us understand your issue, please specify important details, primarily:

Steps to reproduce

  1. Do not run a ongdb server (or any other server) on 127.0.0.1:6462
  2. Ask neo4j-admin to perform a backup from that address:
    ongdb_backup=$(mktemp -d)
    report_dir=$(mktemp -d)
    JAVA_HOME=$(oracle_jdk8) \
    neo4j-admin backup \
        --protocol=catchup \
        --from=127.0.0.1:6462 \
        --backup-dir=$ongdb_backup \
        --cc-report-dir=$report_dir \
        --name=backup; echo $?

Expected behavior

An error message indicating that no server responded from `127.0.0.1:6462`.
Bonus points for an exit code that distinguishes between "spoke to a server" and "couldn't speak to a server".

Actual behavior

```
The selected protocol `catchup` means that it is only compatible with causal clustering instances
command failed: Failed to run a backup using the available strategies.
1
```

Additionally, include (as appropriate) log-files, stacktraces, and other debug output.

https://neo4j.com/docs/operations-manual/3.5/backup/performing/#backup-performing-command says that 1 means:

Backup failed.

This is correct, the backup failed.

It also isn't helpful. It'd be much more helpful if I could distinguish between "could not connect to server" and "I spoke to the server and things went bad". I'm fairly certain that the second case can happen. -- If not, the documentation should just say that 1 means "could not connect to server" -- and again, I highly doubt that's what it means.