dashed-slug.net › Forums › General discussion › Wallet not ready (Connection timed out)
Tagged: connection, firewall, json-rpc, rpc api, timeout
- This topic has 16 replies, 2 voices, and was last updated 2 years, 2 months ago by alexg.
-
AuthorPosts
-
October 3, 2022 at 5:46 am #12161AnonymousInactive
Wallet not ready: DSWallets\Bitcoin_Core_Like_Wallet_Adapter: JSON-RPC command getwalletinfo failed with: Connection timed out after 10001 milliseconds
*coin.conf
rpcuser=***
rpcpassword=***
rpcport=8711
rpcbind=0.0.0.0
rpcallowip=127.0.0.1
rpcallowip=(web host ip)
rpcauth=exchange:****
rpcssl=1
listen=1
server=1
txindex=1
daemon=1
paytxfee=0.005October 3, 2022 at 11:29 am #12162alexgKeymasterHello,
The outgoing TC connection to your wallet server fails with a timeout after 10 seconds.
Timeouts are usually due to firewalls.
You should check what firewalls protect the server where the wallet is running. You should allow incoming TCP connections on port 8711.
If you are on a hosting provider, you should contact them and let them know that you want them to add this rule to their firewalls.
If you are managing the server yourself, you should also check any software firewalls on the server (e.g.
ufw
,iptables
, etc).Hope this helps. Please let me know if you have any more questions.
with regards
October 4, 2022 at 12:47 pm #12166AnonymousInactivethx BUT NOW I HAVE ANOTHER PROBLEM I SENT SOME COINS TO THE ADDRESS GENERATED AND THE WALLET RECIEVED IT BUT IT IS NOT SHOW IN MY BALANCE
October 4, 2022 at 1:09 pm #12167AnonymousInactivethank
October 5, 2022 at 11:23 am #12174alexgKeymasterHello,
Check your walletnotify and blocknotify lines in the config. The plugin recommends the correct config to you when connection is not possible.
The curl commands specified in these lines should be executable.
There are many reasons why the commands may not be executing. For example, maybe curl is not installed.
Remove the
-s
argument (silent) and the redirect to/dev/null
, and run a command from the shell to see if it hits the wallet api.For example, if the plugin recommends that you add to your config:
walletnotify=curl -sk https://example.com/wallets/api3/notify/BTC/wallet/TXID >/dev/null
then login to your wallet server, and run the following command in the shell:
curl -k https://example.com/wallets/api3/notify/BTC/wallet/TXID
where TXID should be replaced with a TXID that you wish to notify for.
Let me know if you have any questions about this.
with regards
October 5, 2022 at 11:50 am #12175AnonymousInactiveit showed me html code of the error page saying There has been a critical error on this website. https://wordpress.org/support/article/faq-troubleshooting/” Learn more about troubleshooting WordPress.
October 5, 2022 at 12:23 pm #12176AnonymousInactiveI once got this error but I have fixed it
An error of type E_ERROR was caused in line 128 of the file /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/post-types/class-wallet.php. Error message: Uncaught TypeError: Argument 1 passed to DSWallets\Wallet::load() must be of the type int, string given, called in /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/post-types/class-currency.php on line 308 and defined in /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/post-types/class-wallet.php:128
Stack trace:
#0 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/post-types/class-currency.php(308): DSWallets\Wallet::load(‘bitcoin’)
#1 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/post-types/class-currency.php(1819): DSWallets\Currency::load(7)
#2 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-includes/class-wp-hook.php(307): DSWallets\Currency::save_post(7, Object(WP_Post), true)
#3 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#4 /home/u313708864/domains/exchanOctober 5, 2022 at 1:27 pm #12177AnonymousInactiveI tried curl *** on other coin and they all work
October 5, 2022 at 1:34 pm #12178AnonymousInactivei tried to change the txid to a random unrelated txid and it works : {“message”:”The plugin is being notified about this TXID. If a user is associated with one of its output addresses, a deposit will be registered for this user.”,”status”:”success”}
But when i use the ture txid: There has been a critical error on this website.
October 6, 2022 at 6:40 am #12179alexgKeymasterHmm…
I will look at this issue. The plugin should not be crashing like this.
But in the meantime, can you check that you have associated your coin/currency to the wallet?
I will let you know what I find after investigating.
with regards
October 6, 2022 at 6:43 am #12180alexgKeymasterCan you please email me screenshots of the currency editor screen and the wallet editor screen?
You can hide any sensitive information in the screenshot if you like.
October 7, 2022 at 5:27 am #12183alexgKeymasterHello,
Thank you for providing screenshots regarding the above.
I am assuming you are using version
6.0.0-RC3
.The screenshots you provided are not from the plugin’s own editors. Can you please use the plugin’s built in editors?
Based on the trace you provided, the plugin is trying to load a wallet by its string name, rather than a post ID:
DSWallets\Wallet::load('bitcoin')
I am not sure how that can happen. The argument passed to
Wallet::load()
must be an integer, and the plugin’s editor does not allow you to associate a currency with anything other than awallets_wallet
post ID.I am guessing based on the screenshots you provided, that maybe you used another post meta editor to modify the currency post type? If so, please use the plugin’s own editor.
I am planning to upload a version RC4 with some bug fixes, and this should be the last RC before the final release. But I don’t think that any of the unreleased fixes apply to your particular bug.
(I am taking things slow because I lost a loved one this week and it’s still hard to concentrate on work. Sorry about that. As soon as possible, I plan to continue with the release plan and other planned improvements to the products and website.)
TL;DR The plugin should not ever be calling
Wallet::load('bitcoin')
. From the stack trace, it looks like you tried to save a currency with a wallet stringbitcoin
, which is incorrect. I think this is an issue related to you using another post meta editor.Please let me know if this makes any sense?
with regards
P.S. I use this email for work, not the one at gmail.
October 7, 2022 at 12:17 pm #12185AnonymousInactiveFor Wallet::load(‘bitcoin’) i fixed it before so I don’t think they are related
October 10, 2022 at 9:31 am #12188alexgKeymasterThank you for providing screenshots. Unfortunately I was not able to determine what the issue is.
Just to make sure that we are on the same page, I will summarise the issue so far. Please check that I have understood you correctly.
The plugin is not being notified immediately about incoming deposits.
You have added the following lines to your config file:
walletnotify=curl -s 'https://exchange.napocoin.net/wp-json/dswallets/v1/walletnotify/25335/%s' >/dev/null
blocknotify=curl -s 'https://exchange.napocoin.net/wp-json/dswallets/v1/blocknotify/25335/%s' >/dev/null
Where 25335 is the post_id of your Napocoin Currency entry.
When you logged in to your wallet server, you have attempted the following command:
curl ‘https://exchange.napocoin.net/wp-json/dswallets/v1/walletnotify/25335/ABCD’
and you get as result:
{"message":"The plugin is being notified about this TXID. If a user is associated with one of its output addresses, a deposit will be registered for this user.","status":"success"}
The above is to be expected when the TXID is invalid.
But if you try the same command with a correct TXID that corresponds to your deposit, then you see on the screen the message:
There has been a critical error on this website.
This may be due to a difference between napocoin and bitcoin JSON-RPC APIs. The difference could be something trivial.
The only way to be sure is to see the PHP error that occurs at the time when you run the curl command with the correct TXID.
Can you please find this error message? The error will be in your PHP error log, and also in
wp-content/debug.log
if logging is enabled.Let me know if you can find the error.
with regards
October 11, 2022 at 4:16 am #12189AnonymousInactive[11-Oct-2022 04:15:05 UTC] The adapter for wallet 25333 is being notified about block 81df3be588a02ade820bbaead2d3b40ea5ef025a07e8ad5e21ee42bcd3b7555b for currency Napocoin (NAP)
[11-Oct-2022 04:15:06 UTC] DSWallets\Bitcoin_Core_Like_Wallet_Adapter: The adapter for wallet 25333 was notified about TXID efbe7cd7ffb6cd2249ea0a1ec85631958de17cf59b6c9ea2277de23aac258f9f for currency Napocoin (NAP)
[11-Oct-2022 04:15:07 UTC] PHP Fatal error: Uncaught InvalidArgumentException: Fee must be a non-positive integer! in /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/post-types/class-transaction.php:541
Stack trace:
#0 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/adapters/class-bitcoin-core-like-wallet-adapter.php(737): DSWallets\Transaction->__set(‘fee’, 2000000000)
#1 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/adapters/class-bitcoin-core-like-wallet-adapter.php(1045): DSWallets\Bitcoin_Core_Like_Wallet_Adapter->walletnotify(‘efbe7cd7ffb6cd2…’, Object(DSWallets\Currency))
#2 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-includes/rest-api/class-wp-rest-server.php(1143): DSWallets\Bitcoin_Core_Like_Wallet_Adapter::DSWallets\{closure}(Object(WP_REST_Request))
#3 /home/u313708864/domains/exchange.napocoin.net/public_html/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request(Object(WP_R in /home/u313708864/domains/exchange.napocoin.net/public_html/wp-content/plugins/wallets/post-types/class-transaction.php on line 541 -
AuthorPosts
- You must be logged in to reply to this topic.