8000 "Error: Error saving to storage" when adding a new user · Issue #1 · djmaze/docker-prosody · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

"Error: Error saving to storage" when adding a new user #1

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

Closed
eelcocramer opened this issue Oct 28, 2014 · 6 comments
Closed

"Error: Error saving to storage" when adding a new user #1

eelcocramer opened this issue Oct 28, 2014 · 6 comments

Comments

@eelcocramer
Copy link

When I try to add a new user to prosody with the command in the README.md I get an error message that says:

datamanager         error   Unable to write to accounts storage ('/var/lib/prosody/localhost/accounts/eelco.dat~: No such file or directory') for user: eelco@localhost
Error: Error saving to storage

Any ideas on how I can fix this?

@djmaze
Copy link
Owner
djmaze commented Oct 28, 2014

The commands given in the README assume you are running all those commands from the same directory. Did you run this command from the same directory you started the server container? Does the .prosody subdirectory contain anything? (Try sudo find .prosody)

@eelcocramer
Copy link
Author

Yes I did. I also tried to add the .dat file manually but it seems that prosody does not detect it.

Just for completeness sake I will put all details below.

I start of with the following folder structure:

Dockerfile
certs
certs/ssl.cert
certs/ssl.key
conf.d

My Dockerfile contains the following:

FROM mazzolino/prosody
CMD chown prosody /var/lib/prosody && prosodyctl start

I build the Dockercontainer using the following command: docker build -t prosody . the output is:

Sending build context to Docker daemon 10.75 kB
Sending build context to Docker daemon 
Step 0 : FROM mazzolino/prosody
# Executing 3 build triggers
Trigger 0, ADD conf.d /etc/prosody/conf.d
Step 0 : ADD conf.d /etc/prosody/conf.d
Trigger 1, ADD certs /etc/prosody/certs
Step 0 : ADD certs /etc/prosody/certs
Trigger 2, RUN chown -R prosody:prosody /etc/prosody/certs && chmod 0700 /etc/prosody/certs && chmod 0600 /etc/prosody/certs/*
Step 0 : RUN chown -R prosody:prosody /etc/prosody/certs && chmod 0700 /etc/prosody/certs && chmod 0600 /etc/prosody/certs/*
 ---> Running in a43b1819d412
 ---> e6df2b9e7d17
Removing intermediate container a43b1819d412
Removing intermediate container ad5006f5077b
Removing intermediate container 337bec53faec
Step 1 : CMD chown prosody /var/lib/prosody && prosodyctl start
 ---> Running in 061e7423650a
 ---> 4d0c48e7735d
Removing intermediate container 061e7423650a
Successfully built 4d0c48e7735d

Then I run prosody with the following command:
docker run -d -p 5222:5222 -p 5269:5269 -p 5280:5280 -p 5347:5347 -v $(pwd)/.prosody:/var/lib/prosody -e "XMPP_DOMAIN=localhost" prosody

Now I have the following file structure:

./.prosody
./certs
./certs/ssl.cert
./certs/ssl.key
./conf.d
./Dockerfile

When I try to create a new user I get the error message:

$ docker run --rm -v $(pwd)/.prosody:/var/lib/prosody prosody prosodyctl register eelco localhost mypass
datamanager         error   Unable to write to accounts storage ('/var/lib/prosody/localhost/accounts/eelco.dat~: No such file or directory') for user: eelco@localhost
Error: Er
8000
ror saving to storage

@eelcocramer
Copy link
Author

Hm, I believe this might have to do with the fact I'm using boot2docker. It seems that the container does not have the correct access to the files on the host. When I give the world access to .prosody I can see that an extra folder is created.

@eelcocramer
Copy link
Author

Might be caused by this: boot2docker/boot2docker#581

@djmaze
Copy link
Owner
djmaze commented Oct 29, 2014

Ah, yes, that must be the case. So you might successful using this workaround. Unfortunately I can be of no help at that (no OSX available).

Running prosody as root inside the container would be an option. As this would lower the security, I would not want to do this by default though.

@eelcocramer
Copy link
Author

The workaround doesn't do it for me. I will be running prosody as root for now...

Thanks!

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

2 participants
0