Dgraph-ratel not found


Report a Dgraph Bug

/run.sh: line 16: dgraph-ratel: command not found

What version of Dgraph are you using?

21.03.0

when running
docker run --rm -it -p “8080:8080” -p “9080:9080” -p “8000:8000” -v ~/dgraph:/dgraph “dgraph/standalone:v21.03.0”

this appears
/run.sh: line 16: dgraph-ratel: command not found

causing me to not be able to connect to localhost:8000 and use the ratel tools

Dgraph Version
$ dgraph version
 
21.03.0

Have you tried reproducing the issue with the latest release?

What is the hardware spec (RAM, OS)?

Steps to reproduce the issue (command/config used to run Dgraph).

Expected behaviour and actual result.


Experience Report for Feature Request

Note: Feature requests are judged based on user experience and modeled on Go Experience Reports. These reports should focus on the problems: they should not focus on and need not propose solutions.

What you wanted to do

What you actually did

Why that wasn’t great, with examples

Any external references to support your case

1 Like

Check out the release notes, it is no longer packaged in the same docker image, just use play.dgraph.io

@Connor: You can connect to your local Dgraph instance using the public play.dgraph.io UI.

@iluminae: However, what is the proposed solution to use the Ratel UI when you are disconnected from the internet, e.g. in a corporate network?

From the release notes:

Should you still need to run a local copy of Ratel, you can compile a version from the Ratel source code 1 (see building and running Ratel). For building a Docker image, you can copy the dgraph-ratel binary into a docker image based on Ubuntu or other Linux operating system docker images.

@joaquin has published the Ratel image Docker Hub

Hi, I suggest you will update the documentation and the getting started page so it would be easier to find a solution. Here, I created a topic for this issue: Get started page is not up to date

1 Like

Opps, for dgraph/standalone:v21.03.1, there is no dgraph-ratel bin file.

But the /run.sh still has command

# TODO properly handle SIGTERM for all three processes.
dgraph-ratel & dgraph zero & dgraph alpha
1 Like

FYI for whomever would update the Docker image and test it, here’s a little snippet:

#!/usr/bin/env bash
set -x

pid=0

# SIGUSR1-handler
my_handler() {
  echo "my_handler"
}

# SIGTERM-handler
term_handler() {
  if [ $pid -ne 0 ]; then
    kill -SIGTERM "$pid"
    wait "$pid"
  fi
  exit 143; # 128 + 15 -- SIGTERM
}

# setup handlers
# on callback, kill the last background process, which is `tail -f /dev/null` and execute the specified handler
trap 'kill ${!}; my_handler' SIGUSR1
trap 'kill ${!}; term_handler' SIGTERM

# run application
node program &
pid="$!"

# wait forever
while true
do
  tail -f /dev/null & wait ${!}
done

Souce: Trapping signals in Docker containers | by Grigorii Chudnov | Medium

Another best practice is to wrap the service with an small init script that handles the signals, e.g. tiny: