Skip to content

Inconsistent responses to /connect API #1030

@thisisambros

Description

@thisisambros

Description

Responses to the API '/connect' are not reliable, most time it returns :
400 BAD REQUEST { "error": "The form field 'uri' was malformed:\nSubstream Source cannot be materialized more than once" }

All the performed request are equal.

Expected behaviour

  • 200 OK "connected" at the first time it is called
  • 200 OK "already connected" all the following times

Actual behaviour

The first call of the API once the node is started is consistent: it returns "connected".
The following calls response are inconsistent, some undetected internal behaviour makes them vary between:

  • 200 OK "already connected" all the following times
  • 400 BAD REQUEST { "error": "The form field 'uri' was malformed:\nSubstream Source cannot be materialized more than once"}

How to reproduce

The issue can be reproduced simulating multiple calls to the connect API. I attach the postman and the CURL version I used during my tests.
(The basic token matches )

curl -u :changeit -X POST -F uri=02acb5b3bdf46d3a35e665c9abe46def12c341f55d603853ddeb1371076cab5c57@68.183.221.146:49735 localhost:8080/connect

(My apologies to the guy running this node)

Eclair Version and environment

Eclair 2.11 Self-compiled from Github Master branch using:

  • Scala 2.12.8
  • Java 11, openjdk 11.0.2 2019-01-15
  • MacOs 10.14.5

Extra information:

It looks like that if the call is not performed for more than 1 minutes, the following call will return the correct message "already connected".

Eclair.log does not contain any line regarding this connection and nothing is printed once an API call is performed.

eclair.conf:

eclair.bitcoind.rpcuser="foo" eclair.bitcoind.rpcpassword="bar" eclair.bitcoind.rpcport="34897" eclair.bitcoind.host="127.0.0.1" eclair.chain="testnet" eclair.api.enabled=true eclair.api.password="changeit"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions