`Invalid format for configuration file` when trying to connect to a local orientdb database - orientdb

I'm running Ubuntu 16.04 and have all the orientdb relevant files in /opt/orientdb.
So, first I open a console and run sudo bash /opt/orientdb/bin/server.sh, which works fine.
Then i open a separate console and try to sudo bash /opt/orientdb/bin/console.sh, which works fine as well.
And then from the console I try to connect plocal:/opt/orientdb/databases/VehicleHistoryGraph user password and get an error:
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Cannot open database 'VehicleHistoryGraph'
Error: com.orientechnologies.orient.core.exception.OStorageException: Invalid format for configuration file /opt/orientdb/bin/../databases/VehicleHistoryGraph/database.ocf for storageVehicleHistoryGraph
Is there a way for me to fix the configuration file?
ETA: downloading and unzipping a public database over the version that I had didn't fix the issue.
ETA: GratefulDeadConcerts and Tolkien-Arda work just fine.

Related

Installing PostgreSQL is creating empty data folder

I'm trying to install PostgreSQL form ToolShed on my windows machine.
Everytime I run the intaller as admin it fails with errors.
Failed to load SQL modules into the database cluster.
Problem running post-install step. Installation may not complete correctly
Error reading file C:/Program Files/PostgreSQL/11/data/postgresql.conf
I see the C:/Program Files/PostgreSQL/11/data folder is empty.
So I execute initdb, which is loading data folder with some files
and try to start server using
pg_ctl -D C:/Program Files/PostgreSQL/11/data -l logfile start
I get below error.
waiting for server to start....Access is denied.
stopped waiting
pg_ctl: could not start server
Tried v11/13/15 same issue with all of them.
Thanks

Unable to connect to server postgresql error

I am not able to connect to postgresql server. The connection was working fine till yesterday, but since today morning I am having this issue. I installed postgres using homebrew, and have already uninstalled and reinstalled it. Below is the screenshot from pgAdmin 4:
I am not able to find postgresql.conf and pg_hba.conf as multiple solutions suggested to change listen_addresses. I see that postgresql is installed, this is the location: /opt/homebrew/Cellar/postgresql#14. I have tried solutions from:
How can I start PostgreSQL server on Mac OS X?
but almost for all commands I am getting the error:
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
If I try to change the location in command(https://stackoverflow.com/questions/7975556/how-can-i-start-postgresql-server-on-mac-os-x#:~:text=I%20start%20the-,PostgreSQL,-server%3F) to start the server, I get the error: pg_ctl: directory "/opt/homebrew/postgres_db_cluster" does not exist.
The worst part is that it was working all good till yesterday.
Any help is appreciated.
Edit 1: As suggested in comments , I followed the steps from https://wiki.postgresql.org/wiki/Homebrew, but still getting the error.
Step 1: brew services restart postgresql#14
==> Successfully stopped postgresql#14 (label: homebrew.mxcl.postgresql#14)
==> Successfully started postgresql#14 (label: homebrew.mxcl.postgresql#14)
Step 2: psql postgrespsql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
Edit 2:
I tried the first step from this solution: https://stackoverflow.com/questions/7975556/how-can-i-start-postgresql-server-on-mac-os-x?rq=1#:~:text=on%20port%205432%3F-,Update,-3%3A
below is the result:
abhinash.kumar# ~ % pg_ctl -D /usr/local/var/postgres status
pg_ctl: directory "/usr/local/var/postgres" is not a database cluster directory.
also, the link mentions a file pg_hba.conf.sample, but I cannot find that in my system.
Edit 3: Starting postgres server using homebrew
abhinash.kumar# ~ % brew services start postgresql#14
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/abhinash.kumar/Library/LaunchAgents/homebrew.mxcl.postgresql#14.plist` exited with 5.
continues to throw errors.
Thanks to https://stackoverflow.com/users/7070613/adrian-klaver, the problem is now fixed.
I uninstalled postgres, and reinstalled using homebrew. In addition, I ran this command:
initdb -D /usr/local/var/postgres/.
and this fixed the issue, and I am able to create the db connection using pgAdmin 4.

Trying to create a database in PSQL from the command line

I have been trying to create a simple test database from my terminal by running the command 'createdb test'. I installed PostgreSQL using brew on my Mac OS. I have attached an image of the error message I get. I also tried adjusting the pg_hba.conf file using nano from my terminal but that didn't work.

PostgreSQL installation "Problem running post-install step. Installation may not complete correctly. The database cluster initialisation failed"

I recently uninstalled PostgreSQL 14.2 from my windows 10 computer. When I attempted to reinstall I run into the error: Problem running post-install step. Installation may not complete correctly. The database cluster initialisation failed.
On the install log I find this error:
Executing batch file 'rad27DAB.bat'...
initdb: error: The program "postgres" was found by "C:/Program Files/PostgreSQL/14/bin/initdb.exe"
but was not the same version as initdb.
Check your installation.
Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdb
However checking initdb.exe -V and postgres -V both return 14.2.
Before uninstalling postgres I had messed around with the console code page and from what I can find this could be an error, but I am not sure if there is an easy fix.
I believe this error prevents postgresql from being added to my services so it cannot run.

error with pg_dump when using heroku pg:pull

I have Ubuntu 16.04.4 virtual machine on vagrant. Postgresql 9.5
I am trying to use Heroku pg:pull command to download heroku database to the vm. I got the following error:
env: ‘pg_dump’: No such file or directory
pg_restore: [archiver] input file is too short (read 0, expected 5)
I have tried various approaches including installing/updating postgresql-client-common, uninstalling and reinstall the client, uninstalling and reinstalling PSQL & Heroku, and I've looked all over for the appropriate folder.
Wondering if there is something specific to my setup that is an issue.
Update the Heroku CLI; this was just fixed. https://github.com/heroku/cli/pull/1074