Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bitshiftnetau opened this issue Mar 28, 2021 · 15 comments
Open

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

bitshiftnetau opened this issue Mar 28, 2021 · 15 comments

Comments

@bitshiftnetau
Copy link

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
Copy link
Author

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

@githubmarau
Copy link

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

@smashah
Copy link

smashah commented Sep 23, 2021

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

@z3cka
Copy link

z3cka commented Dec 8, 2021

@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.

@msaifuddin
Copy link

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

@CreateSean
Copy link

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.

@hulleyrob
Copy link

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.

@Dredakae
Copy link

Dredakae commented Feb 5, 2023

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

@revil-O
Copy link

revil-O commented Feb 27, 2023

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

@scuba-fan
Copy link

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.

@ndankov
Copy link

ndankov commented Aug 14, 2023

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!

@Ephesian
Copy link

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

@CptCurk
Copy link

CptCurk commented Jan 11, 2024

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

But I'm stuck a step ahead of yours : #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 ! ^^'

@adamphetamine
Copy link

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

@asdfsafd
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests