I am trying to execute a query in IntelliShell, However when I open intellishell for a particular collection and execute a simple find query I get the following error:
Failed to retrieve documents
[null.WidgetPublished#STAGE_QA sjc-wwdl-pmp2:27017 [direct]] : An error occurred while retrieving documents!
Stacktrace:
|_/ java.lang.Exception: [null.WidgetPublished#STAGE_QA sjc-wwdl-pmp2:27017 [direct]] : An error occurred while retrieving documents!
|____/ Illegal argument: Database must be set.
Now, I know that this is happening because there is no db set up for my mongo host. However I am unable to set the db. I'm using the following command to set it, but nothing seems to work.
use dgmdetails; where dgmdetails is my db name.
So I was able to resolve it. in my mongo.conf file on the server. I needed to disable some authorization that was enabled which was not letting the user that I was logging in with, to connect to the db.
I'm pretty sure this was an issue faced just by me due to the configuration. However, there is a possibility that someone else might find this useful too.
Related
I'm using the open source Metabase version, and I was able to connect my PostgreSQL databases correctly.
but when im trying to run a update query from metabase its throws below error.
ERROR: cannot execute UPDATE in a read-only transaction
but when I execute same query from terminal and pgAdmin its worked and updated the rows as well.
so i thought the issue is the connection between metabase and PostgreSQL,
then i tried to change the connection propertes as below way.
I have tried below arguments as well.
default_transaction_read_only=off
readonlymode=ignore
readonlymode=off
but im still geting the same error message.
Metabase isn't geared toward modifying any data in the source databases it knows about.
Seemingly as a way to enforce this usage pattern, Metabase's developers are using the setReadOnly method when creating JDBC connection objects which is likely overriding any driver-level properties you've set. (This happens in the file src/metabase/driver/sql_jdbc/execute.clj in the Metabase codebase.) You could attempt to change this by compiling your own custom version of Metabase, but you might achieve some unexpected results.
When trying to connect to my Amazon PostgreSQL DB, I get the above error. With pgAdmin, I get "error saving properties".
I don't see why to connect to a server, I would do any write actions?
There are several reasons why you can get this error:
The PostgreSQL cluster is in recovery (or is a streaming replication standby). You can find out if that is the case by running
SELECT pg_is_in_recovery();
The parameter default_transaction_read_only is set to on. Diagnose with
SHOW default_transaction_read_only;
The current transaction has been started with
START TRANSACTION READ ONLY;
You can find out if that is the case using the undocumented parameter
SHOW transaction_read_only;
If you understand that, but still wonder why you are getting this error, since you are not aware that you attempted any data modifications, it would mean that the application that you use to connect tries to modify something (but pgAdmin shouldn't do that).
In that case, look into the log file to find out what statement causes the error.
This was a bug which is now fixed, Fix will be available in next release.
https://redmine.postgresql.org/issues/3973
If you want to try then you can use Nightly build and check: https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2019-02-17/
I have an embedded database where I start an OServer and trying to connect to it from the console. I've been doing this successfully for many months and upgrading the database as new versions come out. Now, with 2.2.13, the embedded operations seem to work but I can't connect to the server with the 2.2.13 console.sh. I get the message:
Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot create a connection to remote server address(es): [127.0.0.1:2424]
DB name="master"
The java code running the embedded database gets the following exception:
$ANSI{green {db=db}} Error executing request
com.orientechnologies.orient.core.exception.ODatabaseException: Error on plugin lookup: the server did not start correctly
DB name="db"
at com.orientechnologies.orient.server.OServer.getPlugin(OServer.java:850)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.openDatabase(ONetworkProtocolBinary.java:857)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.handshakeRequest(ONetworkProtocolBinary.java:229)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:194)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Seems to be looking for the 'cluster' plugin.
Any idea why this doesn't work anymore? It did work in 2.2.12.
Thanks
Curtis
Seems I had automatic backup turned on but the config file was missing. So, the server looked like it started up but actually didn't.
I created the config file and set enabled to false. Still didn't start up because it sees the false and stops the configuration and throws an exception because the 'delay' parameter isn't set.
I think orientdb should start up without backups enabled if the config file is missing or the enabled parameter is set to false.
At least the console is working now.
I hope someone can help. I am running codeigniter 3.05 and trying to connect to a remote PostgreSql database. If I set session to database, I get include(.../views/errors/html/error_php.php) failed to open stream error message.
No other session configuration setting generates the error. If I run a method on a model, I get the same error along with: Fatal error: Call to a member function from() on null in /opt/share/php/ci/application/libraries/ActiveRecord.php on line 295.
I run the PostgreSql client from command line and I can connect to the database ok. I am running Ubuntu 15.04 and I have checked permissions and ownership settings for Codeigniter. I had a similar problem loading the model, but, when I changed the first letter of the name of the file to uppercase, the message disappeared.
Is there a database driver that I need to change the first letter so Ubuntu can find it? Or, what else could it be?
I'm trying to create a Catalyst project connecting to an existing MS SQL Server database. I got the correct connection string and it's authenticating, but it's not finding any tables. Anyone have an idea of what I might be missing?
I substituted the real ip address, database name, username, and password but you get the idea.
This is the command I run:
script\qa_utility_create.pl model DB DBIC::Schema QA_Utility::Schema create=static "db_schema=DatabaseName" "dbi:ODBC:Driver={sql server};Server=1.1.1.1,1433;Database=DatabaseName" username password
When I run this, I get the below error:
exists "C:\strawberry\perl\site\bin\QA_Utility\lib\QA_Utility\Model"
exists "C:\strawberry\perl\site\bin\QA_Utility\t"
Dumping manual schema for QA_Utility::Schema to directory C:\strawberry\perl\site\bin\QA_Utility\lib ...
Schema dump completed.
WARNING: No tables found, did you forget to specify db_schema?
exists "C:\strawberry\perl\site\bin\QA_Utility\lib\QA_Utility\Model\DB.pm"
Check your db_schema as the error suggests. The default is usually "dbo".
So I had similar issues connecting with a mySQL database which drove me crazy for about 4 hours (I'm a newbie to Catalyst).
the create script was executing ok, but failed to pick up any tables giving the "WARNING No tables found...."
The tables were present however in the database.
Prior to this, I had been getting errors when the script tried to connect to the database, and after playing with the arguments for a while, the connection errors cleared and I assumed all was good at this point (wrong !!!!).
The suggested solution to specify the db_schema was misleading at this point, as the problem was more an issue with the connection failing to return any valid data. So I think what was happening was it was finding the database, connecting ok, but not returning any data, thus no tables....
After about 4 hours of playing with the arguments for the connection one combination just magically worked.
So here is the successful command line....
script/testcatalyst_create.pl model DB DBIC::Schema testcatalyst::Schema::perl_test create=static dbi:mysql:perl_test:user=root
The parameter which was causing the error was the last parameter which specifies the connection parameters dbi:mysql...
previously I had tried...
script/testcatalyst_create.pl model DB DBIC::Schema testcatalyst::Schema::perl_test create=dynamic dbi:mysql:perl_test,username=root
and many other formats from various online searches. The ":user=root" turned out to be the correct format.
Hope this helps someone else !!!!!!!