Unable to to deploy a Rails 5 VueJS app on ElasticBeanstalk - ruby-on-rails

I'm trying to deploy a VueJS rails 5 app onto ElasticBeanstalk, I run into a command failed error on the EB instance when I try to.
I've tried a few suggestions like regenerating lock files but can't get past the error shown below:
Command failed on instance. Return code: 1 Output: (TRUNCATED)...lation.
error #nuxt/opencollective#0.3.0: The engine "node" is incompatible with
this module. Expected version ">=8.0.0". Got "6.17.1" error Found
incompatible module. info Visit https://yarnpkg.com/en/docs/cli/install
for documentation about this command.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/09_yarn_install.sh failed.
For more detail, check /var/log/eb-activity.log using console or EB CLI.
What's happening here, and how can I get the deployment to work?
Thanks

The answer to this is that EBS uses a super old version of NodeJS like 6.X.
You'll need to add in your /.ebextensions some commands to remove the old and update. Below is part of a code I found that is specific towards upgrading NodeJS
# .ebextensions/fix_rails_6.config
commands:
00_remove_node_6_if_present:
command: "/bin/rm -rf /var/cache/yum && /usr/bin/yum remove -y nodejs && /bin/rm /etc/yum.repos.d/nodesource* && /usr/bin/yum clean all && rm -rf /var/cache/yum"
ignoreErrors: true
01_download_nodejs:
command: "curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -"
02_install_nodejs:
command: "yum -y install nodejs"

Related

Error: failed to request identity. Error trying to enroll user and return certificates

I am biginner in block chain development. I succesfully run ./startFabric.sh and ./createPeerAdminCard.sh .Then i succesfully run two command as follow below.
composer runtime install -c PeerAdmin#byfn-network-org1-only -n trade-network
composer runtime install -c PeerAdmin#byfn-network-org2-only -n trade-network
Then i tried to run
composer identity request -c PeerAdmin#byfn-network-org1-only -u admin -s adminpw -d alice
But i got error like the following
Error: failed to request identity. Error trying to enroll user and return certificates. Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]
I tried many time to kill all process in docker and remove .composer file from home directory. But always showing the same error message.
Please help me as possible
Os: Ubuntu 16.04
Fabric vertion:1.0.4
Composer vertion:0.16.6
Thanks..
This error "Failed to import the business network card Connection profile has no x-type property defined." means that a v0.20 client can't/won't import a card from an earlier version (probably v0.16).
I think maybe you are running the wrong version of createPeerAdminCard.sh script and it is trying to create and import an 'old' card.
With Composer v0.20 you need to get 'new' copies of the fabric-development-servers scripts which work with Fabric 1.2.
So I would suggest running the following:
run teardownAllDocker.sh script
remove the fabric-dev-server folder (might be fabric-tools if old)
remove the ~/.composer folder
follow the install doc from Step 4 . - make sure to export FABRIC_VERSION=hlfv12 - this is what makes sure you get Fabric 1.2.
This is difficult to help ...
The first 2 scripts you have run (./startFabric.sh and ./createPeerAdminCard.sh) are for a basic development Fabric.
The next 2 commands look like they are from the Multi-Org tutorial which uses a different Fabric and has different cards and crypto material.
Unless there is a particular reason for using an old version of Composer, I would suggest using Composer v0.20, which requires Fabric 1.2.
If you are a beginner I would suggest working with the Developer Tutorial to start with.
if you are using a default file (e.g. connection.json, env.json, etc.) to hold your base connnection profile, simply change the "type" term in that default file to "x-type"
In converting from v0.16 to v0.20, you must first remove the v0.16 composer tools from your system, then install the v0.20 version.
To remove v0.16.6:
npm uninstall -g composer-cli
npm uninstall -g generator-hyperledger-composer
npm uninstall -g composer-rest-server
To install V0.20.2:
npm install -g --python=python2.7 composer-cli#0.20.2
npm install -g --python=python2.7 generator-hyperledger-composer#0.20.2
npm install -g --python=python2.7 composer-rest-server#0.20.2
npm install -g --python=python2.7 yo
If you're running nodejs, then you also have to update both package.json files (network/package/json as well as your {base folder}package.json) from 0.16.x to ^0.20.2
The reason for error is Missing of Certificate Authorities(CA). I Just up my CA server. Now Working perfectly.

How do I solve this error installing Canvas LMS using Docker and quickstart?

I am trying to use the Quick Start guide from Instructure to install Canvas LMS locally on my Mac (https://github.com/instructure/canvas-lms/wiki/Quick-Start).
The script fails at step 23 - see below. The point of the script is to automate everything, so I don't know how serious this is...I obviously googled the errors and didn't find anything conclusive. Maybe a memory problem (lack of memory)?
Help appreciated...
Step 23/28 : RUN bundle install --jobs 8 && yarn install --pure-lockfile
---> Running in ff461afd0818
/home/docker/.gem/ruby/2.4.0/bin/bundle:23:in `load': cannot load such file -- /usr/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle (LoadError)
from /home/docker/.gem/ruby/2.4.0/bin/bundle:23:in `<main>'
ERROR: Service 'webpack' failed to build: The command '/bin/sh -c bundle install --jobs 8 && yarn install --pure-lockfile' returned a non-zero code: 1
Andrew-MBP:script ajmccann$
I had the same issue. I got a little further after I read this. I added:
USER root
RUN mkdir -p /usr/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/
RUN ln -s /var/lib/gems/2.4.0/gems/bundler-1.16.1/exe/bundle /usr/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/
to the Dockerfile a couple of lines above where you get that error.

E: Unable to locate package heroku-toolbelt

I am trying to install the Heroku Toolbelt on Linux Mint 15 Olivia (x86-64)
When i try to run the standard command for installing on Debian machines:
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
I get:
W: Failed to fetch http://toolbelt.heroku.com/ubuntu/./Packages 302 Moved Temporarily [IP: 23.21.198.2 80]
...
E: Unable to locate package heroku-toolbelt
I have also got the heroku.list repo in my etc/apt/sources/:
deb http://toolbelt.heroku.com/ubuntu ./
When i try to add the repo again with:
sudo apt-add-repository 'deb http://toolbelt.herokuapp.com/ubuntu ./'
I get:
Cannot add PPA: 'No JSON object could be decoded'.
And it seems i'm not the first person with this error on Mint 15 while trying to add repositories.
I suspect this issue may indeed be temporary, but if you need the heroku toolbelt installed now, you can install the standalone client instead of the ubuntu/debian bundle.
wget -qO- https://toolbelt.heroku.com/install.sh | sh
On an Ubuntu-based distro, however, the above will likely throw some errors:
sh: 7: [[: not found
sh: 29: [[: not found
Installation complete
This is because on Ubuntu systems /bin/sh is dash, not bash. You could either get the script and modify it to use bash instead of sh (sh is called within the script, just changing sh to bash in the command above won't suffice), or, you could ignore the errors and just do what the error-ing portion of the script instructs you to do:
Add the Heroku CLI to your PATH using:
echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.profile
You'll need to logout/login again to register the path addition, or just execute heroku directly in the mean time:
/usr/local/heroku/bin/heroku

jenkins fails to install with no error on debian 7

i'm trying to get jenkins running on debian 7 but i keep getting this error while apt-get install jenkins is running.
Setting up dbus (1.6.8-1) ...
Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[ ok ] Starting system message bus: dbus.
Also i get the message that jenkins is started at the end and no error message:
[ ok ] Starting Jenkins Continuous Integration Server: jenkins.
but /etc/init.d/jenkins status gives me the output that jenkins is not running. also ls -alh /var/lib/jenkins gives me an empty folder.
So the install fails with no error.
This is the way i'm running the install:
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add -
sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
apt-get update
apt-get install jenkins
Has anyone of you tried installing jenkins on a fresh debian 7?
looking forward for helping answers.
kind regards and thanks in advance
So i solved the problem finally.
I expected the Java SDK to have the right JRE in it, so i downloaded it from the Oracle website: jdk1.7.0_21-x64-linux.tar.gz after installing and registering this to my machine it worked java -version and javac -version.
Problem was the version of this JRE did not work with Jenkins so thanks to #wako, i installed openjdk-7-jre and i have now two jre's running on my machine but jenkins started finally. need to figure out if openjdk-7-jre suits my plans or if i need to fall back to Debian 6.
This is an issue with apt-get and not with Jenkins -
please make sure you run it as root.
Can try to install (or upgrade) another package, to confirm.
I had the same problem on the debian 7 freshly installed, via the light version of debian 7 with the ssh server only installed.
First I add the repository as you specified it, try to install jenkins but some dependencies were broken (daemon-psmisc-java2-runtime).
To solve the problem I did an:
apt-get -f upgrade
And it was OK
To complete the installation of jenkins you will need apache2 and java-jre
apt-get install apache2 openjdk-7-jre

Rabbit MQ fails to start

I have finished installing RabbitMQ using the following RPM
http://www.rabbitmq.com/releases/rabbitmq-server/v2.7.1/rabbitmq-server-2.7.1-1.noarch.rpm
i installed it like so :
$ wget \ http://www.rabbitmq.com/releases/rabbitmq-server/v2.7.1/rabbitmq-server-2.7.1-1.noarch.rpm
$ rpm --nodeps -Uvh rabbitmq-server-2.7.1-1.noarch.rpm
the reason i used --nodeps was because i installed erlang from source and the rpm will try looking for an erlang.rpm dependency ignoring the one on the system.
When i try to start the Rabbit MQ server i get this error :
/usr/lib/rabbitmq/bin/rabbitmq-server: line 73: /var/lib/rabbitmq/mnesia/rabbit#
vz129.pid: Permission denied
{"init terminating in do_boot",{undef,[{rabbit_prelaunch,start,[]},{init,start_i
t,1},{init,start_em,1}]}}
Im using CentOS release 4.9 (Final).
Any help is appreciated.
It seems like it was a permissions error. all i did was run :
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
and it worked :D

Resources