chainpoint / chainpoint-gateway

Chainpoint Gateway
https://chainpoint.org
Apache License 2.0
27 stars 12 forks source link

Lightning node information for my Gateway NOT found at http://<gateway_ip>/config #51

Closed jo2h2 closed 3 years ago

jo2h2 commented 3 years ago

Hello everyone,

maybe someone can give me a good hint as I am lost - I followed https://github.com/chainpoint/chainpoint-gateway to setup a chainpoint gateway and I was successful up to the point where I need to run "make deploy" (see parallel issue https://github.com/chainpoint/chainpoint-gateway/issues/50).

But my real problem is that running http:///config against my installation is returning a "Not Found" - it seems that the "Gateway Public API" is not available at all in my installation or not accessible ?! I am trying it with https://8080/config - without success. And other parameters are not working as well ...

Any idea what I am doing wrong ? Do I need to install another package ? Or do I need to configure something ?

I can share IP / server name in a private message if needed :-).

Thanks a lot !

Best wishes, Jo ...

jacohend commented 3 years ago

Please check docker service logs -f chainpoint-gateway_chainpoint-gateway --raw to ensure that the gateway initialized properly. If it did, it will be accessible on port 80 instead of 8080.

Please note that you should only run a gateway if you need to submit hashes to bitcoin and retrieve the corresponding chainpoint proof of inclusion.

jo2h2 commented 3 years ago

@jacohend - thanks for your quick reply Jacob !

I checked as requested:

chainpointuser@chainpoint-gateway:~/chainpoint-gateway$ docker service logs -f chainpoint-gateway_chainpoint-gateway --raw
yarn run v1.16.0
$ node server.js
2021-02-12T07:30:37.202Z [info] App : Startup : Version 1.0.1
2021-02-12T07:30:37.204Z [info] App : Startup : Network : mainnet
2021-02-12T07:30:38.301Z [warn] Unable to connect to Cores with a different network setting. This Node is set to 'mainnet'
2021-02-12T07:30:38.302Z [error] App : Startup : Unable to connect to 2 Core(s) as required
Done in 1.91s.

So - it seems that gateway is not properly started ?!

How can I cleanly restart the gateway or what can I do to force that it tries to reconnect ? Or what can I check why the gateway is not starting ?

FYI I have defined a Security Group with following settings - is there any other port or protocol that I need to open ?

And yes - I am setting up the gateway to submit hashes :-).

Thanks and best wishes, Jo ...

jacohend commented 3 years ago

It looks like maybe you're connecting to testnet cores on mainnet. Be sure that the .env file has an entry that looks like this: CHAINPOINT_CORE_CONNECT_IP_LIST=18.224.43.241,3.22.27.129 Then run make stop && sleep 20 && make deploy

jo2h2 commented 3 years ago

This was a good hint !

Changing .env and make ... as suggested produces (but I am not sure why wrong IP list was used as I definitely used mainnet in my selection !?):

}
OperationalError: 2 UNKNOWN: not enough witness outputs to create funding transaction, need 0.0012 BTC only have 0 BTC  available
    at Object.exports.createStatusError (/home/node/app/node_modules/grpc/src/common.js:91:15)
    at Object.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:1209:28)
    at InterceptingListener._callNext (/home/node/app/node_modules/grpc/src/client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:618:8)
    at callback (/home/node/app/node_modules/grpc/src/client_interceptors.js:847:24) {
  cause: Error: 2 UNKNOWN: not enough witness outputs to create funding transaction, need 0.0012 BTC only have 0 BTC  available
      at Object.exports.createStatusError (/home/node/app/node_modules/grpc/src/common.js:91:15)
      at Object.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:1209:28)
      at InterceptingListener._callNext (/home/node/app/node_modules/grpc/src/client_interceptors.js:568:42)
      at InterceptingListener.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:618:8)
      at callback (/home/node/app/node_modules/grpc/src/client_interceptors.js:847:24) {
    code: 2,
    metadata: Metadata { _internal_repr: {}, flags: 0 },
    details: 'not enough witness outputs to create funding ' +
      'transaction, need 0.0012 BTC only have 0 BTC  ' +
      'available'
  },
  isOperational: true,
  code: 2,
  metadata: Metadata { _internal_repr: {}, flags: 0 },
  details: 'not enough witness outputs to create funding ' +
    'transaction, need 0.0012 BTC only have 0 BTC  ' +
    'available'
}
Unable to create a channel with 02b22bde1bec750e01a14f274176af171b218580fb4c4edd859f1276bc5a2ece3f@18.224.43.241:9735 : 2 UNKNOWN: not enough witness outputs to create funding transaction, need 0.0012 BTC only have 0 BTC  available
open peer or channel failed: Unable to create a channel with 02b22bde1bec750e01a14f274176af171b218580fb4c4edd859f1276bc5a2ece3f@18.224.43.241:9735 : 2 UNKNOWN: not enough witness outputs to create funding transaction, need 0.0012 BTC only have 0 BTC  available

*****************************************
Your lightning node is fully synced.
*****************************************
Channel to 03cf279716f127a51d3ef345fb0329493696fd3df2ae402d6c58208adb62ec1962 is pending and may require up to 6 confirmations (~60 minutes) to fully open
OperationalError: 2 UNKNOWN: not enough witness outputs to create funding transaction, need 0.0012 BTC only have 0 BTC  available
    at Object.exports.createStatusError (/home/node/app/node_modules/grpc/src/common.js:91:15)
    at Object.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:1209:28)
    at InterceptingListener._callNext (/home/node/app/node_modules/grpc/src/client_interceptors.js:568:42)
    at InterceptingListener.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:618:8)
    at callback (/home/node/app/node_modules/grpc/src/client_interceptors.js:847:24) {
  cause: Error: 2 UNKNOWN: not enough witness outputs to create funding transaction, need 0.0012 BTC only have 0 BTC  available
      at Object.exports.createStatusError (/home/node/app/node_modules/grpc/src/common.js:91:15)
      at Object.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:1209:28)
      at InterceptingListener._callNext (/home/node/app/node_modules/grpc/src/client_interceptors.js:568:42)
      at InterceptingListener.onReceiveStatus (/home/node/app/node_modules/grpc/src/client_interceptors.js:618:8)
      at callback (/home/node/app/node_modules/grpc/src/client_interceptors.js:847:24) {
    code: 2,
    metadata: Metadata { _internal_repr: {}, flags: 0 },
    details: 'not enough witness outputs to create funding ' +
      'transaction, need 0.0012 BTC only have 0 BTC  ' +
      'available'
  },
  isOperational: true,
  code: 2,
  metadata: Metadata { _internal_repr: {}, flags: 0 },
  details: 'not enough witness outputs to create funding ' +
    'transaction, need 0.0012 BTC only have 0 BTC  ' +
    'available'
}

So I assume I need to wait for these 60 minutes ?

Or might it be that the transfer I did last night went against testnet wallet ? Or is my wallet independent from mainnet or testnet ?

And - http:///config is still not working ? Simply waiting for full sync ? But log states "Your lightning node is fully synced" ... ?!

Thanks and best wishes, Jo ...

jacohend commented 3 years ago

You'd need to wait for confirmation.

Do you have the transaction id of the transfer? You can check its status on any online block explorer.

jo2h2 commented 3 years ago

Thanks a lot Jacob - after waiting and filling up missing BTC it now works perfectly !

Thank you so much for your good hints !