Backstage Heroku Deployment - heroku

WHy am I keep getting this error.
Backend failed to start up, Error: Failed to connect to the database to make sure that 'backstage_plugin_catalog' exists, Error: connect ECONNREFUSED 127.0.0.1:5432

Try to start your postgres-database with the environment variable POSTGRES_DB=backstage_plugin_catalog.
Also, check the credentials for postgres.

Related

Receiving Invalid database URL while trying to start chainlink node

I am trying to start a chainlink node in rinkeby testnet.I have setup a postgres DB in AWS. The Database URL is already given. Below is the error while i am trying to start the node.
[ERROR] invalid database url %spostgresql://postgres:Bounty2000%#database-1.ciiecd8szsuh.us-west-1.rd
s.amazonaws.com:5432/db_sar_rinkeby orm/config.go:283
[ERROR] failed to initialize database, got error failed to connect to `host=/tmp user=root database=`
: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory) orm/orm.go:82
[ERROR] failed to initialize database, got error failed to connect to `host=/tmp user=root database=`
: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory) orm/orm.go:82
I tried changing few settings from AWS front but nothing helped.. If anyone have any clue pls help me up.
Based on the documentation it looks like there may be an "s" in front of your postgres URL, try removing that in your .env file. Also try replacing the database name with the IP address+Port. What should replace $DATABASE is "postgres". Finally try adding in ?sslmode=disable if you don't have ssl activated at the database (not recommended for a production node).
Example in .env:
DATABASE_URL=postgresql://me1234:password1234#10.10.100.100:3000/postgres?sslmode=disable

Connection to [name of the host name] failed. Host [name of the host name] is unknown. [08001] The connection attempt failed

I am trying to connect datagrip to my remote heroku postgres database but it doesn't connect
Connection to jdbc:postgresql://ec2-54-235-156-60.compute-1.amazonaws.com :5432/d89oi6u1v8vmmo failed.
Host ec2-54-235-156-60.compute-1.amazonaws.com is unknown.
[08001] The connection attempt failed.
I read heroku needs ssl so i provided here
I found the answer. The problem was the whitespace between ".com and :". I removed it. It again showed error as
The SSLSocketFactory class provided org.postgresql.ssl.NonValidatingFactory could not be instantiated
I tested it again it started working

greenplum initialization failed

When I tried to initialize Greenplum I got the following error
20180408:23:21:02:017614 gpstop:datanode3:root-[INFO]:-Starting gpstop with args:
20180408:23:21:02:017614 gpstop:datanode3:root-[INFO]:-Gathering information and validating the environment...
20180408:23:21:02:017614 gpstop:datanode3:root-[ERROR]:-gpstop error: postmaster.pid file does not exist. is Greenplum instance already stopped?
also when i tried to check gpstate command i got the following error
20180408:23:21:48:017711 gpstate:datanode3:root-[INFO]:-Starting gpstate with args:
20180408:23:21:48:017711 gpstate:datanode3:root-[INFO]:-local Greenplum Version: 'postgres (Greenplum Database) 5.7.0 build f7c6eb5-oss'
20180408:23:21:48:017711 gpstate:datanode3:root-[CRITICAL]:-gpstate failed. (Reason='could not connect to server: Connection refused
I also did the configuration an add a permission on PostgreSQL.conf, but the same issue
You have pasted the output of gpstop.
gpstop error: postmaster.pid file does not exist. is Greenplum
instance already stopped?
Which means that the database is not running.

Unable to connect to Heroku Postgres from Play 2.3

I have a Play 2.3 app in Java. For this app, I am able to connect to local Postgres server.
But I am unable to connect to Heroku Postgres server.
I have following settings in my application.conf:
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://ec2test.amazonaws.com:5432/rwerwerwer"
db.default.user=eerwerwerer
db.default.password="5345fdwfdsvfvsdfsdfds"
I am getting following error:
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for ho
st "172.56.17.147", user "eerwerwerer", database "rwerwerwer", SSL off
From PgAdim III, I am able to successful connect to Heroku database.
While adding heroku config, I got:
**! No app specified.**
Follow these steps.
Things to remember:
Use Heroku commands from inside your main directory.
Use database connection as:
db.default.driver=org.postgresql.Driver
db.default.url=${?DATABASE_URL}
No need for username and password.
No need for Procfile.

mongo as service error: Cannot determine state of server

I am trying to use mongodb as a service and started with heroku services ie dashboard.heroku.com/apps/scaleqamongo/resources. I tried multiple addons which they call like mongolab, mongohq. I create databases and then try to add that service address into my app as
db: 'mongodb://username:password#candidate.19.mongolayer.com:10292,candidate.18.mongolayer.com:10292/app25406086',
but it gives me error
Error: Cannot determine state of server
Error: No replica set primary available for query with ReadPreference PRIMARY
at ReplSet.checkoutReader (/prod/app/dashboard/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/repl_set/repl_set.js:585:14)
at Cursor.nextObject (/prod/app/dashboard/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:723:48)
at Cursor.nextObject (/prod/app/dashboard/node_modules/mongoose/node_modules/mongodb/lib/mongodb/scope.js:22:20)
at Collection.findOne (/prod/app/dashboard/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection/query.js:157:10)
at /prod/app/dashboard/node_modules/connect-mongo/lib/connect-mongo.js:214:18
at MongoStore._get_collection (/prod/app/dashboard/node_modules/connect-mongo/lib/connect-mongo.js:148:21)
at MongoStore.get (/prod/app/dashboard/node_modules/connect-mongo/lib/connect-mongo.js:213:10)
at Object.session [as handle] (/prod/app/dashboard/node_modules/express/node_modules/connect/lib/middleware/session.js:311:11)
at next (/prod/app/dashboard/node_modules/express/node_modules/connect/lib/proto.js:193:15)
at Object.methodOverride [as handle] (/prod/app/dashboard/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:48:5)
While I am able to connect to the database using the shell command
mongo candidate.19.mongolayer.com:10292/app25406086 -u username -p password
What is the problem? Why am I not able to connect?
This is an intermittent error which got appeared for some time after I started the server but disappeared later on.

Resources