Couchbase - Unable to store key and value though bucket is connected to successfully - store

I've been trying to set up a Couchbase server. But unable to store any value and value.
Following Couchbase manual, I simply install Couchbase, refer the Couchbase Client .NET (Enyim.Caching) into project, then re-configure Couchbase section in app setting with my local pool url (http://local:8091/pools).
I can though connect to connect to bucket through set up CouchbaseClient and CouchbaseClientConfiguration, but unable to store any key-value after that (by .Store(StoreMode.Set, key, value) always returns false).
Any help will be appreciated.

Could you confirm that your local pool URL is http://localhost:8091/pools/default and not http://local:8091/pools? Also, what are the versions of the server and client that you're using?
Thanks.

Related

auth0 custom DB connection Postgres Connection Error

We are using auth0 for user authentication & authorization, and configured custom DB with postgresDB.
Auth0 account is using node 16 as runtime engine for running custom DB scripts.
Loaded postgres template and modified with required changes.
When testing the script, it was giving error saying postgres.connection is not a function.
The same code works well for other account which have node 12 as runtime.
Any suggestions?
This is common issue when using old version of pg.
Latest pg version supported in Auth0 is 8.7.1
Ref: https://auth0-extensions.github.io/canirequire/#pg
So you can update the statement
require('pg')
to
require('pg#8.7.1')
Also please refere https://node-postgres.com/apis/client for correct way to use the Client from pg.

How can I force Firebase Realtime Database URL without "default-rtdb"

My realtime database URL is like https://myprojectid.firebaseio.com
When I start my node.js server I have error message :
#firebase/database: FIREBASE WARNING: Firebase error. Please ensure
that you have the URL of your Firebase Realtime Database instance
configured correctly.
(https://myprojectid-default-rtdb.firebaseio.com/)
My Firebase config is :
# Firebase
apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
authDomain=myprojectid.firebaseapp.com
databaseURL=https://myprojectid.firebaseio.com
projectId=myprojectid
storageBucket=myprojectid.appspot.com
messagingSenderId=00000000000000
appId=1:0000000000000:web:000000000000000
When I'm trying to debug npm library, I can see that namespace is indeed "myprojectid-default-rtdb" but can't find where to change it.
I tried to set databaseURL with query string ?ns=myprojectid but not better.
By searching on Google I could read :
For recently created Firebase projects the default database URI
usually has the format https://
-default-rtdb.firebaseio.com. Databases in projects
created before September 2020 had the default database URI
https://.firebaseio.com. For backward compatibility
reasons, if you don’t specify a database URI, the SDK will use the
project ID defined in the Service Account JSON file to automatically
generate it
Could you help me to find a solution please?
There's no way to change the name of the default database instance that is created in your Firebase project. If your project is on the paid plan, you can add additional database instances where you fully control the name, but not for the default one.
You will have to update your project configuration to use the correct database URL. If the database in the US data center, that'd be:
databaseURL=https://myprojectid-default-rtdb.firebaseio.com

Getting 'Could not find stored procedure' error calling SQL Server stored procedure in Node JS from AWS RDS database

We always normally work in Azure where I write around 200 stored procedures a year in their SQL Server database.
We had to create a SQL Server database in AWS-RDS and still call it in our Node APIs like usual. I was able to quickly and easily set up the AWS DB in SQL Server Management Studio so I do know the credentials.
I created several tables and several stored procedures with no problems and tested to make sure they worked there. When I called them like I normally do in Node, I found I was getting an error
Could not find stored procedure
I went through forums all over but most of the data pertains to MySQL instead of SQL Server, and after trying everything I saw in the forums have not been able to complete what should be a very simple process. I would imagine there is some simple thing I missed, but after 2 days it is time for some fresh ideas.
I am setting up the credentials like this:
var awsConnection = {
host : process.env.RDS_HOSTNAME,
user : process.env.RDS_USERNAME,
password : process.env.RDS_PASSWORD,
port : process.env.RDS_PORT
};
I am using the endpoint provided by AWS for the host, the username and password I use to login to SQL Server Management Tool (which works). The port number is the one specified by AWS (1433 - the default for SQL Server).
I call it in my api like this:
await sql.connect(connectionAWS).then(pool => {
// Stored procedure
console.log("awsConnection INSIDE: " + JSON.stringify(awsConnection));
return pool.request()
.input('repId', sql.VARCHAR(40), repObj.RepID)
.execute('UserExistsBD');
}).then(async result => { ...
I added the console.log to see if we were getting past the login and it appears that we do. I also used Telnet to make sure the endpoint/port combo work and they do. I also checked AWS to make sure the Subnets, Route tables, and gateways were good and to make sure my IP Address was white listed. Any ideas would be very much appreciated!

is installing local node necessary to create wallet on test/main net?

i want to be able to create wallets on wave blockchain using their api
according to this
https://nodes-testnet.wavesnodes.com/api-docs/index.html#/addresses/createWalletAddress
i need to send API key in my request header .... i look into how can i obtain this api key and in the doc here are the steps
Set API Key
To set API key, you need to generate API key hash and then use it in
your node configuration.
Create unique string value that you will use as API key.
Go to Swagger web interface.
Open the /utils/hash/secure (opens new window)API method and input
your unique string in the message field.
Click Execute to get the hashed API key.
Use the hashed API key as the value of the api-key-hash parameter in
your node configuration file.
Restart your node.
it says
Use the hashed API key as the value of the api-key-hash parameter in
your node configuration file.
im very confused ... i thought using testnet means that i dont have to install a local node
maybe im wrong ?!
use this package
https://www.npmjs.com/package/#waves/waves-api
you need to creaate a seed pharase , and using the seed you can create address/public & private keys ... here is a shortcut to create all
const Waves = WavesAPI.create(WavesAPI.TESTNET_CONFIG);
const seed = Waves.Seed.create();
console.log(seed);

Using AWS DocumentDB with Sail.js configuration

I'm trying to use AWS DocumentDB which is MongoDB compatible but unable successfully connect to the database.
Are there are any additional parameters that I need to pass into Sails.js datastores.js configuration?
Currently, my configs are as following:
adapter: 'sails-mongo',
url: 'mongodb://*****:*****#********.cluster-dasdsasd.us-east-1.docdb.amazonaws.com:27017/?ssl_ca_certs=rds-combined-ca-bundle.pem&replicaSet=rs0',
Looking at Sails, i would suggest disable TLS in DocumentDB[1] and try connecting. I suspect that should fix the issue for you. I am wondering if it is able to find the pem file on you applications path (This part of URL - ?ssl_ca_certs=rds-combined-ca-bundle.pem)
[1] https://docs.aws.amazon.com/documentdb/latest/developerguide/security.encryption.ssl.html

Resources