Can't start dgraph server with specific p Dir

hi,

i found a problem. i want to restart dgraph server with a specific p dir, but it has some errors in log.

server’s log:

zero’s log:

can somebody help me to see what happened ?
how to fix it ?

What commands did you use? If possible a step by step.

Cheers

yes, step by step.

it seems that i can’t delete w dir when i restart dgraph server with a specific p dir generated by bulk loader in out.

Your commands seem OK, these are the ones I use for single server.

dgraph zero --my=localhost:5080 -w zero0
dgraph server --my=localhost:7080 --lru_mb=7512 --zero=localhost:5080 -p server0 -w server0/w --badger.options=lsmonly

Looking at your logs, this seems to me to be remnants of another badly disconnected instance.

Are the binaries the same version? When u disconnected you removed the group?
like: localhost:6080/removeNode?id=3&group=2

More about Dgraph Zero: Get started with Dgraph

You would need to be under the same conditions as before to reuse the same Path. Because in this Path the Zero or Server settings may have been different. Or even different versions.

The same version, and i didn’t remove any group.

it must be some problems that i haven’t noticed about.

anyway, i will find it out.

just try many times

@MichelDiz I’ve experienced similar problem many times on mac/docker - dgraph server is unable to start after a reboot.
Only thing that’s ever worked for me is removing the data volume.

Depending on the Docker config/installation you need to use the IP of the HOST and not “localhost”. Or edit a DNS server or even edit /etc/hosts

But I’m not sure about “dgraph server is unable to start after a reboot.”, I’ll investigate.

I encountered something similar once… in my case I believe it was because zero and server service volumes accidentally pointed to different directories…

So if anyone encounter this error then I’d strongly encourage them to double check the volume paths in their docker-compose file (at least I believe this was the error I received when it happened… it was a long time ago so I might misremember).

In this case I would recommend everyone to use an NFS server. Or take a look at how to manage shared volumes in Docker. But an NFS server is easier and safe.

Or maybe use some equivalent AWS storage service. They have NFS server too. The availability of storage is important, often people end up making mistakes when using Docker Volumes.

Sounds like it’s possible to run a Dgraph instance on your server while having volumes pointed to AWS S3/Google Cloud Storage/etc? If so then I’d definitely appreciate a tutorial on this.

I’m aware of the deploy guide, but that didn’t give me the impression that I could just attach the volume to a S3 Bucket… maybe I misunderstood you

In fact, Dgraph does not support services outside Dgraph’s scope. What we can do is recommend. Docker supports third-party Storage services. It is up to you or your IT team to set up such services.

Here some links Docker Registry storage driver | Docker Documentation
S3 storage driver | Docker Documentation
Microsoft Azure storage driver | Docker Documentation
Google Cloud Storage driver | Docker Documentation

https://hub.docker.com/r/itsthenetwork/nfs-server-alpine/