When I try changing the Dgraph Zero URL to http://MY-URL:5080 then return to that page later it’s changed the URL to http://http/MY-URL:5080. Before the behavior was that it would truncate the last 0 in the port number. Am I missing something or is there a bug?
The correct port is 8080, not 5080.
Also, this isn’t right according to the HTTP standards.
Thanks for the port correction. Regarding butchering the form of the URL, Ratel is doing that.
I just fired up the MS Edge browser (I was using Chrome before and wanted to see if a native Win browser would work better) and entered http://MY-URL:8080 and when I later came back to that Dgraph Zero tab the url was mysteriously changed to http://MY-URL:808, with the final 0 truncated.
So, there is some weird behavior where what I’m typing isn’t what’s being saved.
I never saw that happening. Clear your browser or just the page data.
As another datapoint here - I can also reproduce the trimming of the last 0 (zero) in the zero address in the connection settings.
But this really does not effect functionality since you can put the address in yourself when you move a predicate - I believe that is the only place the zero address is used.
edit: in chrome
I’ve been looking at the local storage used and I see two url parameters. I am trying to bypass the UI and edit those parameters directly via Chrome’s developer tools. But, even though I set them correctly to port 8080 on my server, when I try to refresh the schema I get a 404 error. The JS console shows that it’s trying access port 8000.
What am I missing?
Ratel port is 8000. Dgraph’s API is 8080. Make sure all ports are exposed - be it on your firewall or Docker/K8s. Also, there is a whitelist config that may help in your case https://dgraph.io/docs/deploy/dgraph-administration/#whitelisting-admin-operations
I’m still confused. When I hit the Refresh Schema button, the JS console shows an attempt to get to server:8000/health, which is the wrong port. I can browse to server:8080/health and that gets a response from the server. So something is misconfigured that it’s trying to find the health check on port 8000.
Clear the browser or just ignore it if it is not blocking something else. I’ll test this later(if there is a bug).
I’m pretty much dead in the water. This is a new deployment and I can’t create a schema.
I have run this compose
# This Docker Compose file can be used to quickly bootup Dgraph Zero
# and Alpha in different Docker containers.
# It mounts /tmp/data on the host machine to /dgraph within the
# container. You can change /tmp/data to a more appropriate location.
# Run `docker-compose up` to start Dgraph.
version: "3.2"
services:
zero:
image: dgraph/dgraph:v21.03.1-8-g7f51327fd
volumes:
- /dgraph
ports:
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --my=zero:5080
alpha:
image: dgraph/dgraph:master
volumes:
- /dgraph
ports:
- 8080:8080
- 9080:9080
restart: on-failure
command: bash -c "
echo '12345678901234567890123456789012' > hmac_secret_file &&
dgraph alpha --my=alpha:7080 --zero=zero:5080 --acl secret-file="./hmac_secret_file" --security whitelist="10.0.0.0/8,172.0.0.0/8,192.168.0.0/16"
"
ratel:
image: dgraph/ratel:latest
ports:
- 8000:8000
command: dgraph-ratel
And it is running just fine with the latest Ratel build.
I’m curious if you are running Ratel inside a container or if you just extracted the Ratel binary (and associated library) from the container and ran it outside a container.
So, there could be a problem since I’m not running Ratel in a container. When I logged an issue here before of not being able to build Ratel I was instructed to extract it from a container and I did that. Running containers in our environment is not the easiest thing to do for various reasons.
play.dgraph.io (dev) reproduces this for me with chrome 91.0.4472.164 :