How to connect to Neo4j from a web browser - neo4j

I am just getting started with Neo4j and when I try to run a command that connects to the database I get an error. For example, if I try to run the first CREATE command from the sample movie database, or if I run CALL dbms.procedures().
The error is as follows: BoltConnectionError: No connection found, did you connect to Neo4j?
In the left panel of the browser page, under the 'Connected As' heading, it has my username and role (Admin). FYI, I followed the setup procedure from Larave's Homestead to install Neo4j in the first instance. On my first visit to the URL (port 7474), it asked for (and accepted) my username and password.
Additional Info:
Neo4j database is version 3.3.5 and runs on a Ubuntu VM
Neo4j browser is ver 3.1.7 and runs on the mac host
When I run :server connect it tells me I am connected via bolt://mydomain:7687
When I run lsof -i :7474 on the Ubuntu machine it tells me that Java is listening to the port, and that user is neo4j

First
:server disconnect
And then connect again
:server connect
If it doesn't work, change your browser.

Related

How can I get neo4j to connect to local demo?

I have neo4j installed (& the conf file says that authentication is off.)
I start the movie demo --- and am told to connect to the server.
When I type
:server connect
with No Authentication
the browser tells me that there is a graph waiting for me but then gives the message "Unable to extract host form undefined."
If you simply want to run the movie demo, you might prefer to use the free Neo4j sandbox rather than Neo4j Desktop. It runs in a web browser and there is nothing to install.
https://sandbox.neo4j.com/
If you prefer to use Neo4j Desktop, confirm that your database has started.
https://www.markhneedham.com/blog/2018/03/20/neo4j-undefined-unable-to-extract-host-from-undefined/

how to connect to bolt with cypher-shell not on localhost

