Mirobit / bitcoin-node-manager

:bar_chart: Lightweight dashboard and control system for bitcoin nodes
MIT License
123 stars 64 forks source link

Fatal error #43

Closed SpanX closed 3 years ago

SpanX commented 3 years ago

Just installed it on ubuntu (rasp4) and gives me this error

Fatal error: Uncaught Error: Call to undefined function App\curl_init() in /var/www/html/bitcoin-node-manager/src/jsonRPCClient.php:79 Stack trace: #0 /var/www/html/bitcoin-node-manager/src/Utility.php(461): App\jsonRPCClient->__call() #1 /var/www/html/bitcoin-node-manager/src/Content.php(6): App\getPeerData() #2 /var/www/html/bitcoin-node-manager/index.php(89): App\createMainContent() #3 {main} thrown in /var/www/html/bitcoin-node-manager/src/jsonRPCClient.php on line 79

no rights issue because i did 777 on all files

SpanX commented 3 years ago

20.04 LTS

Mirobit commented 3 years ago

Are you using the latest version of BNM and is the curl php extension installed? There was a similar issue a while ago but that was fixed (i thought).

SpanX commented 3 years ago

latest version (did git pull and merged) ......OMG my bad. php-curl was not installed but does not solve my problem

Mirobit commented 3 years ago

32 is the same issue I think.

Try giving the rpc more resources in bitcoin core.

Add these entries to your bitcoin.conf and increase them. I don't know the exact values that will help, but start by +1.

# Set the number of threads to service RPC calls
rpcthreads=4
# Set the depth of the work queue to service RPC calls
rpcworkqueue=16
# Number of seconds after which an uncompleted RPC call will time out
rpcservertimeout=30

How long does it take till the error appears? If it takes less than 30 seconds than you can ignore rpcservertimeout.

SpanX commented 3 years ago

error is within a second.

i just added those lines but no change (yes restarted bitcoin core again)

Mirobit commented 3 years ago

Did you increase the first two values? Because the values I posted are the default values and won't have an affect on the performance.

I am sorry to ask this but did you restart the web server after installing the curl extension?

SpanX commented 3 years ago

I just rebooted and it works. sorry for my mistake.

On Mon, Feb 22, 2021 at 10:18 PM Michael Rotarius notifications@github.com wrote:

Did you increase the first two values? Because the values I posted are the default values and won't have an affect on the performance.

I am sorry to ask this but did you restart the server after installing the curl extension?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Mirobit/bitcoin-node-manager/issues/43#issuecomment-783680991, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVEP6XG2Z2OIUJLUIL2YRLTALCZDANCNFSM4YAPQL2A .

-- ThA Sp[A]nX

SpanX commented 3 years ago

i just get no ip4 and no ipv6 information

On Tue, Feb 23, 2021 at 7:32 AM Sp[A]nX spanx20@gmail.com wrote:

I just rebooted and it works. sorry for my mistake.

On Mon, Feb 22, 2021 at 10:18 PM Michael Rotarius < notifications@github.com> wrote:

Did you increase the first two values? Because the values I posted are the default values and won't have an affect on the performance.

I am sorry to ask this but did you restart the server after installing the curl extension?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Mirobit/bitcoin-node-manager/issues/43#issuecomment-783680991, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVEP6XG2Z2OIUJLUIL2YRLTALCZDANCNFSM4YAPQL2A .

-- ThA Sp[A]nX

-- ThA Sp[A]nX

SpanX commented 3 years ago

if i refresh i get the following error:

Warning: file_get_contents(data/hoster.json): failed to open stream: Permission denied in /var/www/html/bitcoin-node-manager/src/Utility.php on line 196

Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/bitcoin-node-manager/src/Utility.php on line 197

Mirobit commented 3 years ago

Could you run bitcoin-cli getnetworkinfo in your terminal? If the local_addresses field ist empty than there is nothing BNM can do about it. Bitcoin core doesn't seem to know the addresses.

SpanX commented 3 years ago

{ "version": 200000, "subversion": "/Satoshi:0.20.0/", "protocolversion": 70015, "localservices": "0000000000000409", "localservicesnames": [ "NETWORK", "WITNESS", "NETWORK_LIMITED" ], "localrelay": true, "timeoffset": -2, "networkactive": true, "connections": 33, "networks": [ { "name": "ipv4", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "ipv6", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "onion", "limited": true, "reachable": false, "proxy": "", "proxy_randomize_credentials": false } ], "relayfee": 0.00001000, "incrementalfee": 0.00001000, "localaddresses": [ { "address": "2001:984:2f7a:1:fba9:xxXxxx:Xxxxxxx:xxx", "port": 8333, "score": 1 } ], "warnings": ""

Mirobit commented 3 years ago

Thanks for sticking with the issue. There was indeed an error in the ipv6 regex. This should be fixed now (c77c136). BNM should now display your ipv6 address. There is nothing I can do about the missing ipv4.

SpanX commented 3 years ago

just one error left: Warning: in_array() expects parameter 2 to be array, null given in /var/www/html/bitcoin-node-manager/src/Utility.php on line 197

Warning: file_get_contents(data/hoster.json): failed to open stream: Permission denied in /var/www/html/bitcoin-node-manager/src/Utility.php on line 196

Mirobit commented 3 years ago

Could you please check the permissions of the data/hoster.json file. I know you 777ed all files but that is the only explanation I have.

SpanX commented 3 years ago

it has 744 , should it be 777?

Mirobit commented 3 years ago

If the owner of the data/hoster.json is www-data than 600. If www-data is only the group than 660 otherwise you need 666. Assuming you use Apache you could alternately run chown -R www-data:www-data /var/www/html/BNM_FOLDER (but git will change this back after pulling)

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. With no activity this will be closed in 60 days.

github-actions[bot] commented 3 years ago

This issue was closed because it has been stalled for 60 days with no activity.