SailsJS connection with Azure MS SQL Database - javascript

I installed the latest version of Sails on my computer and created a new project.
I am using SailsJS as my API and want to connect to the clients' Azure MS SQL database.
I tried using the mssql npm package, even the MS SQL adaptor listed on the Sails documents site, but non of these are working.
With mssql I get the following error when running sails lift in the terminal:
` info: Starting app...
error: A hook (orm) failed to load!
error:
error: Error: Consistency violation: the adapter for datastore default does not have an identity property.
at validateDatastoreConfig`
Any guidance will be appreciated...

Related

Sails.js connect to Cloud mongoDb Atlas

I created a Sails.js app, it connects to local MongoDB correctly but if I want to connect it to cloud mongodb, Sails throws an error. what should I do to fix it?
default: {
adapter: 'sails-mongo',
// url: 'mongodb://localhost:27017/referral' // this work fine
url: 'mongodb+srv://MYUSERNAME:MYPASS#cluster0.ikncs.mongodb.net/referral?retryWrites=true&w=majority'
},
error:
error: A hook (orm) failed to load!
error: Could not tear down the ORM hook. Error details: Error: Consistency violation: Attempting to tear down a datastore (default) which is not currently registered with this adapter. This is usually due to a race condition in userland code (e.g. attempting to tear down the same ORM instance more than once), or it could be due to a bug in this adapter.
error: Error: Invalid configuration for datastore default: Provided URL ('mongodb+srv://MYUSERNAME:MYPASS#cluster0.ikncs.mongodb.net/referral?retryWrites=true&w=majority') has an invalid protocol.
If included, the protocol must be "mongodb://".
I will appreciate if someone help quickly
I had a similar issue.
The connection string I got from Atlas was for Node version 3.0 or later did not work with the sails adapter.
But the connection string from Atlas for Node version 2.2.12 worked.
From Atlas, click connect -> Connect to your application (using MongoDB's Native Drivers) -> Select Node.js Version 2.2.12 or later. Use the connection string it provides.
I have got the same issue, it’s due to mongodb version used in sails-mongo, for our production database we have worked on improving the existing package.
You can search for sails-mongo-cloud in npm which supports cloud mongo atlas and cluster with server less setup as well.

Port 8080 failing & startup.sh cannot be found when deploying Sails app to Azure

I've followed all the provided MS tutorials but still cannot get my sails app to run on Azure. I get the following log error. Can anyone help as to why these errors are happening?
Here is the official Azure deployment strategy for Sails.
https://github.com/mikermcneil/sails-deploy-azure
I have resolved my question. The error was created by an incorrect Redis URL. If you are using Redis ensure to add the Azure service Azure Cache for Redis and use the provided URL eg. redis://[your host name].redis.cache.windows.net:6380

IBM MFP Adapter Deployment Failed

Using IBM MFP 8 with Google cloud platform,
I have an adapter with many java/lib dependencies, adapter built successfully but when i deploy in MFP Console,
getting Connection error. Contact the server administrator (HTTP code: 413)
Adapter File Size is 42MB
Hope your other adapter deploys successfully, Below are the reasons
Check the connection time out on your server.xml for under data source tag.
Connection alive time in your DB as you have mentioned Google cloud.
If using F5, check the error status and max size allowed params.

Feathers JS Client Timeout

I am sure this is something very simple, but for some reason I am getting a timeout when trying to integrate the feathersjs client with a very simple jQuery app. Files of interest are in src below. This repo only contains a single service "messages" connected to a NedB database with no authentication. When the script starts, I am attempting to add a single message to my messages service.
Repo:
https://github.com/Ryan8765/jquery-chat
Error in Console:
Uncaught (in promise) Error: Timeout of 5000ms exceeded calling create on messages
at client.js:66
The server side application has been created with an old (v2) version of the CLI but you are loading #feathersjs/feathers#^3.0.0 in the browser which uses a Socket.io message format that is not supported by a v2 server.
feathers --version on the command line should show 3.3.0 or later. You can either follow the migration guide to upgrade or install the latest #feathersjs/cli and regenerate the application.
Reference issue feathersjs/feathers#761.
I had the same issue using these package's on the client side with vue.js (vue#^3.2.16 and vite#2.6.4)
#feathersjs/feathers#^4.5.11
#feathersjs/socketio-client#^4.5.11
socket.io-client#^2.3.1
#feathersjs/authentication-client#^4.5.11
My issue was resolved after changing
import io from "socket.io-client";
to
import io from "socket.io-client/dist/socket.io";
in my client feathersjs settings

Fail to connect Mongolab with MongodbShell

I'm trying to connect the Mongo shell with Mongolab. I am using my mongolab username and password but it is giving an error: "Failed to connect to 54.81.180.188:56789."
My userName and password is correct.
I'm using Windows 8.1
When I ping ds0-----.mongolab.com that's working fine.
C:\mongodb\bin>mongo ds0----.mongolab.com:56789/dbname -u "MyUserName" -p "MyPassword"
MongoDB shell version: 3.0.3
connecting to: ds027751.mongolab.com:56789/dbname
2015-06-05T10:55:30.019+0530 W NETWORK Failed to connect to 54.81.180.188:56789, reason: errno:10061 No connection could be made because the target machine actively refused it.
2015-06-05T10:55:30.024+0530 E QUERY Error: couldn't connect to server ds027751.mongolab.com:56789 (54.81.180.188), connection attempt failed
at connect (src/mongo/shell/mongo.js:181:14)
at (connect):1:6 at src/mongo/shell/mongo.js:181
exception: connect failed
I had the same problem, my server abruptly lost the ability to connect to MongoLab. I contacted support, who sent this reply:
Hello,
Your Experimental Sandbox plan is running MongoDB 3.0.x, which
includes changes to Mongo's authentication mechanism. This new
mechanism is supported by certain newer driver versions, as described
at
http://docs.mongodb.org/manual/release-notes/3.0-scram/#upgrade-drivers.
To connect to this database, you will need to use one of the drivers
listed at the above link.
Please let us know if you have questions about this.
Sincerely, Samson
I assume I was upgraded automatically, as I hadn't touched the server code or MongoLab in months. As an immediate fix, I just created a new db in MongoLab, which was created in mongod v2.6.9 (I don't remember seeing an option to choose the version).

Categories