Error While creating second alpha image


(Ami Pandat) #5

Okay. But in w and p directory only three files are there .vlog .sst and MANIFEST
.lock file is not there in those directories.


(Michel Conrado) #6

Well that means you’re not in the desired file path. If you try to start Dgraph and it gives the error about “lock”, it means that there is a .lock.


(Michel Conrado) #7

Clean those files and start from scratch.


(Ami Pandat) #8

Yes, done! I have deleted lock file. Now again I have to run from scratch? right? or just by running second alpha image it will work.


(Michel Conrado) #9

If you found the lock file then you do not have to start from scratch. Unless you want to.


(Ami Pandat) #10

I found it and deleted from both p and w directories. Then I have run a command

dgraph alpha --lru_mb=2048 --my=10.100.64.33:7081 --zero localhost:5080 -o=1

But again it is creating a lock file in those directories.


(Michel Conrado) #11

Well, Dgraph have to create it. You only delete it in an emergency context. If you close Dgraph correcly, Dgraph will take off the locks.


(Ami Pandat) #12

Okay , so how to close Dgraph? or how to overcome this issue?


(Michel Conrado) #13

ctrl + C
OR
Command + c
and wait. It will do a sigterm turn off.


(Ami Pandat) #14

Well, I am not sure but I think for both alpha images … I think there should separate w and p directories and that is why it is creating problem.
Isn’t it?


(Michel Conrado) #15

Hum, tell me what exactly are you doing? Alpha images? are running docker? are u running binaries locally? If you’re running docker nothing like that should be happening.


(Ami Pandat) #16

No, I am not using Docker. I am running on a locally installed binary. Ya so, I want to create a cluster with 3 alpha so that I can run DGraph in distributed mode. That is why, I am following these steps.

In this procedure while running second alpha it is showing error

Error while creating badger KV WAL store error: resource temporarily unavailableCannot acquire directory lock on “w”. Another process is using this Badger database.

As this error says Another process is using this Badger database. I thought there might be some directories issue.


(Michel Conrado) #17

Okay, now I understand your context. And that below what is happening since the beginning.

If you run Dgraph by binaries in the same path. It will overwrite any default file. Not just .lock files.


(Ami Pandat) #18

Yes!
So do I have to create different one? If yes, then How?


(Michel Conrado) #19

Create a folder for each Alpha. Then open a terminal for each one and “cd to each path”. And run it normally as you’re doing.


(Ami Pandat) #20

Ooh okay. For dgraph zero there is no change …right?


(Michel Conrado) #21

For each Zero also create a folder and “cd to path”


(Ami Pandat) #22

Hmm…okay…got it!
Thanks!
I will let you know by tomorrow [as of now office hours completed…so] if I find any error.
Once again, Thanks!


(Ami Pandat) #23

Its working by creating separate folder.Thanks!


(system) closed #24

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.