Network Access error for dgraph tutorial

I am following the tutorial and have tried both standalone and the regular dgraph and both cases I get an error with network access.

I can access the Ratel website, but I can’t do anything.

It says connected, but when you hover over the red it says “network access” and I can’t get through step 3 of the tutorial where you load a schema.

I tried the standalone initially, then switch to the docker common and ran all three terminal sessions.

I changed the dgraph alpha url in the tutorial to the remote host on my local lan.

If I go to the url directly, I get this, so I know it is listening and I can access it.

Dgraph browser is available for running separately using the dgraph-ratel binary

I most likely will end up using slash, but I wanted to setup a local instance for dev to avoid running out of traffic as 1Mb isn’t much for any form of testing.

Do you get a Page Not Found if you use your browser to go to 192.168.1.20:6080 (which is where I assume you’re also running Zero)?

Yes, I do.

404 page not found

Can you share the logs you get in the developer tools? in the console part.

Also, please check if you can reach

192.168.1.20:8080/state
192.168.1.20:8080/health
192.168.1.20:6080/state

Ok, I just purged all my docker instances. Pulled standalone as per the tour. Ran it as per the tour.

If I go directly to the url in my browser (just as test). I get this.

https://i.imgur.com/OY6SNJ7.png
https://i.imgur.com/pygZF3X.png

This confirms something is listening.

If I go into the tour, and change the url.

I get this

Watching the console in another window via SSH I used to launch it, I see no reaction what so ever when I try to connect.

192.168.1.20:8080/state

