Meteor UP : Verifying development failed - amazon-web-services

Im getting following error when trying to deploy my meteor application in AWS.
I have selected ubuntu as my operating system with 30 Gb of HDD. i have attached my mup.json file and snap of cmd response .
My mup.json is :
{
// Server authentication info
"servers": [
{
"host": "ec2-XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.compute.amazonaws.com",
"username": "ubuntu",
//"password": "password"
// or pem file (ssh based authentication)
"pem": "D:/abcUbuntu.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.36",
// Install PhantomJS in the server
"setupPhantom": true,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "Qxmedics",
// Location of app (local directory)
"app": "D:/abc/version1",
// Configure environment
"env": {
"PORT":80,
"ROOT_URL": "ec2-XXXXXXXXXXXXXXXXXXXXX.compute.amazonaws.com",
"MONGO_URL": "mongodb://localhost:27017/meteor"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
I tried alot... please help me out with this thanks.

For me the solution was making the wait time 45. If the rest is correct, it should confirm and deploy.
"deployCheckWaitTime": 45
It says there is a problem with your URL so, make sure it is a correct one with http or https.

Related

Connecting to Google Cloud PostgresSQL Server for local Strapi Application

I have a Google cloud Postgres server set up, and under the production environment I am able to connect to the server correctly. However, when I try to connect to the same cloud server in my local server, it doesn't seem to work. Here's the configuration for my database.js
module.exports = ({ env }) => {
return {
defaultConnection: "default",
connections: {
default: {
connector: "bookshelf",
settings: {
client: "postgres",
host: `/cloudsql/${env("INSTANCE_CONNECTION_NAME")}`,
database: env("DATABASE_NAME"),
username: env("DATABASE_USERNAME"),
password: env("DATABASE_PASSWORD"),
},
options: {},
},
},
};
};
I also have the app.yaml set up as normal. I have also created the .env file to store the relevant env information.
The error I am getting is
error Error: connect ENOENT /cloudsql/my-app-286221:us-central1:blm-resources/.s.PGSQL.5432
Does Strapi in local development support connection to cloud database? Or am I doing something wrong here.
This shouldn’t be a strapi issue. First you need to have an access from outside to google cloud postgres database. I’m not familiar with google cloud services, but from documentation there seem to be a couple of things to do to grant access to database.
More info from documentation:
https://cloud.google.com/sql/docs/postgres/connect-external-app#appaccessIP
Basically you grant access for connection from outside and then you add that connection information to your strapi config file.
I noticed your host: is not pointing to http:// or https:// but to some google server’s local address.

CF : ERR Failed to make TCP connection to port 8080: connection refused

So, I have recently started using CF and am using the same to publish a nodejs app to my cf space.
As suggested in the CF wiki, I have used the nodejs_buildpack to
build my app so that can be run via CF PaaS.
Although I don't need this if I push my own cached
node_modules dependency folder in the CF Space , please correct me if I am wrong ?
Following screenshots represent the output of cf push ,
Output of : CF logs STARS --recent
manifest.yml
---
applications:
- name: STARS
buildpack: nodejs_buildpack
memory: 256m
disk_quota: 512MB
instances: 1
command: npm run build
I don't understand why 8080 fails as this works like charm on my machine. i.e. localhost:8080
I do set the express in the following way though,
app.set('port', process.env.PORT || 8080);
// set up listening
app.listen(port, function (err) {
if (err) {
console.log(err)
} else {
opn('http://localhost:' + app.get('port'))
}
})
--Update--
As suggested by #K.AJ in the answer below I have tried to increase the memory limit in my manifest from 256 to 512 and you know what it started working. :)
But its a little strange that the allocation 179.4M in memory and 206.1M on disk is present. Looks like the addition of these two is considered in the deployment process.
My updated configuration is ,
app.set('port', process.env.PORT || 8080);
In the above statement, the port is 8080, only when running locally.
On cloud platforms like PCF, you have no control on which port an app will be running.
If you look closely to the error message, your app is crashing due to out of memory error. The 256MB memory is not enough for it. Try setting it to 1GB first, get it working and then optimize it.
Assuming, you have successfully deployed your app, run cf apps. It should list you the deployed apps along with the route.
Copy the route url for your app and run it in browser. You should be able to see your app, provided your app instance is healthy and in running state.
Please go through documentation on PCF
https://docs.pivotal.io
https://docs.pivotal.io/pivotalcf/2-3/devguide/index.html
https://docs.pivotal.io/pivotalcf/2-3/devguide/index.html#deploy

x509: ECDSA verification failure

I have to install a bna file on fabric . I am following the link https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-single-org.html . However when I run the command: composer runtime install -c PeerAdmin#fabric-network -n tutorial-network
I am getting the error :
Error: Error trying install composer runtime. Error: No valid
responses from any peers.
Response from attempted peer comms was an error:
Error: Failed to deserialize creator identity, err The supplied
identity is not valid, Verify() returned x509: certificate signed by
unknown authority (possibly because of "x509: ECDSA verification
failure" while trying to verify candidate authority certificate
"ca.org1.example.com").
Any help on this please
sounds like you have made an error in following the tutorial (which definitely works). Are you sure the MSP id (Org1MSP) for the peer has been setup correctly ? Have you checked that the peer has successfully joined the channel (when the Fabric was started)? Have you done a docker ps to see your Fabric docker containers are running?) Assuming you followed the steps correct and using an identity you have obtained from a fabric-ca server (per the tutorial), have you checked the fabric-ca server is running correctly (docker logs ? Also, is it possible you're restarted your Fabric docker environment at one point and now your old key information is invalid?
eg
{
"name": "fabric-network",
"type": "hlfv1",
"mspID": "Org1MSP",
"peers": [
{
"requestURL": "grpc://localhost:7051",
"eventURL": "grpc://localhost:7053"
}
],
"ca": {
"url": "http://localhost:7054",
"name": "ca.org1.example.com"
},
"orderers": [
{
"url" : "grpc://localhost:7050"
}
],
"channel": "composerchannel",
"timeout": 300
}
then re-create the card with the correct key/signcert info
composer card create -p connection.json -u PeerAdmin -c Admin#org1.example.com-cert.pem -k xxxxx_sk -r PeerAdmin -r ChannelAdmin
where the .pem file comes from signcerts directory and xxxxx is the generated value for the key filename in keystore.

Mup setup/deploy error when using meteor-up

I want to deploy my website using meteor-up. I want to deploy it to a EC2 instance on AWS. I have created my mup.json file and configured it as follows:
{
// Server authentication info
"servers": [
{
"host": "ec2-52-24-95-147.us-west-2.compute.amazonaws.com",
"username": "ubuntu",
//"password": "password"
// or pem file (ssh based authentication)
"pem": "C:/Users/username/meteor.pem"
}
],
// Install MongoDB in the server, does not destroy local MongoDB on future setup
"setupMongo": true,
// WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
"setupNode": true,
// WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
"nodeVersion": "0.10.35",
// Install PhantomJS in the server
"setupPhantom": false,
// Show a progress bar during the upload of the bundle to the server.
// Might cause an error in some rare cases if set to true, for instance in Shippable CI
"enableUploadProgressBar": true,
// Application name (No spaces)
"appName": "Homepage",
// Location of app (local directory)
"app": "C:/website",
// Configure environment
"env": {
"ROOT_URL": "ec2-52-24-95-147.us-west-2.compute.amazonaws.com",
"PORT": 80,
"METEOR_ENV": "production"
},
// Meteor Up checks if the app comes online just after the deployment
// before mup checks that, it will wait for no. of seconds configured below
"deployCheckWaitTime": 15
}
Unfortunately this is not working and I am getting the following error:
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT {public IP from AWS}:22
at Object.exports._errnoExcpetion (util.js:837:11)
at exports._excpetionWithHostPort (util.js:860:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
Per the https://github.com/arunoda/meteor-up, try setting the DEBUG environment variable:
Verbose Output
If you need to see the output of meteor-up (to see more precisely where it's failing or hanging, for example), run it like so:
DEBUG=* mup <command>
where is one of the mup commands such as setup, deploy, etc.

How to setup a proxy inside Grunt.js based ember-app-kit?

I need a proxy to interact with some external APIs during development. I fumbled around with grunt-connect-proxy, but beeing a Grunt noobie, i failed getting it to work inside ember-app-kit's Gruntfile or options/connect.js file.
Assuming that needing a proxy in development would be a rather common task, can somebody show an example of how to setup a proxy inside ember-app-kit?
Assuming you have installed grunt-connect-proxy (npm install grunt-connect-proxy --save-dev)
In Gruntfile.js add 'configureProxies' before 'connect:server' in the test:server and server tasks
grunt.registerTask('server', "Run your server in development mode, auto-rebuilding when files change.",
['build:debug', 'configureProxies', 'connect:server', 'watch:main']);
Add the following to taskRequirements in tasks/helpers.js
'connectProxy': ['grunt-connect-proxy']
In tasks/options/connect.js add the proxy settings on the same level as your server settings
// example settings to proxy to a dev server
proxies: [{
context: '/api',
host: 'localhost',
port: 7000,
changeOrigin: true,
rejectUnauthorized: false
}],
In the same file, add the following to require the proxyRequest in the middleware function
if (Helpers.isPackageAvailable("grunt-connect-proxy")) {
result.splice(1,0, require("grunt-connect-proxy/lib/utils").proxyRequest);
}
See https://gist.github.com/jfranz/7034552 for a more complete example.