Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.5.3 and later - Unhandled exception. System.FormatException: One of the identified items was in an invalid format. #470

Closed
tsjk opened this issue Jun 6, 2024 · 1 comment

Comments

@tsjk
Copy link

tsjk commented Jun 6, 2024

info: Configuration:  Data Directory: /datadir
info: Configuration:  Configuration File: /datadir/Main/settings.config
info: Configuration:  Network: Mainnet
info: Configuration:  Supported chains: BTC,LBTC
Unhandled exception. System.FormatException: One of the identified items was in an invalid format.
   at NBXplorer.Configuration.ConfigurationExtensions.GetOrDefault[T](IConfiguration configuration, String key, T defaultValue) in /source/NBXplorer/Configuration/ConfigurationExtensions.cs:line 23
   at NBXplorer.Configuration.ExplorerConfiguration.<>c__DisplayClass28_0.<LoadArgs>b__2(String o) in /source/NBXplorer/Configuration/ExplorerConfiguration.cs:line 206
   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
   at System.String.Join(String separator, IEnumerable`1 values)
   at NBXplorer.Configuration.ExplorerConfiguration.LoadArgs(IConfiguration config) in /source/NBXplorer/Configuration/ExplorerConfiguration.cs:line 204
   at NBXplorer.Program.Main(String[] args) in /source/NBXplorer/Program.cs:line 29

My config file has no uncommented lines.

####Common Commands####
####If Bitcoin Core is running with default settings, you should not need to modify this file####
####All those options can be passed by through command like arguments (ie `-port=19382`)####

## This is the RPC Connection to your node
#btc.rpc.url=http://127.0.0.1:8332/
#By user name and password
#btc.rpc.user=bitcoinuser
#btc.rpc.password=bitcoinpassword
#By cookie file
#btc.rpc.cookiefile=yourbitcoinfolder/.cookie
#By raw authentication string
#btc.rpc.auth=walletuser:password

## This is the connection to your node through P2P
#btc.node.endpoint=127.0.0.1:BTC

## minutxovalue defines the minimum value allowed for a utxo to be tracked
#btc.minutxovalue=1

## startheight defines from which block you will start scanning, if -1 is set, it will use current blockchain height
#btc.startheight=-1
## rescan forces a rescan from startheight
#btc.rescan=0
## rescaniftimebefore only lets rescan occur if current unix timestamp (seconds) is less than the given value
## requires btc.rescan to be true
#btc.rescaniftimebefore=1635210000


## If more than 0, the size of the cache for the database, in MB. Else, no limit on the size of the cache. (default: 50)
#dbcache=50
## Disable cookie, local ip authorization (unsecured)
#noauth=0
## Add a server alias to be returned in status response
#instancename=nbxplorer
## Expose the node RPC through the REST API
#exposerpc=0
## What crypto currencies is supported
#chains=btc
## Activate or disable verbose logs
#verbose=0


####Server Commands####
#port=24444
#bind=127.0.0.1
#mainnet=1


####Azure Service Bus####
## Azure Service Bus configuration - set connection string to use Service Bus. Set Queue and / or Topic names to publish message to queues / topics
#asbcnstr=Endpoint=sb://<yourdomain>.servicebus.windows.net/;SharedAccessKeyName=<your key name here>;SharedAccessKey=<your key here>
#asbblockq=<new block queue name>
#asbtranq=<new transaction queue name>
#asbblockt=<new block topic name>
#asbtrant=<new transaction topic name>

And the environments is:

    -e NBXPLORER_DBCACHE="256"
    -e NBXPLORER_NETWORK="mainnet" -e NBXPLORER_BIND="0.0.0.0:32838" -e NBXPLORER_NOAUTH="0"
    -e NBXPLORER_INSTANCENAME="nbxplorer" -e NBXPLORER_EXPOSERPC="1"
    -e NBXPLORER_POSTGRES="Host=db;Port=5432;User ID=<snip>;Password=<snip>;Database=nbxplorer;"
    -e NBXPLORER_CHAINS="btc,lbtc"
    -e NBXPLORER_BTCNODEENDPOINT="host.containers.internal:8333" -e NBXPLORER_BTCRPCURL="http://host.containers.internal:8332/"
    -e NBXPLORER_BTCHASTXINDEX="true"
    -e NBXPLORER_BTCRPCUSER="bitcoind_rpc" -e NBXPLORER_BTCRPCPASSWORD="<snip>"
    -e NBXPLORER_LBTCNODEENDPOINT="host.containers.internal:7042" -e NBXPLORER_LBTCRPCURL="http://host.containers.internal:7041/"
    -e NBXPLORER_LBTCHASTXINDEX="true"
    -e NBXPLORER_LBTCRPCUSER="elementsd_rpc" -e NBXPLORER_LBTCRPCPASSWORD="<snip>" \
@NicolasDorier
Copy link
Member

seems to come from https://github.com/dgarage/NBXplorer/blob/v2.5.3/NBXplorer/Configuration/ExplorerConfiguration.cs#L204

It is caused by NBXPLORER_DBCACHE="256". Remove this, this isn't used anymore.

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

No branches or pull requests

2 participants