helper-reset-password icon indicating copy to clipboard operation
helper-reset-password copied to clipboard

"Unable to locate /data/portainer.db on disk"

Open bitshiftnetau opened this issue 4 years ago • 16 comments

I have portainer running as a service in Arch linux. The portainer.db file is located at /var/lib/portainer however when I pass that in to docker it cannot locate.

This is the exact command I enter

docker run --rm -v portainer_portainer_data:/var/lib/portainer portainer/helper-reset-password I have also tried making a /data folder and placing the portainer.db file there

bitshiftnetau avatar Mar 28 '21 14:03 bitshiftnetau

tried building manually and passing /var/lib/portainer into binary, no luck

bitshiftnetau avatar Mar 28 '21 14:03 bitshiftnetau

Eu também tive o mesmo problema... Estou procurando algo na internet, mas até agora não consegui resolver....

githubmarau avatar Aug 30 '21 18:08 githubmarau

It's because the portainer data doesn't actually exist in the volume for some reason

smashah avatar Sep 23 '21 12:09 smashah

@bitshiftnetau check to see if your portainer data volume has a different name. You can see what your volumes are with: docker volume ls

In my case, my volume was called portainer_portainer-data —because that's the name I used when creating the volume originally.

z3cka avatar Dec 08 '21 22:12 z3cka

Just want to share the fix on my Synology NAS. The folder path needs to be specified to make it work.

sudo docker run --rm -v /volumeX/docker/portainer:/data portainer/helper-reset-password

msaifuddin avatar May 31 '22 01:05 msaifuddin

Just want to share the fix on my Synology NAS. The folder path needs to be specified to make it work.

sudo docker run --rm -v /volumeX/docker/portainer:/data portainer/helper-reset-password

This solved my problem, thank you.

CreateSean avatar Jun 27 '22 17:06 CreateSean

Had he same problem on a synology the command above fixed it.

docker volume ls does show the volume as portainer_data but I had to specify the full path as above.

hulleyrob avatar Oct 04 '22 09:10 hulleyrob

Just want to share the fix on my Synology NAS. The folder path needs to be specified to make it work.

sudo docker run --rm -v /volumeX/docker/portainer:/data portainer/helper-reset-password

Thank you. This solved my issue as well.

Pretty sure I ran the "/volume1/docker/portainer-ce:/data portainer/helper-reset-password" to get me over the hump.

Much appreciated

Dredakae avatar Feb 05 '23 22:02 Dredakae

Portainer Version 2.17.1 community Edition

sudo docker run --rm -v /volume1/docker/portainer:/data portainer/helper-reset-password did not work on synology NAS for me.

OutPut: `revilo@DSM:/volume1/docker/portainer$ sudo docker run --rm -v /volume1/docker/portainer:/data portainer/helper-reset-password

time="2023-02-27T18:56:53Z" level=info msg="Loading PortainerDB: portainer.db"

2023/02/27 18:56:53 Data store not found at /data`

mentioned directory to mount is available and listing shows me that there are portainer.db / .key and .pub

Any help is highly appreciated.

Thank you

revil-O avatar Feb 27 '23 19:02 revil-O

Running docker/portainer on a Western Digitial PR4100.

docker run --rm -v portainer_data:/data portainer/helper-reset-password

2023/07/22 18:32:09 Unable to locate /data/portainer.db on disk

I've located the portainer.db file on a mnt but can't get passed this error. I don't think the -v is correct. I'm thinking that this needs to actually mount the folder first to get docker to think it's a volume.

Help is appreciated.

scuba-fan avatar Jul 22 '23 18:07 scuba-fan

Hi @scuba-fan,

I had the same issue and what I did was search for the file:

find . -name portainer.db

It was found in: ./opt/portainer/portainer.db

Then I executed the docker run command as follows:

docker run --rm -v /opt/portainer:/data portainer/helper-reset-password

This time if was successful for me: {"level":"info","filename":"portainer.db","time":"2023-08-14T13:05:30Z","message":"loading PortainerDB"} 2023/08/14 13:05:31 Password successfully updated for user: ...

Hope that helps!

ndankov avatar Aug 14 '23 13:08 ndankov

Worked for me. Did sudo find / -name pertained.db which gives you path. Then just replace the portainer_data with the path

Ephesian avatar Dec 29 '23 23:12 Ephesian

I found everything that I reported on the thread in the official forum of WDcommunity.

But I'm stuck a step ahead of yours : https://github.com/portainer/helper-reset-password/issues/4

If there is someone who could save my day ? ^^'

{"level":"info","filename":"portainer.db","time":"2024-01-11T16:15:55Z","message":"loading PortainerDB"} 2024/01/11 16:15:56 Unable to open the database, err: timeout

I got that when I try to do the command : docker run --rm -v /mydockerfolder:/data portainer/helper-reset-password

Any idea ? I indeed tried docker stop portainer command it gave me : 'portainer'

Then I try 'docker start portainer' and it gives me : Error response from daemon: driver failed programming external connectivity on endpoint portainer (222524611a7e68f9826958beb6e56935f3daeea3b8c3dba19e810c2ada96865f): Error starting userland proxy: listen tcp4 0.0.0.0:8000: bind: address already in use Error: failed to start containers: portainer

Any idea ? I don't know if it somehow the same issue. To me it looks the same ! ^^'

CptCurk avatar Jan 11 '24 16:01 CptCurk

in case anyone doesn't quite get this- the written example says

docker run --rm -v portainer_data:/data portainer/helper-reset-password

My Portainer docker setup on Synology used this path instead of 'portainer_data' -

volume1/docker/portainer/data

So my complete command was-

docker run --rm -v /volume1/docker/portainer/data:/data portainer/helper-reset-password

adamphetamine avatar Jan 28 '24 23:01 adamphetamine

Fix for {"level":"info","filename":"portainer.db","time":"2024-04-28T11:29:57Z","message":"loading PortainerDB"} 2024/04/28 11:29:58 Unable to open the database, err: timeout

Stop the running portioner container before you execute the command.

asdfsafd avatar Apr 28 '24 11:04 asdfsafd