Closed Taratay closed 5 years ago
Can you please post the output of lncli listchannels
for the channel you are trying to close? It looks like your channel.db
file doesn't know about the channel (judging from the error message).
@guggero here is the output
{ "channels": [ { "active": false, "remote_pubkey": "3021c5f5f57322740e4ee6936452add19dc7ea7ccf90635f95119ab82a62ae268", "channel_point": "3cd818c64bb6dcb7f08f2f3e1b094f642a9074b92ecf3c30bd9fa24f980c4128:1", "chan_id": "640300596543029249", "capacity": "4500000", "local_balance": "4477924", "remote_balance": "0", "commit_fee": "22076", "commit_weight": "600", "fee_per_kw": "30493", "unsettled_balance": "0", "total_satoshis_sent": "0", "total_satoshis_received": "0", "num_updates": "4", "pending_htlcs": [ ], "csv_delay": 540, "private": false, "initiator": true } ] }
Thanks, @Taratay! Ok, it looks like that funding TX is still unspent, so you should be able to close the channel. Can you please try the following steps and see if you can force-close after that?
.lnd
folder (just in case)@guggero Thanks for reply, okay I will try that.
I got trouble when installing update of lnd
Here is output
GO111MODULE=on go build -v -tags="dev" -o lnd-debug -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.8.0-beta-67-g1a0ab538d53c5be57cbbf80b0e48e5a207de9749" github.com/lightningnetwork/lnd/cmd/lnd go: disabling cache (/home/btcuser/.cache/go-build) due to initialization failure: open /home/btcuser/.cache/go-build/log.txt: permission denied github.com/jessevdk/go-flags github.com/btcsuite/btcd/btcec github.com/btcsuite/btcd/chaincfg/chainhash github.com/btcsuite/btcd/wire github.com/btcsuite/btcd/chaincfg github.com/btcsuite/btclog github.com/btcsuite/btcutil/base58 github.com/btcsuite/btcutil/bech32 golang.org/x/crypto/ripemd160 github.com/btcsuite/btcutil github.com/btcsuite/btcd/database github.com/btcsuite/btcd/txscript github.com/btcsuite/btcd/blockchain github.com/btcsuite/btcd/connmgr github.com/btcsuite/btcd/btcjson github.com/btcsuite/go-socks/socks github.com/btcsuite/websocket github.com/btcsuite/btcd/rpcclient github.com/aead/siphash github.com/kkdai/bstream github.com/btcsuite/btcutil/gcs github.com/btcsuite/btcutil/gcs/builder github.com/btcsuite/btcutil/hdkeychain github.com/btcsuite/btcwallet/internal/zero github.com/btcsuite/golangcrypto/poly1305 github.com/btcsuite/golangcrypto/salsa20/salsa github.com/btcsuite/golangcrypto/nacl/secretbox github.com/btcsuite/golangcrypto/pbkdf2 github.com/btcsuite/golangcrypto/scrypt github.com/btcsuite/btcwallet/snacl github.com/btcsuite/btcwallet/walletdb github.com/btcsuite/btcwallet/walletdb/migration github.com/btcsuite/btcwallet/waddrmgr github.com/btcsuite/btcwallet/wtxmgr github.com/lightninglabs/gozmq github.com/btcsuite/btcd/addrmgr github.com/davecgh/go-spew/spew github.com/btcsuite/btcd/peer github.com/lightninglabs/neutrino/cache github.com/lightninglabs/neutrino/cache/lru github.com/lightninglabs/neutrino/filterdb github.com/lightninglabs/neutrino/headerfs github.com/lightninglabs/neutrino/headerlist github.com/lightninglabs/neutrino github.com/btcsuite/btcwallet/chain github.com/btcsuite/btcwallet/internal/legacy/rename github.com/btcsuite/btcwallet/internal/legacy/keystore github.com/btcsuite/golangcrypto/ssh/terminal github.com/btcsuite/btcwallet/internal/prompt github.com/btcsuite/btcwallet/internal/helpers github.com/btcsuite/btcwallet/wallet/internal/txsizes github.com/btcsuite/btcwallet/wallet/txrules github.com/btcsuite/btcwallet/wallet/txauthor github.com/btcsuite/btcwallet/wallet github.com/coreos/bbolt github.com/go-errors/errors golang.org/x/net/internal/timeseries golang.org/x/net/trace google.golang.org/grpc/backoff google.golang.org/grpc/grpclog google.golang.org/grpc/connectivity github.com/golang/protobuf/proto google.golang.org/grpc/credentials/internal google.golang.org/grpc/internal google.golang.org/grpc/credentials google.golang.org/grpc/metadata google.golang.org/grpc/serviceconfig google.golang.org/grpc/resolver google.golang.org/grpc/balancer google.golang.org/grpc/balancer/base google.golang.org/grpc/internal/grpcrand google.golang.org/grpc/balancer/roundrobin google.golang.org/grpc/codes google.golang.org/grpc/encoding google.golang.org/grpc/encoding/proto google.golang.org/grpc/internal/backoff google.golang.org/grpc/internal/balancerload github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes google.golang.org/grpc/binarylog/grpc_binarylog_v1 google.golang.org/genproto/googleapis/rpc/status google.golang.org/grpc/status google.golang.org/grpc/internal/binarylog golang.org/x/sys/unix google.golang.org/grpc/internal/channelz google.golang.org/grpc/internal/envconfig google.golang.org/grpc/internal/grpcsync google.golang.org/grpc/internal/resolver/dns google.golang.org/grpc/internal/resolver/passthrough golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/secure/bidirule golang.org/x/text/unicode/norm golang.org/x/net/idna golang.org/x/net/http/httpguts golang.org/x/net/http2/hpack golang.org/x/net/http2 google.golang.org/grpc/internal/syscall google.golang.org/grpc/keepalive google.golang.org/grpc/peer google.golang.org/grpc/stats google.golang.org/grpc/tap google.golang.org/grpc/internal/transport google.golang.org/grpc/naming google.golang.org/grpc github.com/golang/protobuf/ptypes/struct github.com/golang/protobuf/jsonpb github.com/golang/protobuf/protoc-gen-go/descriptor github.com/golang/protobuf/protoc-gen-go/generator/internal/remap github.com/golang/protobuf/protoc-gen-go/plugin github.com/golang/protobuf/protoc-gen-go/generator github.com/golang/protobuf/ptypes/wrappers github.com/grpc-ecosystem/grpc-gateway/internal github.com/grpc-ecosystem/grpc-gateway/utilities google.golang.org/genproto/protobuf/field_mask github.com/grpc-ecosystem/grpc-gateway/runtime golang.org/x/sys/cpu github.com/aead/chacha20/chacha github.com/aead/chacha20 github.com/lightningnetwork/lightning-onion github.com/jrick/logrotate/rotator github.com/lightningnetwork/lnd/build github.com/lightningnetwork/lnd/keychain github.com/lightningnetwork/lnd/input github.com/lightningnetwork/lnd/lntypes github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519/internal/edwards25519 github.com/miekg/dns/vendor/golang.org/x/crypto/ed25519 github.com/miekg/dns/vendor/golang.org/x/net/bpf github.com/miekg/dns/vendor/golang.org/x/net/internal/iana github.com/miekg/dns/vendor/golang.org/x/net/internal/socket github.com/miekg/dns/vendor/golang.org/x/net/ipv4 github.com/miekg/dns/vendor/golang.org/x/net/ipv6 github.com/miekg/dns golang.org/x/net/internal/socks golang.org/x/net/proxy github.com/lightningnetwork/lnd/tor github.com/lightningnetwork/lnd/lnwire github.com/lightningnetwork/lnd/tlv github.com/lightningnetwork/lnd/record github.com/lightningnetwork/lnd/routing/route
routing/route/route.go:242:34: undefined: sphinx.PaymentPath routing/route/route.go:243:11: undefined: sphinx.PaymentPath routing/route/route.go:266:15: undefined: sphinx.HopPayload routing/route/route.go:282:19: undefined: sphinx.NewHopPayload routing/route/route.go:300:19: undefined: sphinx.NewHopPayload routing/route/route.go:306:13: undefined: sphinx.OnionHop github.com/lightningnetwork/lnd/shachain github.com/lightningnetwork/lnd/zpay32 github.com/ltcsuite/ltcd/chaincfg/chainhash golang.org/x/crypto/pbkdf2 golang.org/x/crypto/scrypt github.com/ltcsuite/ltcd/wire github.com/ltcsuite/ltcd/chaincfg github.com/btcsuite/btcutil/txsort github.com/btcsuite/btcd/integration/rpctest github.com/lightningnetwork/lnd/lnwallet/chanvalidate github.com/btcsuite/fastsha256 github.com/lightningnetwork/lnd/ticker github.com/lightningnetwork/lnd/queue github.com/lightningnetwork/lnd/htlcswitch/hodl github.com/lightningnetwork/lnd/htlcswitch/hop
htlcswitch/hop/iterator.go:82:26: r.processedPacket.Payload undefined (type sphinx.ProcessedPacket has no field or method Payload) htlcswitch/hop/iterator.go:85:7: undefined: sphinx.PayloadLegacy htlcswitch/hop/iterator.go:112:22: r.processedPacket.Payload undefined (type sphinx.ProcessedPacket has no field or method Payload) htlcswitch/hop/iterator.go:112:39: undefined: sphinx.PayloadLegacy htlcswitch/hop/iterator.go:116:26: r.processedPacket.Payload undefined (type *sphinx.ProcessedPacket has no field or method Payload) github.com/lightningnetwork/lnd/lntest/wait github.com/lightningnetwork/lnd/multimutex golang.org/x/crypto/internal/subtle golang.org/x/crypto/internal/chacha20 golang.org/x/crypto/poly1305 golang.org/x/crypto/chacha20poly1305 golang.org/x/crypto/hkdf github.com/lightningnetwork/lnd/brontide github.com/lightningnetwork/lnd/buffer github.com/lightningnetwork/lnd/chanacceptor github.com/lightningnetwork/lnd/subscribe github.com/lightningnetwork/lnd/peernotifier golang.org/x/time/rate github.com/lightningnetwork/lnd/watchtower/blob golang.org/x/net/context google.golang.org/genproto/googleapis/api/annotations github.com/juju/loggo github.com/rogpeppe/fastuuid golang.org/x/crypto/curve25519 golang.org/x/crypto/salsa20/salsa golang.org/x/crypto/nacl/secretbox golang.org/x/crypto/nacl/box gopkg.in/errgo.v1 gopkg.in/macaroon.v2 gopkg.in/macaroon-bakery.v2/bakery/checkers gopkg.in/macaroon-bakery.v2/bakery/internal/macaroonpb gopkg.in/macaroon-bakery.v2/bakery github.com/lightningnetwork/lnd/lnrpc github.com/lightningnetwork/lnd/lnrpc/autopilotrpc github.com/lightningnetwork/lnd/lnrpc/chainrpc github.com/lightningnetwork/lnd/lnrpc/signrpc github.com/lightningnetwork/lnd/lnrpc/walletrpc github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc github.com/btcsuite/btcwallet/walletdb/bdb github.com/lightningnetwork/lnd/macaroons golang.org/x/crypto/blake2b gitlab.com/NebulousLabs/fastrand gitlab.com/NebulousLabs/go-upnp/goupnp/httpu gitlab.com/NebulousLabs/go-upnp/goupnp/scpd gitlab.com/NebulousLabs/go-upnp/goupnp/soap gitlab.com/NebulousLabs/go-upnp/goupnp/ssdp golang.org/x/net/html/atom golang.org/x/net/html golang.org/x/text/encoding/internal/identifier golang.org/x/text/encoding golang.org/x/text/encoding/internal golang.org/x/text/encoding/charmap golang.org/x/text/encoding/japanese golang.org/x/text/encoding/korean golang.org/x/text/encoding/simplifiedchinese golang.org/x/text/encoding/traditionalchinese golang.org/x/text/internal/utf8internal golang.org/x/text/runes golang.org/x/text/encoding/unicode golang.org/x/text/internal/tag golang.org/x/text/internal/language golang.org/x/text/internal/language/compact golang.org/x/text/language golang.org/x/text/encoding/htmlindex golang.org/x/net/html/charset gitlab.com/NebulousLabs/go-upnp/goupnp gitlab.com/NebulousLabs/go-upnp/goupnp/dcps/internetgateway1 github.com/NebulousLabs/go-upnp github.com/jackpal/gateway github.com/jackpal/go-nat-pmp github.com/lightningnetwork/lnd/nat github.com/lightningnetwork/lnd/pool github.com/lightningnetwork/lnd/signal git.schwanenlied.me/yawning/bsaes.git/ghash git.schwanenlied.me/yawning/bsaes.git/internal/modes git.schwanenlied.me/yawning/bsaes.git/ct32 git.schwanenlied.me/yawning/bsaes.git/ct64 github.com/Yawning/aez github.com/lightningnetwork/lnd/aezeed github.com/tv42/zbase32 golang.org/x/crypto/salsa20 Makefile:91: recipe for target 'build' failed make: *** [build] Error 2
You probably have an old version of go. You need 1.13.x
.
But it's probably easier to just download a binary from https://github.com/lightningnetwork/lnd/releases
@guggero Yep, I had updated go version and lnd updated without any problems, after updating I tried to close channel again but got same error, as I can see form lnd log, it filters blocks. I belive while process is incomplete I wont be able to do anything with channel and balance, am I right?)
You have to wait until you see both these flags in getinfo
to be true:
"synced_to_chain": true,
"synced_to_graph": true,
Then you should be able to try to force-close it. What is the exact command you use to force-close the channel?
@guggero thanks for reply, the command to close is "lncli closechannel --force 3cd818c64bb6dcb7f08f2f3e1b094f642a9074b92ecf3c30bd9fa24f980c4128 1"
At this moment I can see that "synced_to_chain": true, "synced_to_graph": false,
How to check synced_to_graph state?
Also strange thing I cant list channels, from log I can see that command was applied 2019-10-28 13:42:07.223 [DBG] RPCS: [listchannels] fetched 1 channels from DB but no console output, could be a sync issue?
The command looks ok, that should work...
Do you have any peers connected? What's the current output of getinfo
?
And you still get the unable to find arbitrator
error when trying to force close?
Feel free to ping me in the community Slack if you don't want to post this info here.
@guggero here is output { "version": "0.8.0-beta commit=v0.8.0-beta-67-g1a0ab538d53c5be57cbbf80b0e48e5a207de9749", "identity_pubkey": "023af745b54d21cec273dc55f231d08d04491ce800e6290d9bfc63c90ecb7a7f40", "alias": "Blitzhub.IO", "color": "#0c77c3", "num_pending_channels": 0, "num_active_channels": 0, "num_inactive_channels": 1, "num_peers": 0, "block_height": 601383, "block_hash": "0000000000000000000e1b81c7e35c8e10a36f43e0d5335a47d39d09b26e7475", "best_header_timestamp": 1572270212, "synced_to_chain": true, "synced_to_graph": false, "testnet": false, "chains": [ { "chain": "bitcoin", "network": "mainnet" } ], "uris": [ "023af745b54d21cec273dc55f231d08d04491ce800e6290d9bfc63c90ecb7a7f40@172.104.22.19:9735" ] }
Close channel not showing anything as well
Also found logs when tried force close
2019-10-28 13:05:18.818 [INF] HSWC: Removing channel link with ChannelID(28410c984fa29fbd303ccf2eb974902a644f091b3e2f8ff0b7dcb64bc618d83d) 2019-10-28 13:05:18.818 [INF] CNCT: Attempting to force close ChannelPoint(3cd818c64bb6dcb7f08f2f3e1b094f642a9074b92ecf3c30bd9fa24f980c4128:1)
Can you please increase the log level to debug
and post everything you see after Attempting to force close ChannelPoint
?
@guggero tried again looks like it in process lncli closechannel --force 3cd818c64bb6dcb7f08f2f3e1b094f642a9074b92ecf3c30bd9fa24f980c4128 1 gives me [lncli] rpc error: code = Unknown desc = channel is already in the process of being force closed
listchannel working, I set debug, at this time I am unable to send coins to btc wallet, command, trying
"lncli sendcoins --addr 3HvU...Xi6NU --amt 20"
returns that transaction is dust, from log output
2019-10-28 14:34:46.159 [DBG] LNWL: Returning 4799 sat/kw for conf target of 6 2019-10-28 14:34:46.159 [INF] RPCS: [sendcoins] addr=3HvU....fzXi6NU, amt=0.0000002 BTC, sat/kw=4799, sweep_all=false 2019-10-28 14:34:46.180 [ERR] RPCS: [/lnrpc.Lightning/SendCoins]: transaction output is dust
Does walletbalance
still show "confirmed_balance": "4483374",
?
And of course you can't send 20 satoshis to an address. That is too small for an on-chain transaction and is considered dust. So you have to specify an --amt
that is larger than ~300 Satoshis.
And if the channel now is in process of force-closing, it should show up in pendingchannels
. If that is the case, it can take up to 2 weeks for the balance to show up in your wallet because it is time locked.
@guggero Yes it worked!!!!) Thanks for help! Yes I can see closed channel in pending, also I sent 800 satoshi and I can see transaction on blockchain, now balance is unconfirmed, so as I can understand its awating block validation, so after this I will be able to send again after this?)
You're welcome.
Exactly, you will need 3 confirmations and then you can send again. But as I said, the pending channel will take much longer because of the time lock (I think the output of pendingchannels
will tell you how many blocks are remaining).
Can this be closed now?
@wpaulino yes, I'll close it
Background
Hi, I've tried to close channel with flag --force but got an error "error": "unable to close channel: rpc error: code = Unknown desc = unable to find arbitrator" I read before that this issue may casued by not synced node, but at this time it fully synced and active, also send coins causes error [lncli] rpc error: code = Unknown desc = transaction output is dust, but as I can see when I calls wallet balance I can see that "total_balance": "4483374", "confirmed_balance": "4483374", "unconfirmed_balance": "0" Can you pls help with this, I am new in this so I could have missed something
Enviorment
Version: 0.5.1-beta commit=v0.5.1-beta-721-g81783a60dc87f275d415be2e55c8f03688cd63ae, ubuntu 16.04 Bitcoin Core version v0.17.0.0-ge1ed37edaedc85b8c3468bd9a726046344036243 (release build)
Steps to reproduce
Channel was innactive for one month, also node was down
Here's netstat if needed
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:28332 0.0.0.0: LISTEN 15468/bitcoind
tcp 0 0 0.0.0.0:8333 0.0.0.0: LISTEN 15468/bitcoind
tcp 0 0 0.0.0.0:28333 0.0.0.0: LISTEN 15468/bitcoind
tcp 0 0 127.0.0.53:53 0.0.0.0: LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN -
tcp6 0 0 :::8332 ::: LISTEN 15468/bitcoind
tcp6 0 0 :::8333 ::: LISTEN 15468/bitcoind
tcp6 0 0 :::8180 ::: LISTEN 19748/lnd
tcp6 0 0 :::22 ::: LISTEN -
tcp6 0 0 :::10009 ::: LISTEN 19748/lnd
tcp6 0 0 :::9735 :::* LISTEN 19748/lnd As you can see node of btc and lnd are active