cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Error During Copy of a Database

renatospaka
Graph Voyager

Hello guys.

Today I spent some time studying Neo4j Administration course and I got an error on the 5th exercise ( Copying databases). It is a very simple exercise executed from within a docker instance of Neo4j Enterprise 4.1.3.

After I executed the command to copy a database sudo docker exec --interactive neo4j bin/neo4j-admin copy --from-database=movies --to-database=movies2 a new folder movies2 is created in ~/docker-neo4j/neo4j/data/databases, which is a mounted volume of the container. Then I updated the ownership of the folder from user root to 7474 (don't know why the owner is 7474, but it is what it is) using sudo chown --reference=movies movies2

drwxr-xr-x 6 7474 7474 4.0K Nov 23 16:55 .
drwxr-xr-x 5 7474 7474 4.0K Nov 23 14:44 ..
drwxr-xr-x 3 7474 7474 4.0K Nov 23 16:24 movies
drwxr-xr-x 2 7474 7474 4.0K Nov 23 16:56 movies2
drwxr-xr-x 3 7474 7474 4.0K Nov 23 14:44 neo4j
-rw-r--r-- 1 7474 7474    0 Nov 23 14:44 store_lock
drwxr-xr-x 4 7474 7474 4.0K Nov 23 14:44 system
renatospaka@dell-w10home:~/docker-neo4j/neo4j/data/databases$

In cypher-shell I executed the command to create a new database movies2 and it returned OK. Only when I listed the databases of my instance I noticed the error:

neo4j@system> show databases;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name      | address          | role         | requestedStatus | currentStatus | error                                                             | default |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "movies"  | "localhost:7687" | "standalone" | "offline"       | "offline"     | ""                                                                | FALSE   |
| "movies2" | "localhost:7687" | "standalone" | "online"        | "dirty"       | "An error occurred! Unable to drop database with name `movies2`." | FALSE   |
| "neo4j"   | "localhost:7687" | "standalone" | "online"        | "online"      | ""                                                                | TRUE    |
| "system"  | "localhost:7687" | "standalone" | "online"        | "online"      | ""                                                                | FALSE   |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------+

So here I am with no clue of what to do next.

Best regards, take care, and be safe.
Renato

14 REPLIES 14

Hello Renato,

I don't know why the owner/group would be 7474????

In general anything created by neo4j should be owned by neo4j with the neo4j group.

Elaine

Hi @elaine.rosenberg, I don't know either. I only followed the instructions of the course and when I noticed the error, the folder & files were already set up this way.

As my first impression was I screwed up, I deleted everything (movies & movies2) and started over. The result was the same: error.

BTW, I use this command to create the docker & image:
sudo

run \
    --name=neo4j \
    --publish=7474:7474 --publish=7687:7687 \
    --volume=$HOME/docker-neo4j/neo4j/data/:/data \
    --volume=$HOME/docker-neo4j/neo4j/logs/:/logs \
    --volume=$HOME/docker-neo4j/neo4j/conf/:/conf \
    --volume=$HOME/docker-neo4j/neo4j/plugins/:/plugins \
    --volume=$HOME/docker-neo4j/neo4j/import/:/import \
    --env NEO4J_dbms_memory_pagecache_size=512m \
    --env=NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
    --detach \
    neo4j:4.1.3-enterprise

The course uses the 4.0.2 Docker instance. I cannot vouch for how the exercises will work with a different Docker instance.

Can you try going through the course the the same 4.0.2-Enterprise instance?

Elaine

Sure. I will setup the environment now and let you know what happens.

@elaine.rosenberg, I repeated the tests, now from a 4.0,2 Enterprise image, and the same issue occurred.

These are the databases of the instance:

neo4j@system> CREATE DATABASE movies2;
0 rows available after 16 ms, consumed after another 0 ms
neo4j@system> show databases;
+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name      | address        | role         | requestedStatus | currentStatus | error                                                              | default |
+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "movies"  | "0.0.0.0:7687" | "standalone" | "offline"       | "offline"     | ""                                                                 | FALSE   |
| "movies2" | "0.0.0.0:7687" | "standalone" | "online"        | "offline"     | "An error occurred! Unable to start database with name `movies2`." | FALSE   |
| "neo4j"   | "0.0.0.0:7687" | "standalone" | "online"        | "online"      | ""                                                                 | TRUE    |
| "system"  | "0.0.0.0:7687" | "standalone" | "online"        | "online"      | ""                                                                 | FALSE   |
+------------------------------------------------------------------------------------------------------------------------------------------------------------+

4 rows available after 18 ms, consumed after another 3 ms
neo4j@system>
neo4j@system> START DATABASE movies2;
0 rows available after 198 ms, consumed after another 0 ms
neo4j@system> :use movies2
Unable to get a routing table for database 'movies2' because this database is unavailable
neo4j@movies2[UNAVAILABLE]>

And if I use movies, it is alright, all set:

neo4j@system> START DATABASE movies;
0 rows available after 33 ms, consumed after another 0 ms
neo4j@system> :use movies;
neo4j@movies> match(m) return count(m);
+----------+
| count(m) |
+----------+
| 171      |
+----------+

1 row available after 41 ms, consumed after another 10 ms
neo4j@movies>

This is the log:

renatospaka@dell-w10home:~/docker-neo4j/neo4j/data/databases$ docker logs neo4j
Warning: Folder mounted to "/logs" is not writable from inside container. Changing folder owner to neo4j.
Warning: Folder mounted to "/data" is not writable from inside container. Changing folder owner to neo4j.
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /logs
  plugins:      /plugins
  import:       /import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2020-11-24 22:30:46.538+0000 INFO  ======== Neo4j 4.0.2 ========
2020-11-24 22:30:46.548+0000 INFO  Starting...
2020-11-24 22:30:55.997+0000 INFO  Sending metrics to CSV file at /var/lib/neo4j/metrics
2020-11-24 22:30:56.046+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2020-11-24 22:30:56.046+0000 INFO  Started.
2020-11-24 22:30:56.495+0000 INFO  Server thread metrics have been registered successfully
2020-11-24 22:30:58.270+0000 INFO  Remote interface available at http://0.0.0.0:7474/
2020-11-24 23:04:49.542+0000 WARN  The client is unauthorized due to authentication failure.

Regards,
Renato

Can you stop the movies database, create a copy with this command and then show the output of this copy?

[sudo] docker exec --interactive neo4j bin/neo4j-admin copy --from-database=movies --to-database=foo

renatospaka
Graph Voyager

Hello @elaine.rosenberg
Please find below the output of the command you requested:

renatospaka@dell-w10home:~/docker-neo4j/neo4j/data/databases$ docker exec -it neo4j bin/neo4j-admin copy --from-database=movies --to-database=foo
Starting to copy store, output will be saved to: /logs/neo4j-admin-copy-2020-11-25.14.25.40.log
2020-11-25 14:25:41.237+0000 INFO [StoreCopy] ### Copy Data ###
2020-11-25 14:25:41.247+0000 INFO [StoreCopy] Source: /data/databases/movies
2020-11-25 14:25:41.248+0000 INFO [StoreCopy] Target: /data/databases/foo
2020-11-25 14:25:41.249+0000 INFO [StoreCopy] Empty database created, will start importing readable data from the source.
2020-11-25 14:25:43.797+0000 INFO [o.n.i.b.ImportLogic] Import starting

Import starting 2020-11-25 14:25:44.046+0000
  Estimated number of nodes: 171.00
  Estimated number of node properties: 383.00
  Estimated number of relationships: 253.00
  Estimated number of relationship properties: 383.00
  Estimated disk space usage: 34.87KiB
  Estimated required memory usage: 7.971MiB

(1/4) Node import 2020-11-25 14:25:44.958+0000
  Estimated number of nodes: 171.00
  Estimated disk space usage: 14.49KiB
  Estimated required memory usage: 7.971MiB
-......... .......... .......... .......... ..........   5% ∆171ms
.......... .......... .......... .......... ..........  10% ∆67ms
.......... .......... .......... .......... ..........  15% ∆68ms
.......... .......... .......... .......... ..........  20% ∆50ms
.......... .......... .......... .......... ..........  25% ∆35ms
.......... .......... .......... .......... ..........  30% ∆4ms
.......... .......... .......... .......... ..........  35% ∆1ms
.......... .......... .......... .......... ..........  40% ∆16ms
.......... .......... .......... .......... ..........  45% ∆8ms
.......... .......... .......... .......... ..........  50% ∆26ms
.......... .......... .......... .......... ..........  55% ∆12ms
.......... .......... .......... .......... ..........  60% ∆13ms
.......... .......... .......... .......... ..........  65% ∆4ms
.......... .......... .......... .......... ..........  70% ∆1ms
.......... .......... .......... .......... ..........  75% ∆0ms
.......... .......... .......... .......... ..........  80% ∆1ms
.......... .......... .......... .......... ..........  85% ∆3ms
.......... .......... .......... .......... ..........  90% ∆14ms
.......... .......... .......... .......... ..........  95% ∆1ms
.......... .......... .......... .......... .......... 100% ∆0ms

(2/4) Relationship import 2020-11-25 14:25:47.283+0000
  Estimated number of relationships: 253.00
  Estimated disk space usage: 20.38KiB
  Estimated required memory usage: 15.60MiB
.......... .......... .......... .......... ..........   5% ∆1s 384ms
.......... .......... .......... .......... ..........  10% ∆1ms
.......... .......... .......... .......... ..........  15% ∆1ms
.......... .......... .......... .......... ..........  20% ∆1ms
.......... .......... .......... .......... ..........  25% ∆0ms
.......... .......... .......... .......... ..........  30% ∆4ms
.......... .......... .......... .......... ..........  35% ∆2ms
.......... .......... .......... .......... ..........  40% ∆2ms
.......... .......... .......... .......... ..........  45% ∆6ms
.......... .......... .......... .......... ..........  50% ∆0ms
.......... .......... .......... .......... ..........  55% ∆1ms
.......... .......... .......... .......... ..........  60% ∆1ms
.......... .......... .......... .......... ..........  65% ∆56ms
.......... .......... .......... .......... ..........  70% ∆30ms
.......... .......... .......... .......... ..........  75% ∆11ms
.......... .......... .......... .......... ..........  80% ∆12ms
.......... .......... .......... .......... ..........  85% ∆13ms
.......... .......... .......... .......... ..........  90% ∆11ms
.......... .......... .......... .......... ..........  95% ∆16ms
.......... .......... .......... .......... .......... 100% ∆6ms

(3/4) Relationship linking 2020-11-25 14:25:48.842+0000
  Estimated required memory usage: 7.971MiB
-......... .......... .......... .......... ..........   5% ∆230ms
.......... .......... .......... .......... ..........  10% ∆5ms
.......... .......... .......... .......... ..........  15% ∆2ms
.......... .......... .......... .......... ..........  20% ∆2ms
.......... .......... .......... .......... ..........  25% ∆1ms
.......... .......... .......... .......... ..........  30% ∆0ms
.......... .......... .......... .......... ..........  35% ∆25ms
.......... .......... .......... .......... ..........  40% ∆18ms
.......... .......... .......... .......... ..........  45% ∆37ms
.......... .......... .......... .......... ..........  50% ∆0ms
.......... .......... .......... .......... ..........  55% ∆1ms
.......... .......... .......... .......... ..........  60% ∆0ms
.......... .......... .......... .......... ..........  65% ∆1ms
.......... .......... .......... .......... ..........  70% ∆0ms
.......... .......... .......... .......... ..........  75% ∆2ms
.......... .......... .......... .......... ..........  80% ∆1ms
.......... .......... .......... .......... ..........  85% ∆0ms
.......... .......... .......... .......... ..........  90% ∆1ms
.......... .......... .......... .......... ..........  95% ∆0ms
.......... .......... .......... .......... .......... 100% ∆1ms

(4/4) Post processing 2020-11-25 14:25:49.499+0000
  Estimated required memory usage: 7.969MiB
-......... .......... .......... .......... ..........   5% ∆459ms
.......... .......... .......... .......... ..........  10% ∆27ms
.......... .......... .......... .......... ..........  15% ∆30ms
.......... .......... .......... .......... ..........  20% ∆11ms
.......... .......... .......... .......... ..........  25% ∆6ms
.......... .......... .......... .......... ..........  30% ∆15ms
.......... .......... .......... .......... ..........  35% ∆8ms
.......... .......... .......... .......... ..........  40% ∆6ms
.......... .......... .......... .......... ..........  45% ∆1ms
.......... .......... .......... .......... ..........  50% ∆9ms
.......... .......... .......... .......... ..........  55% ∆1ms
.......... .......... .......... .......... ..........  60% ∆6ms
.......... .......... .......... .......... ..........  65% ∆2ms
.......... .......... .......... .......... ..........  70% ∆11ms
.......... .......... .......... .......... ..........  75% ∆25ms
.......... .......... .......... .......... ..........  80% ∆16ms
.......... .......... .......... .......... ..........  85% ∆21ms
.......... .......... .......... .......... ..........  90% ∆11ms
.......... .......... .......... .......... ..........  95% ∆3ms
.......... .......... .......... .......... .......... 100% ∆1ms


IMPORT DONE in 6s 943ms.
Imported:
  171 nodes
  253 relationships
  564 properties
Peak memory usage: 15.60MiB
2020-11-25 14:25:50.972+0000 INFO [o.n.i.b.ImportLogic] Import completed successfully, took 6s 943ms. Imported:
  171 nodes
  253 relationships
  564 properties
2020-11-25 14:25:51.307+0000 INFO [StoreCopy] Import summary: Copying of 1026 records took 10 seconds (102 rec/s). Unused Records 602 (58%) Removed Records 0 (0%)
2020-11-25 14:25:51.308+0000 INFO [StoreCopy] ### Extracting schema ###
2020-11-25 14:25:51.310+0000 INFO [StoreCopy] Trying to extract schema...
2020-11-25 14:25:51.341+0000 INFO [StoreCopy] ... found 0 schema definition. The following can be used to recreate the schema:
2020-11-25 14:25:51.366+0000 INFO [StoreCopy]

The new folder foo was created by the root user. Don't know if this is wrong.

renatospaka@dell-w10home:~/docker-neo4j/neo4j/data/databases$ ls -lah
total 24K
drwxr-xr-x 6 systemd-resolve systemd-journal 4.0K Nov 25 11:25 .
drwxr-xr-x 4 systemd-resolve systemd-journal 4.0K Nov 24 19:30 ..
drwxr-xr-x 2 root            root            4.0K Nov 25 11:25 foo
drwxr-xr-x 3 systemd-resolve systemd-journal 4.0K Nov 25 11:22 movies
drwxr-xr-x 3 systemd-resolve systemd-journal 4.0K Nov 24 19:30 neo4j
-rw-r--r-- 1 systemd-resolve systemd-journal    0 Nov 24 19:30 store_lock
drwxr-xr-x 4 systemd-resolve systemd-journal 4.0K Nov 24 19:30 system

Anyway, this is the content of folder foo:

renatospaka@dell-w10home:~/docker-neo4j/neo4j/data/databases/foo$ ls -lah
total 920K
drwxr-xr-x 2 root            root            4.0K Nov 25 11:25 .
drwxr-xr-x 6 systemd-resolve systemd-journal 4.0K Nov 25 11:25 ..
-rw-r--r-- 1 root            root               0 Nov 25 11:25 database_lock
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.counts.db
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.id
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.labelscanstore.db
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.labeltokenstore.db
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.labeltokenstore.db.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.labeltokenstore.db.names
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.labeltokenstore.db.names.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.nodestore.db
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.nodestore.db.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.nodestore.db.labels
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.nodestore.db.labels.id
-rw-r--r-- 1 root            root             24K Nov 25 11:25 neostore.propertystore.db
-rw-r--r-- 1 root            root             24K Nov 25 11:25 neostore.propertystore.db.arrays
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.propertystore.db.arrays.id
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.propertystore.db.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.propertystore.db.index
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.propertystore.db.index.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.propertystore.db.index.keys
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.propertystore.db.index.keys.id
-rw-r--r-- 1 root            root             16K Nov 25 11:25 neostore.propertystore.db.strings
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.propertystore.db.strings.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.relationshipgroupstore.db
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.relationshipgroupstore.db.id
-rw-r--r-- 1 root            root             16K Nov 25 11:25 neostore.relationshipstore.db
-rw-r--r-- 1 root            root             48K Nov 25 11:25 neostore.relationshipstore.db.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.relationshiptypestore.db
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.relationshiptypestore.db.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.relationshiptypestore.db.names
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.relationshiptypestore.db.names.id
-rw-r--r-- 1 root            root            8.0K Nov 25 11:25 neostore.schemastore.db
-rw-r--r-- 1 root            root             40K Nov 25 11:25 neostore.schemastore.db.id

Regards,
Renato

The group and owner of all files and directories should be neo4j:neo4j.

I don't understand why the owner is systemd-resolve:systemd-journal and then root:root.

I wonder if the version of docker is an issue?

Can you try changing the owner/group for all of these directories and files under data?

[sudo] chown -R neo4j:neo4j

@elaine.rosenberg, let me understand one thing. When you say the ownership of files and folders are wrong/odd and it should be neo4j, you are referring to Linux OS or to the container OS?

All prints and info I sent in my last post are from Linux OS - in my case a WSL2 running Ubuntu. And there is no user neo4 created there. I suppose the chown command would fail.

The container OS since that runs the processes that access these files.

Elaine

renatospaka
Graph Voyager

OK, all information I sent you before is from Linux OS. For now on I will only send you data from the container.

This is from the container. You can see that data folder is owned by root.

renatospaka@dell-w10home:~/docker-neo4j/neo4j$ docker exec -it neo4j bash
root@b6811e4f16e4:/var/lib/neo4j# ls -lah
total 292K
drwx------ 1 neo4j neo4j 4.0K Nov 24 22:30 .
drwxr-xr-x 1 root  root  4.0K Nov 18 18:27 ..
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 24 22:30 .cache
-rwxrwxrwx 1 neo4j neo4j  23K Mar 12  2020 LICENSE.txt
-rwxrwxrwx 1 neo4j neo4j 166K Mar 12  2020 LICENSES.txt
-rwxrwxrwx 1 neo4j neo4j  135 Mar 12  2020 NOTICE.txt
-rwxrwxrwx 1 neo4j neo4j 1.5K Mar 12  2020 README.txt
-rwxrwxrwx 1 neo4j neo4j   92 Mar 12  2020 UPGRADE.txt
drwx------ 1 neo4j neo4j 4.0K Mar 12  2020 bin
drwx------ 1 neo4j neo4j 4.0K Mar 12  2020 certificates
drwx------ 1 neo4j neo4j 4.0K Nov 24 22:30 conf
lrwxrwxrwx 1 root  root     5 Nov 18 18:27 data -> /data
drwx------ 1 neo4j neo4j 4.0K Mar 12  2020 import
drwx------ 1 neo4j neo4j  16K Nov 18 18:27 lib
lrwxrwxrwx 1 root  root     5 Nov 18 18:27 logs -> /logs
drwxr-xr-x 2 neo4j neo4j  12K Nov 24 23:08 metrics
drwx------ 1 neo4j neo4j 4.0K Nov 18 18:27 plugins
drwx------ 1 neo4j neo4j 4.0K Nov 24 22:50 run

Likewise databases folder. It is owned by root too.

root@b6811e4f16e4:/var/lib/neo4j/data/databases# ls -lah
total 24K
drwxr-xr-x 6 neo4j neo4j 4.0K Nov 25 14:25 .
drwxr-xr-x 4 neo4j neo4j 4.0K Nov 24 22:30 ..
drwxr-xr-x 2 root  root  4.0K Nov 25 14:25 foo
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 25 14:22 movies
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 24 22:30 neo4j
-rw-r--r-- 1 neo4j neo4j    0 Nov 24 22:30 store_lock
drwxr-xr-x 4 neo4j neo4j 4.0K Nov 24 22:30 system

After applying chown command, the folder structure is as follows:

root@b6811e4f16e4:/var/lib# chown -R neo4j:neo4j neo4j
root@b6811e4f16e4:/var/lib# cd neo4j/
root@b6811e4f16e4:/var/lib/neo4j# ls -lah
total 292K
drwx------ 1 neo4j neo4j 4.0K Nov 24 22:30 .
drwxr-xr-x 1 root  root  4.0K Nov 18 18:27 ..
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 24 22:30 .cache
-rwxrwxrwx 1 neo4j neo4j  23K Mar 12  2020 LICENSE.txt
-rwxrwxrwx 1 neo4j neo4j 166K Mar 12  2020 LICENSES.txt
-rwxrwxrwx 1 neo4j neo4j  135 Mar 12  2020 NOTICE.txt
-rwxrwxrwx 1 neo4j neo4j 1.5K Mar 12  2020 README.txt
-rwxrwxrwx 1 neo4j neo4j   92 Mar 12  2020 UPGRADE.txt
drwx------ 1 neo4j neo4j 4.0K Mar 12  2020 bin
drwx------ 1 neo4j neo4j 4.0K Mar 12  2020 certificates
drwx------ 1 neo4j neo4j 4.0K Nov 24 22:30 conf
lrwxrwxrwx 1 neo4j neo4j    5 Nov 18 18:27 data -> /data
drwx------ 1 neo4j neo4j 4.0K Mar 12  2020 import
drwx------ 1 neo4j neo4j  16K Nov 18 18:27 lib
lrwxrwxrwx 1 neo4j neo4j    5 Nov 18 18:27 logs -> /logs
drwxr-xr-x 2 neo4j neo4j  12K Nov 24 23:08 metrics
drwx------ 1 neo4j neo4j 4.0K Nov 18 18:27 plugins
drwx------ 1 neo4j neo4j 4.0K Nov 24 22:50 run

However, foo folder continues owned by root.

root@b6811e4f16e4:/var/lib/neo4j/data/databases# ls -lah
total 24K
drwxr-xr-x 6 neo4j neo4j 4.0K Nov 25 14:25 .
drwxr-xr-x 4 neo4j neo4j 4.0K Nov 24 22:30 ..
drwxr-xr-x 2 root  root  4.0K Nov 25 14:25 foo
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 25 14:22 movies
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 24 22:30 neo4j
-rw-r--r-- 1 neo4j neo4j    0 Nov 24 22:30 store_lock
drwxr-xr-x 4 neo4j neo4j 4.0K Nov 24 22:30 system

Can you change the owner to neo4j:neo4j for the foo folder also?

Elaine

renatospaka
Graph Voyager

Hi Elaine.

Yes, I did change the owner of the folder.

Today I made a fresh execution of everything but the container creation. And this time I executed every single step from within the container via bash.

Nevertheless, I ran the command to copy movies database to movies2 database, it executes OK, but the owner of the movies2 folder is root. Then I changed the owner to neo4j and proceeded to create the movies2 database.

root@b6811e4f16e4:/var/lib/neo4j# ls -lah  data/databases/
total 28K
drwxr-xr-x 7 neo4j neo4j 4.0K Dec  9 22:32 .
drwxr-xr-x 4 neo4j neo4j 4.0K Nov 24 22:30 ..
drwxr-xr-x 2 root  root  4.0K Nov 25 14:25 foo
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 25 14:22 movies
drwxr-xr-x 2 neo4j neo4j 4.0K Dec  9 22:33 movies2
drwxr-xr-x 3 neo4j neo4j 4.0K Nov 24 22:30 neo4j
-rw-r--r-- 1 neo4j neo4j    0 Nov 24 22:30 store_lock
drwxr-xr-x 4 neo4j neo4j 4.0K Nov 24 22:30 system

This is the output:

neo4j@system> create database movies2;
0 rows available after 350 ms, consumed after another 0 ms
neo4j@system> show databases;
+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| name      | address        | role         | requestedStatus | currentStatus | error                                                              | default |
+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "movies"  | "0.0.0.0:7687" | "standalone" | "offline"       | "offline"     | ""                                                                 | FALSE   |
| "movies2" | "0.0.0.0:7687" | "standalone" | "online"        | "offline"     | "An error occurred! Unable to start database with name `movies2`." | FALSE   |
| "neo4j"   | "0.0.0.0:7687" | "standalone" | "online"        | "online"      | ""                                                                 | TRUE    |
| "system"  | "0.0.0.0:7687" | "standalone" | "online"        | "online"      | ""                                                                 | FALSE   |
+------------------------------------------------------------------------------------------------------------------------------------------------------------+

4 rows available after 9 ms, consumed after another 6 ms

Thanks.