Windows issue - dgraph server

How to run the Dgraph normally? I do the same command as in docs. But it gives me this error and the only way it works is by deleting all folders and information.

PS. There is no other process.
PS2. Sort of solved by deleting the locks.

dgraph server --memory_mb 2048 --zero localhost:5080 --ui assets
2017/11/19 17:20:24 Error while creating badger KV WAL store error: open C:\Users\MichelDiz\Desktop\Dgraph\w\LOCK: O arquivo já existe.
Cannot create pid lock file "C:\\Users\\MichelDiz\\Desktop\\Dgraph\\w\\LOCK".  Another process is using this Badger database
github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.acquireDirectoryLock
        /ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/dir_windows.go:72
github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.Open
        /ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/db.go:186
github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger.OpenManaged
        /ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/dgraph-io/badger/managed_db.go:38
github.com/dgraph-io/dgraph/edgraph.(*ServerState).initStorage
        /ext-go/1/src/github.com/dgraph-io/dgraph/edgraph/server.go:98
github.com/dgraph-io/dgraph/edgraph.NewServerState
        /ext-go/1/src/github.com/dgraph-io/dgraph/edgraph/server.go:74
github.com/dgraph-io/dgraph/dgraph/cmd/server.run
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/server/run.go:303
github.com/dgraph-io/dgraph/dgraph/cmd/server.glob..func1
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/server/run.go:294
github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra.(*Command).execute
        /ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra/command.go:702
github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra.(*Command).ExecuteC
        /ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra/command.go:783
github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra.(*Command).Execute
        /ext-go/1/src/github.com/dgraph-io/dgraph/vendor/github.com/spf13/cobra/command.go:736
github.com/dgraph-io/dgraph/dgraph/cmd.Execute
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/cmd/root.go:71
main.main
        /ext-go/1/src/github.com/dgraph-io/dgraph/dgraph/main.go:34
runtime.main
        /usr/local/go/src/runtime/proc.go:185
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:2197

The locks will be there if dgraph crashed (leaving lock behind), or if there is one already running.

There is no other process.

Since there are no other processes running, deleting the locks is the correct thing to do.

1 Like

I forced the shutdown of the terminal with CTRL + C
What is the correct procedure?

Cheers

Sending Ctrl-C (SIGINT) once will trigger a clean shutdown, although it takes a few seconds to do this. If you send multiple SIGINTs it will shutdown immediately, which would leave lock files behind.

1 Like

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