{“counter”:“19”,“groups”:{“1”:{“members”:{“1”:{“id”:“1”,“groupId”:1,“addr”:“localhost:7080”,“leader”:true,“amDead”:false,“lastUpdate”:“1612645535”,“clusterInfoOnly”:false,“forceGroupId”:false}},“tablets”:{“dgraph.cors”:{“groupId”:1,“predicate”:“dgraph.cors”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.drop.op”:{“groupId”:1,“predicate”:“dgraph.drop.op”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.p_query”:{“groupId”:1,“predicate”:“dgraph.graphql.p_query”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.p_sha256hash”:{“groupId”:1,“predicate”:“dgraph.graphql.p_sha256hash”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.schema”:{“groupId”:1,“predicate”:“dgraph.graphql.schema”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.schema_created_at”:{“groupId”:1,“predicate”:“dgraph.graphql.schema_created_at”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.schema_history”:{“groupId”:1,“predicate”:“dgraph.graphql.schema_history”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.xid”:{“groupId”:1,“predicate”:“dgraph.graphql.xid”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.type”:{“groupId”:1,“predicate”:“dgraph.type”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”}},“snapshotTs”:“14”,“checksum”:“12071872251239819759”,“checkpointTs”:“0”}},“zeros”:{“1”:{“id”:“1”,“groupId”:0,“addr”:“localhost:5080”,“leader”:true,“amDead”:false,“lastUpdate”:“0”,“clusterInfoOnly”:false,“forceGroupId”:false}},“maxLeaseId”:“10000”,“maxTxnTs”:“10000”,“maxRaftId”:“1”,“removed”:,“cid”:“817a3f76-9340-4915-b697-2711eb757c02”,“license”:{“user”:"",“maxNodes”:“18446744073709551615”,“expiryTs”:“1615237537”,“enabled”:true}}

192.168.1.20:8080/health

[{“instance”:“alpha”,“address”:“localhost:7080”,“status”:“healthy”,“group”:“1”,“version”:“v20.11.0”,“uptime”:252,“lastEcho”:1612645783,“ongoing”:[“opRollup”],“ee_features”:[“backup_restore”],“max_assigned”:16}]

192.168.1.20:6080/state

{“counter”:“19”,“groups”:{“1”:{“members”:{“1”:{“id”:“1”,“groupId”:1,“addr”:“localhost:7080”,“leader”:true,“amDead”:false,“lastUpdate”:“1612645535”,“clusterInfoOnly”:false,“forceGroupId”:false}},“tablets”:{“dgraph.cors”:{“groupId”:1,“predicate”:“dgraph.cors”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.drop.op”:{“groupId”:1,“predicate”:“dgraph.drop.op”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.p_query”:{“groupId”:1,“predicate”:“dgraph.graphql.p_query”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.p_sha256hash”:{“groupId”:1,“predicate”:“dgraph.graphql.p_sha256hash”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.schema”:{“groupId”:1,“predicate”:“dgraph.graphql.schema”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.schema_created_at”:{“groupId”:1,“predicate”:“dgraph.graphql.schema_created_at”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.schema_history”:{“groupId”:1,“predicate”:“dgraph.graphql.schema_history”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.graphql.xid”:{“groupId”:1,“predicate”:“dgraph.graphql.xid”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”},“dgraph.type”:{“groupId”:1,“predicate”:“dgraph.type”,“force”:false,“onDiskBytes”:“0”,“remove”:false,“readOnly”:false,“moveTs”:“0”,“uncompressedBytes”:“0”}},“snapshotTs”:“14”,“checksum”:“12071872251239819759”,“checkpointTs”:“0”}},“zeros”:{“1”:{“id”:“1”,“groupId”:0,“addr”:“localhost:5080”,“leader”:true,“amDead”:false,“lastUpdate”:“0”,“clusterInfoOnly”:false,“forceGroupId”:false}},“maxLeaseId”:“10000”,“maxTxnTs”:“10000”,“maxRaftId”:“1”,“removed”:,“cid”:“817a3f76-9340-4915-b697-2711eb757c02”,“license”:{“user”:"",“maxNodes”:“18446744073709551615”,“expiryTs”:“1615237537”,“enabled”:true}}

If I just go to :6080 like suggested by Chewy, I get.

404 page not found

I even did an SSH port forward for (8000, 8080, 6080) so dgraph appeared to be on my local machine to see if it was a bug in the tour in using custom hosts, but I didn’t think so because of this in Ratel.

I can see Ratal launch, but it cannot connect locally either.

As for logs, I don’t see a lot, just seems like normal noise outside of no schema exists (because I can’t connect to add one).

Once it is launched, the logs don’t really change or even acknowledge connections.

This is frustrating, because the tour looks like it would answer some of my questions, but I have been banging my head against this for over a month just trying to do atomic transactions which is stupidly simple in most dbs.

I see here 192.168.1.20 but in the PrintScreen, I see 192.168.200.21. Is it a typo?

No, I am using the correct IP. I changed them.

Please, share details of how you have started the cluster. All steps.

But, as you are able to see the state and health. Make no sense you being blocked. Are you using HTTPS on the address instead of HTTP? Share the logs on the Developer tools.

Yeah, cuz there is nothing there indeed. If you get 404, it means that Dgraph Zero is reachable.

docker pull dgraph/standalone
docker run -it -p 5080:5080 -p 6080:6080 -p 8080:8080 \
  -p 9080:9080 -p 8000:8000 -v ~/dgraph:/dgraph --name dgraph \
  dgraph/standalone:v20.11.0

I also did the Docker common version running all three components individually, same end result.

No, if I was I wouldn’t get any response at all.

I don’t know how to do this, I tried to add the logs I see in the console to my previous longer comment but I got a 429 error when they were in the comment, once I removed them it allowed me to comment.

Your docker instance is a “native” installation or is it a Virtual Machine approach?
Why do you have two different IPs?
Is the docker instance remotely?
If so, have you checked the iptables, firewall, and so on from the host of that machine?

If you wish, you can forward the 8080 port via ssh e.g:

ssh -L 8080:localhost:8080 user@192.168.1.200

native

I changed it in the post for privacy, although it is it’s a local ip it isn’t a big deal, it’s just habit.

Local LAN

None, it is on local LAN so I am not running a firewall.

I do it differently, but I was just making it appear as local host to test if the tour had a bug.

Just curious, why you’re not using localhost on your docker instance? In general native installation of the docker runs automatically on localhost. Only VMs runs different IPs(LAN on bridge or a second ethernet card).

Don’t bother with this. Only your public IP matters. If someone tries to attack your home/office they already know your LAN details. And they can just run a “scan” to find devices. If you care about this, you should reboot your modem every 6 hours. So your ISP gives you a new IP.

Again, share the dev tools logs. There might show up what is happening.

I am on a Windows machine, and dgraph/docker is running on a Linux host on my LAN.

How? I am not sure how to do this. You mean just copy the output of console?

Press Ctrl Shift J in that page and go to console.

So, check if the ports are open. Linux tends to be “deny” by default. Or use the SSH forwarding I mentioned.

My posts of each of the things you asked for shows the ports are in fact opened or I wouldn’t be able to give you status and health checks.

There you go. Chrome is blocking your connection. See the last error. As Dgraph runs on HTTPS your docker should be behind HTTPS too. Let me check a solution for this.

In the meantime, test on another browser.

Same thing in Chrome (I use Brave), but I have the same issue with Ratel not being able to connect as I showed in my screenshots above. I tried turning shields off in Brave and made no difference.

Oddly all my images disappeared in my above replies.

Use this instead, it shall work http://play.dgraph.io/

I want to be able to run my own locally, and ultimately one in production.