Counterparty Install Script broken - MULTIPLE ERRORS

As in title - see thread below for second error.
Just tried to install on Ubuntu 14.04 today.
Got as far as this step and it dumped out with following message:

2016-03-26 16:28:10,613|DEBUG: RUNNING COMMAND: apt-get -y --force-yes install mongodb-org=3.2.3 mongodb-org-server=3.2.3 mongodb-org-shell=3.2.3 mongodb-org-mongos=3.2.3 mongodb-org-tools=3.2.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Version ‘3.2.3’ for ‘mongodb-org’ was not found
E: Version ‘3.2.3’ for ‘mongodb-org-server’ was not found
E: Version ‘3.2.3’ for ‘mongodb-org-shell’ was not found
E: Version ‘3.2.3’ for ‘mongodb-org-mongos’ was not found
E: Version ‘3.2.3’ for ‘mongodb-org-tools’ was not found
2016-03-26 16:28:10,986|ERROR: Command failed: ‘apt-get -y --force-yes install mongodb-org=3.2.3 mongodb-org-server=3.2.3 mongodb-org-shell=3.2.3 mongodb-org-mongos=3.2.3 mongodb-org-tools=3.2.3’

How to fix and proceed? Suggest install script be fixed so not faced with this as first impression of installing Counterparty. Thx.

1 Like

Looking into this a bit further it seems even after the repo is switched in the install script to

http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse

The latest version listed by apt-cache show is 3.0.10.

So what gives here? Why trying to install 3.2.3?

1 Like

Ok. So fix is to edit the install script to have 3.2 repo instead.

http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse

to

http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse

Appears install works if restarted with “r” rebuild option and answering questions again. This time installs mongodb as expected.

Now a new error.

So is this federated node install script no longer maintained? Is it BAD to be using this now? If so, then maybe it should be noted as broken on the counterparty docs web site!

2016-03-26 17:16:27,397|DEBUG: RUNNING COMMAND: wget -O /tmp/nginx-openresty.tar.gz http://openresty.org/download/ngx_openresty-1.9.7.3.tar.gz
–2016-03-26 17:16:27-- http—break-link-for-forum—://openresty.org/download/ngx_openresty-1.9.7.3.tar.gz
Resolving openresty.org (openresty.org)… 198.41.188.236, 198.41.187.236
Connecting to openresty.org (openresty.org)|198.41.188.236|:80… connected.
HTTP request sent, awaiting response… 404 Not Found
2016-03-26 17:16:27 ERROR 404: Not Found.

2016-03-26 17:16:27,945|ERROR: Command failed: ‘wget -O /tmp/nginx-openresty.tar.gz http—break-link-for-forum—://openresty.org/download/ngx_openresty-1.9.7.3.tar.gz’

This time can be fixed by editing install script again.

Either I’m the first user for this script or openresty just changed their download path structure.

Change,

//openresty.org/download/**ngx_**openresty-1.9.7.3.tar.gz

to

//openresty.org/download/openresty-1.9.7.4.tar.gz

I’m also assuming updating to 1.9.7.4 is ok but safe would probably be leaving it as old version as that file seems to be present still at new path.

1 Like

Well, this is proving to be a major bummer.

Looks like openresty won’t build either due to other path changes. How many times do I need to restart this install? Each time it runs through all the previous build steps to get to a new fault. I guess I should go in and edit the script to comment out already done steps… sigh.

edit:

Change openresty fix procedure above instead to search/replace all occurences of ngx_openresty to openresty.

Install script fixup from cmd line (to be applied after downloading script but before running):

sed -i -e ‘s/mongodb-org/3.0/mongodb-org/3.2/’ /tmp/fednode_run.py
sed -i -e ‘s/ngx_openresty/openresty/’ /tmp/fednode_run.py

I will update this post if further changes are needed. Hope to help others avoid re-running script many times and fixing manually.

Crap. What a load of crap. Maybe I’m better off trying to manually install this but with the huge amount of dependencies and modules this seems like it would be a real headache for someone trying to get started with this. But this install script isn’t working well.

Fatal error: Invalid checksum: src/vendors/keyboard/js/jquery.keyboard.min.js
2016-03-26 18:29:46,912|ERROR: Command failed: ‘cd ~xcp/counterwallet && grunt build --force’

I guess people aren’t using this script. Can someone PLEASE tell me the right way to install and get Counterparty / CounterWallet up and running?

1 Like

Everyone is using the script, it works fine.
I mean, this one:
https://github.com/CounterpartyXCP/federatednode_build/blob/master/run.py

You didn’t even mention which script you’re using, by the way.

If master by some chance doesn’t work, you can try the previous release, from Nov 2015:
https://raw.githubusercontent.com/CounterpartyXCP/federatednode_build/ee68199cbe94a8351b8a6862e1bc9627eb22e60f/run.py

I’m using the one on the Counterparty docs page. I think I did mention that.

Here,

http://counterparty.io/docs/federated_node/

in the section “Node Setup” which invokes these commands:

BRANCH=master
wget -q -O /tmp/fednode_run.py https://raw.github.com/CounterpartyXCP/federatednode_build/${BRANCH}/run.py
sudo python3 /tmp/fednode_run.py

As someone just trying to setup Counterparty doesn’t seem like the place where I should expect good information?

See my last post. I do not know how to fix the chksum error on this file,

Fatal error: Invalid checksum: src/vendors/keyboard/js/jquery.keyboard.min.js

And if everyone is using this then why doesn’t it work on an absolutely virgin EC2 Ubuntu 14.04 instance? Excuse me if I sound upset but I’ve been working on getting this one install script to run for hours and then you tell me it works fine.

1 Like

Remove existing run.py and try the previous release, choose to (r)ebuild:

