graphjs / graphjs-server

Server-side components of GraphJS at https://github.com/phonetworks/graphjs
https://graphjs.com
MIT License
47 stars 25 forks source link

.env questions and run error #80

Open j2l opened 4 years ago

j2l commented 4 years ago

Hello again,

This is a brilliant project but hard to install :) OK, I think I'm getting to the end of the install.

My neo4j comes without password. When I change .env to INDEX_URI="bolt://localhost:7474" and php7.3 run it, I get:

calculating headers:
PhoNetworksAutogenerated\User
[2020-05-10 17:46:47] default.INFO: Services set up. Root seed begins. [] []
[2020-05-10 17:46:47] default.INFO: Creating a new graph from scratch [] []
[2020-05-10 17:46:47] default.INFO: Touching 4ebb3e6f791490f4a3a0eaf7dd900851 [] []
[2020-05-10 17:46:47] default.INFO: About to serialize the node  4ebb3e6f791490f4a3a0eaf7dd900851, a user [] []
[2020-05-10 17:46:47] default.INFO: Indexing 4ebb3e6f791490f4a3a0eaf7dd900851 [] []
[2020-05-10 17:46:47] default.INFO: Index request received by 4ebb3e6f791490f4a3a0eaf7dd900851, a user. [] []
[2020-05-10 17:46:47] default.INFO: The query will be as follows; MERGE (n:user {udid: {udid}}) SET n = {data} with data  [][]
PHP Fatal error:  Uncaught InvalidArgumentException: No session registered supporting Version 1213486160 in /opt/graphjs-server/vendor/graphaware/neo4j-bolt/src/Protocol/SessionRegistry.php:88
Stack trace:
#0 /opt/graphjs-server/vendor/graphaware/neo4j-bolt/src/Driver.php(118): GraphAware\Bolt\Protocol\SessionRegistry->getSession(1213486160, Array)
#1 /opt/graphjs-server/vendor/graphaware/neo4j-php-client/src/Connection/Connection.php(192): GraphAware\Bolt\Driver->session()
#2 /opt/graphjs-server/vendor/graphaware/neo4j-php-client/src/Connection/Connection.php(109): GraphAware\Neo4j\Client\Connection\Connection->checkSession()
#3 /opt/graphjs-server/vendor/graphaware/neo4j-php-client/src/Client.php(67): GraphAware\Neo4j\Client\Connection\Connection->run('MERGE (n:user {...', Array, NULL)
#4 /opt/graphjs-server/vendor/pho-adapters/index-neo4j/Neo4j.php(165): GraphAware\Neo4j\Client\Client->run('MERGE (n:user {...', Array)
#5 /opt/graphjs-server/vendor/pho-adapters/index-neo4j/Neo4j.php(134): Pho\Kernel\Services\Index\Adapters\N in /opt/graphjs-server/vendor/graphaware/neo4j-bolt/src/Protocol/SessionRegistry.php on line 88
'/opt/graphjs-server/vendor/pho-adapters/index-neo4j/QueryResult.php''/opt/graphjs-server/vendor/pho-recipes/web/.compiled/User.php'Logger is not available yet

and when I try using pho.phar with generated .env file, I get:

PHP Fatal error:  Uncaught GraphAware\Bolt\Exception\HandshakeException: Handshake Exception. Unable to negotiate a version to use. Proposed versions were [1,0,0,0] in /opt/graphjs-server/graphjs/vendor/graphaware/neo4j-bolt/src/Driver.php:165
Stack trace:
#0 /opt/graphjs-server/graphjs/vendor/graphaware/neo4j-bolt/src/Driver.php(151): GraphAware\Bolt\Driver->throwHandshakeException('Handshake Excep...')
#1 /opt/graphjs-server/graphjs/vendor/graphaware/neo4j-bolt/src/Driver.php(115): GraphAware\Bolt\Driver->handshake()
#2 /opt/graphjs-server/graphjs/vendor/graphaware/neo4j-php-client/src/Connection/Connection.php(192): GraphAware\Bolt\Driver->session()
#3 /opt/graphjs-server/graphjs/vendor/graphaware/neo4j-php-client/src/Connection/Connection.php(109): GraphAware\Neo4j\Client\Connection\Connection->checkSession()
#4 /opt/graphjs-server/graphjs/vendor/graphaware/neo4j-php-client/src/Client.php(67): GraphAware\Neo4j\Client\Connection\Connection->run('MERGE (n:user {...', Array, NULL)
#5 /opt/graphjs-server/graphjs/vendor/pho-ada in /opt/graphjs-server/graphjs/vendor/graphaware/neo4j-bolt/src/Driver.php on line 165

