Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Connection to GrapheneDB cloud db gives "Error receiving data" #26

Open
sfdreverman opened this issue Nov 10, 2017 · 6 comments
Open

Connection to GrapheneDB cloud db gives "Error receiving data" #26

sfdreverman opened this issue Nov 10, 2017 · 6 comments

Comments

@sfdreverman
Copy link

As a test, I've recently created a graphenedb instance in the cloud.

I've filled in the remote connection strings in the config.yml and then I get an "Error receiving data", with no clue what is going wrong.
The scheme, host and port are correct because if I change them, they give a different error. Which is good. The other values (username and pwd), are correct imo. (and with locally configured db, the app works fine.)

Changing the user or password (to incorrect values) results in the same error. (!)

  1. How can I pinpoint what part of the connection config causes the error?

Reading the graphenedb PHP guide, it appears to need a TLS required setting.
2. How do I set this/check if this is set?

@ikwattro
Copy link
Member

@sfdreverman
Copy link
Author

Actually, yes and no. It does because I found out about the TLS support. It also doesn't since I'm using the wrapper for symfony, which hides the ClienBuilder stuff. I just call a GetClient which creates/retrieves the connection. I've posted this on https://github.com/neo4j-contrib/neo4j-symfony and they told me to ask here... 😕

@ikwattro
Copy link
Member

Allright, I will check that on the symfony wrapper side. Thanks.

cc @Nyholm

@sfdreverman
Copy link
Author

Hi @ikwattro and @Nyholm ,curious: is there any progress on this issue? Thanks!

@EtienneSchmitz
Copy link

Hello @sfdreverman,
I have the same problem that you.
Have you found a solution ?

Otherwise, I found one thanks to the readme.
There she is :

$config = \GraphAware\Bolt\Configuration::newInstance()
            ->withCredentials('username, 'password)
            ->withTLSMode(\GraphAware\Bolt\Configuration::TLSMODE_REQUIRED);
$driver = \GraphAware\Bolt\GraphDatabase::driver('adress', $config);
$session = $driver->session();
// After that you can do $session->run('your query') that usual.

It is not pratical and it does not use the Symfony bundle but it works.

@sfdreverman
Copy link
Author

sfdreverman commented Aug 29, 2018

I had found a solution yes... but it was much less clean than yours. I looked up the $config definition in the graphaware bundle and changed it to TLSMODE_REQUIRED. Yours is much better, because now you can switch between cloud and local when developing locally or deploying for production. Thanks!

(btw I also spend 5 minutes trying to make it configurable through the GetClient call, but my php knowledge is way to shallow to do that. I'm just an architect developing some proof-of-concepts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants