py2neo 2.0.4 remote connection refused - py2neo

looked into related questions and answers and can't find a solution for the 'connection refused' when trying to use py2neo 2.0.4.
Here the ipython session (python '2.7.5 (default, Mar 9 2014, 22:15:05) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]')
[1]: from py2neo import Graph, watch
[2]: watch('httpstream')
[3]: g = Graph('http://odroid:7474/db/data')
[4]: g.cypher.execute('match (y:Year) return y')
GET http://odroid:7474/db/data/
200 OK [699]
GET http://odroid:7474/
200 OK [94]
POST http://odroid:7474/db/data/transaction/commit [102]
200 OK [chunked]
GET http://0.0.0.0:7474/
! SocketError: Connection refused
The installed bin/cypher also fails.
Same on odroid (odroid-c1 arm quad core) works fine (even with the same url).
Other methods g.create(Node... ) work fine.

This doesn't look like correct behaviour and there's nothing obvious wrong with your code.
I'm not sure which version of Neo4j server you're using but you could try narrowing down the issue to either a problem in the driver or a problem in the server by using cURL against the REST interface directly. Complex network configurations (e.g. using a proxy) can also contribute to unexpected behaviours like this. Depending on your setup, you may want to try to eliminate that too.
If you can narrow this down to either a py2neo or Neo4j problem then your best bet is to raise an issue on the corresponding project on GitHub.

Related

Neo4j-enterprise does not allow deletions

I have been having this error for a while:
The environment I am using is:
Neo4j-enterprise 4.1.0 (AWS Ami ami-02a68ff704cf9a737)
I am trying to do a DETACH DELETE for cleaning up some nodes and I keep getting this error:
Neo4jError: Writing in reading access mode not allowed. Attempted to write to internal graph 0 (neo4j)
I have tried several things:
set flag dbms.read_only=false
create new users with permissions.
Signup for the startup program of neo4j with the same email I am using in AWS.
At this point, I am quite lost. I have to check many resources but I do not find the reason of this error.
Do you have any clue about this problem?
Thanks in advance!
I discovered the problem. It was nothing related to the Neo4j setup or with the configuration.
The problem is produced by an ORM I am using in JavaScript, Neode. I was using the function query, and it seems for some reason I had to use writeCypher after version 4.1.0 of Neo4j.

How to configure Bolt browser to avoid error, "Failed to construct 'WebSocket': The URL 'ws://:7687' is invalid."

Using Neo4j 3.3.0, which just self-upgraded tonight and suddenly the Bolt browser is giving the error:
"Failed to construct 'WebSocket': The URL 'ws://:7687' is invalid."
when I do a simple test command of:
MATCH(n:Node) return n
It was working perfectly for weeks and I can't get back in as a result. I am using Flask and py2neo as well, but the problem manifests in the Bolt browser.
Was there a config that was overwritten?
I faced the same issue. The issue seems to be only with the neo4j browser.
Open up your browser of choice .
go to http://localhost:7474/browser/
it works fine there. Possibly go through this for the reason https://github.com/neo4j/neo4j/wiki/Neo4j-3.4-changelog
I hope they fix this soon.

(409 Conflict) in response to MKACTIVITY

We have been having an issue for months now and I cannot find a possible solution.
We have a server X that hosts a webapp. This webapp, among other things, deals with a svn repository hosted in server Y. This server (repository) is reached using WeBDAV through http://Y/svn/repository
The issue is that sometimes and totally random I get following error when trying to create a new folder in the repository or commit a file (it fails basically in operations that require to commit something):
Svn::Error::RaDavRequestFailed: Server sent unexpected return value (409 Conflict) in response to MKACTIVITY request for '/svn/repository/certainPath';
There is another service S that makes requests to the webapp and causes the svn operations and I can tell that this service uses multiple threads (which I believe is somehow causing the problem but not sure about that).
I have searched all over the place but didn't really find anything useful. I know from another friend that they have that issue too and upgrading to svn 1.7 fixed the issue. In my case upgrading to a newer version is not that simple so I prefer to fix the issue and, of course, finally understand what the hell is going on!
Thanks!
Details:
Server X and Y have Snow Leopard
svn version in X is 1.6.17 (r1128011)
apache version in Y I don't know (no access)

How do I use HTTPS replication with iOS Couchbase Mobile?

I'm using iOS Couchbase Mobile to have a couchdb server on an iPad that uses replication to sync with a server on https://cloudant.com. cloudant uses HTTPS, and when I try replicating on the iPad, i just get spammed by errors.
This is a known issue, as seen on this FAQ article. It recommends using 1.0.2 to fix the issue, but how do i know if I'm running it on Erlang R14?
Version Info
On myserver.cloudant.com: {"couchdb":"Welcome","version":"1.0.2","cloudant_build":"1.3.49"}
On iOS Couchbase Mobile: {"couchdb":"Welcome","version":"2.0.0-beta"}
(For some reason it says I'm using 2.0.0-beta on iOS, even though I downloaded this version (2.0.1).)
Here's the kind of error that I get:
[info] [<0.327.0>] Retrying HEAD request to https://user:password#mycompany.cloudant.com/mydb/ in 16.0 seconds due to error {'EXIT',
{no_ssl_server,
{gen_server,call,
[<0.347.0>,
{send_req,
{{url,
"https://user:password#mycompany.cloudant.com/mydb/",
"mycompany.cloudant.com",443,"mycompany","password",
"/mydb/",https,hostname},
[{"Accept","application/json"},
{"User-Agent","CouchDB/2.0.0-beta"}],
head,<<>>,
[{response_format,binary},
{inactivity_timeout,30000},
{is_ssl,true},
{socket_options,[{keepalive,true},{nodelay,false}]},
{ssl_options,[{depth,3},{verify,verify_none}]}],
infinity}},
infinity]}}}
The issue of enabling https connection between CouchBase Mobile for iOS and another CouchDB/CouchBase instance is also discussed here: https://groups.google.com/d/msg/mobile-couchbase/DDHSisVWEyo/hxtlVRhQtwkJ
Apparently it can be done.
I've found a "nightly build" that enables SSL support in CouchBase Mobile for iOS, but it was never QA'd and it never got released in a "stable build". I have contacted someone who was working on Couchbase Mobile for iOS, and he told me that I should use TouchDB instead.
CouchDB provides information on current Erlang version in it's Server response header, like this:
HTTP/1.1 200 OK
Server: CouchDB/1.0.1 (Erlang OTP/R13B) <----------------------
Date: Fri, 05 Nov 2010 14:57:16 GMT
Content-Type: text/plain;charset=utf-8
Since error message says it can't find HTTPS server, you probably want to check it via plain HTTP.
BTW CouchDB and CouchBase are completely different database products (both use Erlang platform) and it seems like you are using them interchangeably. Maybe the problem is that you are trying to connect to CouchDB with CouchBase client or something like that?

hdf viewer on windows for tables created using pyTables?

viTables only seems to work with python 2.5. I have downloaded HDFView, but when I try to open a table I created following this tutorial, I get the following error message:
Failed to open file C:\tutorial.h5
java.io.IOException: Unsupported fileformat - C:\tutorial.h5
Any ideas for getting HDFView to work?
Is there something I need to do when I'm using pyTables from python to make the format more generic?
Any other good HDF viewers?
Btw, I've just discovered PyTables, and I'm really excited about it.
ViTables works for me with python 2.6 on windows. It is supposed also to work with 2.7.
However the version on the official site did not work for me and crashed. In a mailinglist posting I found the link to the berlios ftp server where I got a version that works like a charm.
Have you seen ViTables?
http://vitables.berlios.de/

Resources