Redis and Neo4J are running but I don't know them enough to know how to configure them.

Bonus question: how to install php eio extension on ubuntu and why?

Thanks!

j2l commented 4 years ago

Hello, Can you help me on making it work? Thank you :smile:

esokullu commented 4 years ago

You must set up a password on Neo4J See:

j2l commented 4 years ago

OK, my bad. thank you. I'll try that.

esokullu commented 4 years ago

Great, let us know how it works for you.

j2l commented 4 years ago

Thank you @esokullu The password went through!

But now at php7.3 run.php I get (full message below):

calculating headers:
PhoNetworksAutogenerated\User
[2020-06-14 19:32:19] default.INFO: Services set up. Root seed begins. [] []
[2020-06-14 19:32:19] default.INFO: Creating a new graph from scratch [] []
[2020-06-14 19:32:19] default.INFO: Touching 4c2ca3d108156c6d979ed3510fd3f5c3 [] []
[2020-06-14 19:32:19] default.INFO: About to serialize the node  4c2ca3d108156c6d979ed3510fd3f5c3, a user [] []
[2020-06-14 19:32:19] default.INFO: Indexing 4c2ca3d108156c6d979ed3510fd3f5c3 [] []
[2020-06-14 19:32:19] default.INFO: Index request received by 4c2ca3d108156c6d979ed3510fd3f5c3, a user. [] []
[2020-06-14 19:32:19] default.INFO: The query will be as follows; MERGE (n:user {udid: {udid}}) SET n = {data} with data  [] []
PHP Fatal error:  Uncaught GraphAware\Bolt\Exception\HandshakeException: Handshake Exception. Unable to negotiate a version to use. Proposed versions were [1,0,0,0] in /opt/graphjs-server/vendor/graphaware/neo4j-bolt/src/Driver.php:165
Stack trace:
#0 /opt/graphjs-server/vendor/graphaware/neo4j-bolt/src/Driver.php(151): GraphAware\Bolt\Driver->throwHandshakeException('Handshake Excep...')
#1 /opt/graphjs-server/vendor/graphaware/neo4j-bolt/src/Driver.php(115): GraphAware\Bolt\Driver->handshake()
#2 /opt/graphjs-server/vendor/graphaware/neo4j-php-client/src/Connection/Connection.php(192): GraphAware\Bolt\Driver->session()
#3 /opt/graphjs-server/vendor/graphaware/neo4j-php-client/src/Connection/Connection.php(109): GraphAware\Neo4j\Client\Connection\Connection->checkSession()
#4 /opt/graphjs-server/vendor/graphaware/neo4j-php-client/src/Client.php(67): GraphAware\Neo4j\Client\Connection\Connection->run('MERGE (n:user {...', Array, NULL)
#5 /opt/graphjs-server/vendor/pho-adapters/index-neo4j/Neo4j.php(165): GraphAware\Neo4j\Clien in /opt/graphjs-server/vendor/graphaware/neo4j-bolt/src/Driver.php on line 165
'/opt/graphjs-server/vendor/pho-adapters/index-neo4j/QueryResult.php''/opt/graphjs-server/vendor/pho-recipes/web/.compiled/User.php'Logger is not available yet

I dont get what is wrong.