Really want to connect to bolt from an spark slave also but figured if I can get it working with cypher-shell the rest will fall into place. So I can do this:
cypher-shell -a localhost
Connects fine
if I do this on the box which is the actual ip:
cypher-shell -a 172.20.0.71:7687
Get a connection refused, I thought all I had to do was in the conf do:
dbms.connector.bolt.address=0.0.0.0:7687
That didn't seem to work is there something else I am missing?
(Or at least the above didn't seem to work I did restart my neo4j instance so it should of picked up the changes to conf). Connecting just with defaults on cypher-shell does give this still though:
Connected to Neo4j 3.3.0 at bolt://localhost:7687 as user neo4j.
Type :help for a list of available commands or :exit to exit the shell.
Note that Cypher queries must end with a semicolon.
So maybe it didn't fully restart and pick up the changes to the neo4j.conf ? Or more likely I am missing something else to get this to work as I think it should. Where I can connect from another ip or locally to bolt via the actual ip address?
You need to uncomment this in your neo4j.conf :
dbms.connectors.default_listen_address=0.0.0.0
Restart the server, and then with cypher-shell :
cypher-shell -a bolt://172.20.0.71:7687

Neo4j remote access from windows using putty

I installed Neo4j 3.2.6 on Ubuntu 16.04 and I tried to access it remotely using putty (from my windows-based computers). Without uncommenting anything in neo4j.conf, I can access Neo4j using the source port I defined in putty. Then, after connecting with the initial password "Neo4j" in the section saying "Connect to Neo4j Database access requires an authenticated connection.", I gets the famous error "ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine ...".
So, after googling, I uncommented:
dbms.connectors.default_listen_address=0.0.0.0
dbms.connector.bolt.listen_address=:7687
BUT NOTHING WORKS.
The interesting thing is that I tried to install Neo4j on my laptop (locally) and it worked and when I used its "bolt://..." database access password on my remote access "bolt://..." database access it works.So, I'm not sure what is going on here, can someone help?

Can't connect to a firebird server on docker

I'm a macOS user and I got weird errors just to create a database with firebird. I saw that there are some dock containers with firebird that run just fine ( i was able to create databases, perform queries and so on) but when I tried to connect from my local ISQL or razorSQL client ( through JDBC), I get some weird errors like "unavailable database" or "can't open file"
I'm also not sure how ISQL CONNECT string really works because every site I saw there is a different one.
I got this docker image: ( https://hub.docker.com/r/jacobalberty/firebird/)
I created my container like this:
docker run -d --name firebird -p 3050:3050 -v /data/firebird/databases:/databases jacobalberty/firebird:2.5-ss
my docker-machine IP is:
192.168.99.100
I tried to connect like this:
CONNECT '0.0.0.0:3050://databases/test.fdb' user 'SYSDBA' password 'masterkey';
unavailable database
And also like this:
CONNECT '192.168.99.100:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
connection rejected by remote interface
CONNECT '192.168.99.100:3050:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
Statement failed, SQLSTATE = 08001
unavailable database
When i enter the docker container, the file is there:
root#e4212b9f9d16:/databases# pwd
/databases
root#e4212b9f9d16:/databases# ls
test.fdb
Also, I'm not sure how to check if the firebird server is running ( i guess it is cause I can 'connect' to a database inside the container'.. but the docker container is definally up and running - did a successful telnet on the ip and port)
I also tried to use the container IP (172.17.0.2) but i got a timeout
Im most familiar with mysql and SQLite never touched a firebird db before and as the user got this DB, i have to mock it, develop an app using fake data and then connect it to the real firebird (so changing the DB is not an option)
So, the standard documentation about 'create your firebird server' don't mention but you on firebird.conf, the variable RemoteBindAddress must be empty
File:
/etc/firebird/2.5/firebird.conf
Lines changed:
RemoteBindAddress =
#RemoteBindAddress = localhost
Thanks for all the
Most of your problems are your connection string, it should be <host>/<port>:<database-path-or-alias>, where leaving of /<port> will default to port 3050.
This accounts for all your problems except for
CONNECT '192.168.99.100:/databases/test.fdb' user 'SYSDBA' password 'masterkey';
connection rejected by remote interface
As that connection string is a valid one.
This error means that you were able to connect to the server, but the connection was rejected. This might - for example - happen when you use Firebird 3, but connect using a Firebird 2.5 ISQL/fbclient library, and haven't relaxed the security settings of Firebird 3 (see Legacy Authentication in the Firebird 3 release notes).
In order to find out if the server is running, use:
docker ps
In order to figure out if the server actually started, or errored out upon start, start the container without the -d and look at the log messages when it runs:
docker run --name firebird -p 3050:3050 -v /data/firebird/databases:/databases jacobalberty/firebird:2.5-ss

Neo4j 3.0 setup issues

With neo4j 2.3.x community edition I use to set the ip address to local host and change the port to allow multiple instances for development.
#org.neo4j.server.webserver.address=0.0.0.0
org.neo4j.server.webserver.port=7384
Upon starting the instance, I use to have a confirmation message with ip and port.
Starting Neo4j Server...WARNING: not changing user
process [28531]... waiting for server to be ready........ OK.
http://localhost:7384/ is ready.
I would then upload data using a shell script and cypher commands.
$neo/bin/neo4j-shell -path $neo/data/graph.db -file upload.cypher
With neo4j 3.0, the server setup slightly changed. I turned on HTTP connection, CSV import, and shell connection.
dbms.connector.http.enabled=true
dbms.connector.http.address=localhost:7384
dbms.shell.enabled=true
# dbms.shell.host=127.0.0.1
dbms.shell.port=1387
When I start the instance, I get the following message in which the port is not correct.
Starting Neo4j.
Started neo4j (pid 28718). By default, it is available at http://localhost:7474/
There may be a short delay until the server is ready.
Uploading data with the same shell script as for neo4j-2.3.x works well, no error message and I can see the data using neo4j-shell.
./neo4j-3.0.0/bin/neo4j-shell -path neo4j-3.0.0/data/graph.db
However, when I connect using host and port instead, I see no data. Furthermore, when I connect using the web interface, I see no data either.
./neo4j-3.0.0/bin/neo4j-shell -host localhost -port 1387
Is there anything wrong in my database setup?
Thanks!
In 3.0 the location of the datastore has changed. 2.x used data/graph.db, in 3.0 it's by default in data/databases/graph.db. So you want to change your setup script to:
./neo4j-3.0.0/bin/neo4j-shell -path neo4j-3.0.0/data/databases/graph.db

Resources