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
System.UnauthorizedAccessException running EventStore 20.6.1 on docker #2706
Comments
After spending a few hours struggling with this, I finally managed to figure it out by myself. It seems we need new config for version v20.6.1 and the documentation is not updated. For those who had the same issue, I'm sharing a repo with an example working with v20.6.1. This is my docker-compose.yml https://github.com/albertocorrales/eventstoreissue2061/blob/main/docker-compose.yml And for the client now you have also to configure explicitly that you are not using tsl, like in this example https://github.com/albertocorrales/eventstoreissue2061/blob/main/Program.cs |
It's not the config issue, it's Docker permissions issue and the user used to run the container. I just used your original compose file and it worked just fine. Of course, all your observations are correct. For the UI to work you need Atom Pub enabled. To use the TCP protocol, you'd need to enable TCP on the external port. You also need to tell the client that your server is running without HTTPS/TLS. |
Or just try to delete the eventstore volume. |
The same error in Kubernetes StatefulSet: System.UnauthorizedAccessException: Access to the path 'var/lib/eventstore/writer.chk' is denied.
// ... Tested images:
# ...
apiVersion: apps/v1
kind: StatefulSet
# ...
volumeMounts:
- name: my-eventstore-data
mountPath: /var/lib/eventstore
# ...
volumeClaimTemplates:
- metadata:
name: my-eventstore-data
spec:
accessModes: ['ReadWriteOnce']
resources:
requests:
storage: 5Gi
# ... Behind the default StorageClass there is a dynamic storage provisioner (csi.vsphere.vmware.com), which works fine. |
The eventstore docker container uses user ID 1000. I was mapping the volumes locally and couldn't get eventstore to run. After changing the owner of the folder to 1000 I got it working with local volumes. chown -R 1000:1000 data/
chown -R 1000:1000 logs/ Here's my docker-compose.yml version: "3.4"
services:
eventstore.db:
image: eventstore/eventstore:20.10.2-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INSECURE=true
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
ports:
- "1113:1113"
- "2113:2113"
volumes:
- ./data:/var/lib/eventstore
- ./logs:/var/log/eventstore Hope this helps anyone |
Describe the bug
When I try to run EventStore version 20.6.1, I'm having an access error. I based my docker-compose on this URL: https://developers.eventstore.com/clients/dotnet/generated/v20.6.0/getting-started/quick-tour.html#requirements
To Reproduce
Steps to reproduce the behavior:
docker-compose up
Expected behavior
EventStore starts running on docker
Actual behavior
I get an error on the console: System.UnauthorizedAccessException: Access to the path '/var/lib/eventstore/writer.chk' is denied.
Config/Logs/Screenshots
EventStore details
The text was updated successfully, but these errors were encountered: