Unable to deploy a ruby application in Cloudfoundry - ruby

I have the application ready
but when I am deploying I am facing an error
deployment facing error in heroku and cloud foundry
gems used are: event_calender
authlogic
error in : cloud foundry
wafuser#wafuser-VirtualBox:~/Documents/backups/backupnew/ecommerce$ vmc push
Would you like to deploy from the current directory? [Yn]: y
Application Name: shiva108
Detected a Rails Application, is this correct? [Yn]: y
Application Deployed URL [shiva108.cloudfoundry.com]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [256M]:
How many instances? [1]: 1
Create services to bind to 'shiva108'? [yN]: y
1: mongodb
2: mysql
3: postgresql
4: rabbitmq
5: redis
What kind of service?: 2
Specify the name of the service [mysql-ceaf3]:
Create another? [yN]: n
Would you like to save this configuration? [yN]: n
Creating Application: OK
Creating Service [mysql-ceaf3]: OK
Binding Service [mysql-ceaf3]: OK
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (192K): OK
Push Status: OK
Staging Application 'shiva108': OK
Starting Application 'shiva108': .
Error: Application [shiva108] failed to start, logs information below.
====> /logs/migration.log <====
Can anyone suggest a solution for my problem

Try using the following command:
vmc logs <app-name>
This will give you the logs you need.

Try using this commnd:
Heroku:
$ heroku logs
Cloud Foundry:
$ vmc files shiva108 logs/stderr.log

Related

Laravel AWS Elastic Beanslack deployment error- Out of memory error

I deployed my Application in AWS Elastic Beanslack. Intially I deployed my application directly in Aws console. After configuring all the things. I zipped my code and upload it in a console. At that time its working perfect.
But now I tried to deploy with cli, its shows error. I put eb deploy command
Creating application version archive "app-xxxxxxxxx".
Uploading: [##################################################] 100% Done...
2020-03-14 18:51:49 INFO Environment update is starting.
2020-03-14 18:51:55 INFO Deploying new version to instance(s).
2020-03-14 18:52:22 ERROR [Instance: i-xxxxxxxxx] Command failed on instance. Return code: 255 Output: (TRUNCATED)...ar/src/Composer/DependencyResolver/GenericRule.php on line 36
Fatal error: Out of memory (allocated 809508864) (tried to allocate 8192 bytes) in phar:///opt/elasticbeanstalk/support/composer.phar/src/Composer/DependencyResolver/GenericRule.php on line 36.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_composer_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2020-03-14 18:52:22 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2020-03-14 18:52:22 ERROR Unsuccessful command execution on instance id(s) 'i-xxxxxxxxx'. Aborting the operation.
2020-03-14 18:52:23 ERROR Failed to deploy application.
From Internet I tried these all these things
1) I extended memory in php.ini but still its not working
2) I created ebextensions folder and do some configurations but thats also not working
My guess was Initially I deployed manually, so at that time I zipped with vendor folder also. Now when I tried with cli it wont take vendor folder. Instead of its by using composer install
So I think I'm facing this issues due to these things
Please let us know, If any other thing I want to do
This is a configuration inside de ElasticBeanstalk Environment.
To increase de memory limit:
Access the Elastic Beanstalk section
Open to your environment
Go to Configuration , then Software
Find the Memory limit field. The default value is 1024M.
Update the value to what you want
Apply the change
Redeploy your application
When deploy with ElasticBeanstalk (ELB) we should check Environment. With memory_limit, you can config this in Software tab (Configuration)
Follow:
Access the ELB
Open to your environment
Go to Configuration , then Software tab
Find the Memory limit field.
Change the value for what you want
Redeploy

Deploy API REST IBM Hyperledger Composer Blockchain

I'm developing a POC over IBM HyperLedger Blockchain. I have a business network developed and deployed in IBM Cloud. I can generate a working local API REST, but cannot make it work on cloud, on the deployed IP.
I'm following this guide:
https://ibm-blockchain.github.io/interacting/
You just have to execute the following command:
./create/create_composer-rest-server.sh --business-network-card MY_BIZNET_CARD_NAME
But it doesn't deploy anything, and get the following (more related to kubernetes than blockchain).
Preparing yaml file for create composer-rest-server
Creating composer-rest-server pod
Running: kubectl create -f /Users/sm/jsblock/ibm-container-service/cs-offerings/scripts/../kube-configs/composer-rest-server.yaml
The connection to the server localhost:8080 was refused - did you specify the right host or port?
the server doesn't have a resource type "svc"
Creating composer-rest-server service
Running: kubectl create -f /Users/sm/jsblock/ibm-container-service/cs-offerings/scripts/../kube-configs/composer-rest-server-services-free.yaml
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Composer rest server created successfully
Any ideas? Thanks too much.
You need to ensure you have a correct kube config setup. Step 10 in https://ibm-blockchain.github.io/setup/ provides the details to set up KUBECONFIG as the error suggests that either it is not configured or not configured correctly.
The document you refer to https://ibm-blockchain.github.io/interacting/ is being updated and should be available soon.
When you run the command ./create/create_composer-rest-server.sh --business-network-card MY_BIZNET_CARD_NAME - should be the name of the Network Admin for the network you deployed, NOT the PeerAdmin card so it will be something like ./create/create_composer-rest-server.sh --business-network-card admin#perishable-network
Look like it's an issue of acceess control. You should make sure again you are running with Local Admin configuration.it will help you to run queries

Running dropwizard 1.1.2 on heroku

I have a dropwizard 1.1.2 application that works ok locally. I try to deploy this to heroku and I read that I need to override the ports values to be provided by heroku in the Procfile, something like the following:
web: java $JAVA_OPTS -Ddw.http.port=$PORT -Ddw.http.adminPort=$PORT -jar target/My_Website-1.0-SNAPSHOT.jar server target/classes/app.yml
This however is for older versions of Dropwizard and I am unable to find documentation for Dropwizard 1.1.2 working with heroku. If I don't provide the port information, heroku app starts, then crashes with the following message:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
What would be the correct Procfile and config.yml contents for using Dropwizard 1.1.2 with heroku? Thanks
I figured out. You need to pass only -Ddw.server.applicationConnectors[0].port=$PORT and not -Ddw.server.adminConnectors[0].port=$PORT in the Procfile

default fabric8 microservice errors out on integration test - Waiting for container:spring-boot. Reason:CrashLoopBackOff

Deployed fabric8 in Google Container Engine with 12 core 45GB RAM. Used gofabric8 0.4.69 for deploying fabric8 on GCE.
Tried to create a microservice, but it is failing in integration testing phase throwing the following error "Waiting for container:spring-boot. Reason:CrashLoopBackOff"
Please help to resolve this.
Which quickstart were you trying?
It sounds like the application terminated. I wonder if this shows any output:
kubectl get pod
kubectl logs nameofpod
where nameofpod is the pod that is crashing.
BTW the new fabric8-maven-plugin version (3.1.45 or later) now has a nicer fabric8:run goal.
If you clone the git repository to your local file system and update the version of fabric8-maven-plugin you should be able to run it via:
mvn fabric8:run
Then you get to see the output of the spring app in your console to see if something fails etc.

Issue deploying Spring GS Rest Service to Cloud Foundry

I imported the "Spring Getting Started - Rest Service" as a new project into Spring Tools. Works fine locally. After building the JAR with mvn clean package and editing the manifest.yml to correctly point to the JAR location I've tried to deploy this project to Cloud Foundry. The project deploys fine but fails shortly after starting with the following error.
Instance (index 0) failed to start accepting connections
App instance exited with guid 96f2fbd0-aaa3-48aa-9181-55abf624c626 payload:
{
"cc_partition"=>"default",
"droplet"=>"96f2fbd0-aaa3-48aa-9181-55abf624c626",
"version"=>"9ee684a6-7d62-4f45-9481-97d4e87c3895",
"instance"=>"db08e1b5fba44d938f4904ae4c921878",
"index"=>0,
"reason"=>"CRASHED",
"exit_status"=>-1,
"exit_description"=>"failed to accept connections within health check timeout",
"crash_timestamp"=>1439875540
}
Try to:
increase timeout by calling cf push -t 180
set server port to 8080 in cloud profile
or change health-check-type inside the manifest.yml:
---
applications:
- name: ...
health-check-type: process

Resources