user@ubuntu:~$ wget https://raw.githubusercontent.com/CounterpartyXCP/federatednode_build/ee68199cbe94a8351b8a6862e1bc9627eb22e60f/run.py
--2016-03-26 19:23:11--  https://raw.githubusercontent.com/CounterpartyXCP/federatednode_build/ee68199cbe94a8351b8a6862e1bc9627eb22e60f/run.py
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 103.245.222.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|103.245.222.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 54531 (53K) [text/plain]
Saving to: ‘run.py’

100%[======================================================================================================>] 54,531      --.-K/s   in 0.1s

2016-03-26 19:23:13 (498 KB/s) - ‘run.py’ saved [54531/54531]

user@ubuntu:~$ sudo python3 run.py
It appears this setup has been run already or has another instance of counterpartyd or Federated Node. (r)ebuild node, or just (U)pdate from git? (r/U): r

Or you can click on one of < > buttons on this page to pick a snapshot from earlier (say 3+ weeks ago):

Someone will take a look at the bugs soon. There have been several updates very recently, probably there are bugs in one or some of them.
The invalid checksum issue may related to Counterwallet commits (as run.py pulls code from master of Counterwallet branch and that bug may have been introduced there. In that case the script would have to be edited to pull a specific release of Counterwallet (such as recent one), not master.
For example in https://github.com/CounterpartyXCP/federatednode_build/blob/master/run.py#L744 pick an earlier version.
But you could also wait 2-3 days till all this is fixed sometime early next week.

I’m going to go offline now but for what it’s worth run.py linked here (from Nov 2015) is installing okay so far (the script is building counterblock, it’s got all RPMs already, but I don’t know if Counterwallet will fail or not).

1 Like

I had a look at the most recent commit and it does update versions on mongodb and openresty without also updating the repo name and in the case of openresty the file paths have changed. That commit is the source of these errors.

I’m installing this for a job I’m working on to be built on top of counterparty.

I’ll try backing up to an older version as you suggest and see how that works.

Thanks for your replies. At least I know this hasn’t been abandoned and I’m on the right path.

Well, if I now step backwards to an older version I probably need to ensure newer version of all these components get removed first.

1 Like

Ok. I’ll recheck the current (master) script and submit bugs tomorrow.

It’s going to take a while for Bitcoin Core to download, so you probably won’t be able to do much until 24 hours later…

I’ll check this topic again tomorrow in case you have any other question.

1 Like

I went back to this one from Dec. 2nd, 2105 because it was the last one before changes affecting mongodb and openresty.

https–link-disabled–://github.com/CounterpartyXCP/federatednode_build/blob/f7e5760e78f36d076d9ee208199e2eb63e768b6a/run.py

It seemed to install ok - though I did notice some syntax errors spit out during one phase so I wonder if some part of it didn’t get built fully.

I presume after the latest version has been fixed I should be able to run again with “U” option to update? I’d like to get updated to new bitcoin 0.12 if possible and not too much hassle.

1 Like

I pulled this from Dec 2, it installed fine (an earlier version from Nov 2015 had errors with Phantom.js):
wget https://raw.githubusercontent.com/CounterpartyXCP/federatednode_build/f6c0ec3cbc016cb490abad2f466ae1db27606bb3/run.py

Done, without errors.
2016-03-27 06:55:56,443|DEBUG: RUNNING COMMAND: chown -R xcp:xcp ~xcp/counterwallet
2016-03-27 06:55:57,083|DEBUG: RUNNING COMMAND: chmod -R u+rw,g+rw,o+r,o-w ~xcp/counterwallet
2016-03-27 06:55:57,210|DEBUG: RUNNING COMMAND: cp -a ~xcp/counterwallet/counterwallet.conf.json.example ~xcp/counterwallet/counterwallet.conf.json
2016-03-27 06:55:57,215|INFO: Counterblock Federated Node Build Complete (whew).

Maybe a newer version would work too. Next I’ll take a look at the current master and submit issues.

1 Like

You can update to new bitcoin 0.12 manually now. Also you can update all components (but take snapshots before you do).

  • Bitcoin Core 0.12: just replace the binaries. They are not hard-coded in. Just build your own or get a precompiled 0.12 binary from BTCDrak (Releases · btcdrak/bitcoin · GitHub), then use those binaries to replace the binaries you have. Remove existing binaries (or .deb if you have) and follow the steps at https://github.com/CounterpartyXCP/federatednode_build/blob/master/run.py#L278 (you can see that now in fact it is BTCDrak’s binaries that’s installed, line 286)

  • For other components, let’s say counterblock, for example, you could update those outside of Fed Node script as well, but it’s a bit trickier. Because all run as the xcp user, you need to do something like sudo su -s /bin/bash -c 'pip3 update counterparty-lib' xcpd (I haven’t tried recently, but I’m basing this on the command used to issue commands to counterparty-server (sudo su -s /bin/bash -c 'counterparty-server reparse' xcpd) when you use Federated Node. You’d have to stop counterparty-server before updating it, using the usual commands from the docs. Again, take a snapshot before you try these creative things and reference the steps that run.py contains.

Edit: there’s a pull request for develop branch of Fed Node repo that appears to work okay (at least for me). But if your system is working now, I wouldn’t rebuild it with this before it’s checked by others.

2 Likes

Thanks for your help and suggestions.

I’m currently just waiting on the blockchain catching up. I guess I should have started initially on an m4.large. That probably would have gone quicker with the extra cpu core. I’m on m3.medium for now. I could snapshot it and start from a new AMI and continue but I think I’ll just let it go. I have other stuff to work on anyway.

I’ll get around to updating later in the week so maybe any bugs will be worked out by then. I’ll just check the commit history before I do.

Cheers.

1 Like