Title: Help with mempool.space local install Post by: DireWolfM14 on September 27, 2021, 12:29:12 AM I need some help installing a local instance of mempool.space, hoping some of you with experience can chime in.
I've installed all the dependencies using apt, so they should all be stable LTS versions. I also installed npm. I am trying to run this on separate hardware than my bitcoind and electrumx services. On the mempool machine I set up the config file with the node server's local IP, and an rpc password generated using rpcauth.py. On the node server I added the user authorization to the bitcoin.conf file, opened the applicable ports in ufw, and set port routing in my router. I double checked all that over and over, so I'm sure that's not presenting any issues. I installed nodejs and mariadb only on the machine that'll be running mempool, not on the machine running bitcoind/electrumx. Here's the error I get when trying to run the backend: Code: direwolf@mempoolserver:/usr/local/bin/mempool/backend$ sudo npm run start Here's my mempool-config.json file. I only changed the rpc password in two places, and the IP address in thee places (as shown below.) Code: { Thanks in advance. Title: Re: Help with mempool.space local install Post by: DireWolfM14 on September 27, 2021, 04:21:18 PM Code: /usr/local/bin/mempool/backend/dist/index.js:24 I'm beginner at JS/TS, but looks like it's syntax error rather than mistake on file configuration. Did you grab the source code from release page (https://github.com/mempool/mempool/releases (https://github.com/mempool/mempool/releases)) or clone the master branch? I followed the instructions in the README.md (https://raw.githubusercontent.com/mempool/mempool/master/README.md) file, so first I cloned the master: Code: git clone https://github.com/mempool/mempool Then I checked out latest release: Code: latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4) I've installed all the dependencies using apt, so they should all be stable LTS versions. I also installed npm. It might be helpful to mention linux distro you use and version of your NodeJS. Good point: Both servers are running Ubuntu Server version 20.04.3 LTS. I only installed NodeJS onto the machine I want to run mempool, the version installed by the app manager is 10.19.0. I just looked up the NodeJS site, and noticed their latest LTS version is 14.17.16. The version I have was originally released in February of 2020. That may have something to do with it, odd that such an old package is the one installed by apt. I'll try installing the newer LTS version of NodeJS, hope it helps. Title: Re: Help with mempool.space local install Post by: ABCbits on September 28, 2021, 08:51:11 AM I followed the instructions in the README.md (https://raw.githubusercontent.com/mempool/mempool/master/README.md) file, so first I cloned the master: Code: git clone https://github.com/mempool/mempool Then I checked out latest release: Code: latestrelease=$(curl -s https://api.github.com/repos/mempool/mempool/releases/latest|grep tag_name|head -1|cut -d '"' -f4) You checked out the latest stable version, so i think it's not the problem. Both servers are running Ubuntu Server version 20.04.3 LTS. I only installed NodeJS onto the machine I want to run mempool, the version installed by the app manager is 10.19.0. I just looked up the NodeJS site, and noticed their latest LTS version is 14.17.16. The version I have was originally released in February of 2020. That may have something to do with it, odd that such an old package is the one installed by apt. I'll try installing the newer LTS version of NodeJS, hope it helps. IMO it's the problem. According to https://nodejs.org/en/about/releases/ (https://nodejs.org/en/about/releases/) and https://en.wikipedia.org/wiki/Node.js#Releases (https://en.wikipedia.org/wiki/Node.js#Releases), v10 was released on 2018 & no longer updated. Meanwhile v14 is released on 2020, but still actively supported until few years later. On a side note, you should use rolling-release linux distro if you really want up-to-date package. Title: Re: Help with mempool.space local install Post by: DireWolfM14 on September 28, 2021, 02:26:57 PM IMO it's the problem. According to https://nodejs.org/en/about/releases/ (https://nodejs.org/en/about/releases/) and https://en.wikipedia.org/wiki/Node.js#Releases (https://en.wikipedia.org/wiki/Node.js#Releases), v10 was released on 2018 & no longer updated. Meanwhile v14 is released on 2020, but still actively supported until few years later. On a side note, you should use rolling-release linux distro if you really want up-to-date package. I installed the npm package "n" and used that to update to the latest LTS version of Node.js. The funny thing is it didn't update NodeJS, just Node.js. To prevent the older version from being used I removed it using apt, then created a simlink to the new package. That resolved the errors I was getting while trying to run the backend, but I got another error that I'm now trying to work out: ECONNREFUSED port 8332. Once again I checked all my settings, but was unable to find from where the error is stemming. Mempool connects to my Electrum server just fine, but Bitcoin Core is refusing the connection for some unknown reason. I have the following lines in my bitcoin.conf file: Code: rpcbind:127.0.0.1 I tried disabling all those one at a time, and also all three together but nothing helped. @DaveF, please go easy on me. :D Title: Re: Help with mempool.space local install Post by: vv181 on September 28, 2021, 04:56:42 PM ~ Try to add this on your bitcoin.conf, let's see if that solve the issue since I have a similar problem back then when I tried to set up mempool on my PC and node on my RasPi.Code: rpcbind:127.0.0.1 Title: Re: Help with mempool.space local install Post by: DireWolfM14 on September 28, 2021, 11:19:07 PM ~ Try to add this on your bitcoin.conf, let's see if that solve the issue since I have a similar problem back then when I tried to set up mempool on my PC and node on my RasPi.Code: rpcbind:127.0.0.1 That did it, thanks for the suggestion! My mempool backend is running! Thank you for your help, gentlemen. I'll see you when I have trouble with the frontend. ;D Title: Re: Help with mempool.space local install Post by: NotATether on September 29, 2021, 08:07:15 AM A side note: "Latest" or "Rolling" releases of node break a lot of packages that would otherwise build fine on older node versions, so you're probably better off with sticking to v14 LTS for now.
Title: Re: Help with mempool.space local install Post by: DireWolfM14 on September 29, 2021, 12:46:35 PM A side note: "Latest" or "Rolling" releases of node break a lot of packages that would otherwise build fine on older node versions, so you're probably better off with sticking to v14 LTS for now. Yeah, to update I used the npm tool "n" with this command: sudo n lts, which installed the current LTS version, 14.17.6. The funny thing is it didn't update NodeJS, just Node.js. Those two are different? I thought it's just different name. I believe they are interchangeable. After updating, when I checked the version I got two different versions. For example, when I checked the version of Node.js I got this: Code: ~: node -v When I checked the version of NodeJS, I got the old version: Code: ~: nodejs -v When I updated, a comment in the update log mentioned that the new package was installed in a new directory, the file location is /usr/local/bin/node. NodeJS, however was installed at /usr/bin/nodejs. |