"MongoError: no primary found in replicaset" when trying to connect to mongodb database locally or through our galaxy server - mongodb

I know this question has been asked before, but none of those solutions seem to have worked for me so far.
We've migrated our database over to and IBM cloud hosted mongoDB. I've got the connection working successfully for our .NET applications that use the Mongo.Driver library, but i can't get it work for our meteor app... Here's the connection string I have currently:
mongodb://admin:[PASSWORD]#url1.databases.appdomain.cloud:31928,url2.databases.appdomain.cloud:31928,url3.databases.appdomain.cloud:31928/dyo?authSource=admin;tls=true;tlsInsecure=true;connect=replicaSet;replicaSet=replset
I then run the connection string in this command:
SET MONGO_URL=[connection string shown above] && meteor --settings settings.json
And then we just get the error you see in the title over and over again. This happens on our galaxy server and locally. I feel like i should get this working locally first before deploying to our Galaxy server. Does anyone have any tips as to what could be happening here? I'm new to working with mongodb's and am at a loss
More info:
MongoDB version: 4.4
Meteor version: 1.4.4.1

I ended up fixing our connection issue by including ssl=true in the connection URL and removing all the parameters relating to TLS. I believe this has to do with our older version of meteor we are running, since ssl=true is actually deprecated later on...
Here's a github issue i also created if anyone has the same issue and needs more guidance in the future:
https://github.com/meteor/meteor/issues/12224

Related

Next js with Mongodb, mongoose, and vercel deployment gives 500 error(works fine on localhost)

I am trying to deploy my next js app that uses mongodb and mongoose. Everything works fine on localhost however when I deploy to vercel I'm getting this error from the logs:
I have double-checked my environment variables and everything seems fine with them.
Here is my mongo connection:
Here are the pages that bring in data using getServerSideProps:
Any help would be much appreciated!
Try to make mongo DB queries inside the getServerSideProps function. It is mentioned in the NextJS documentation.
And try to build locally first.
Make sure to change the ENV files on the vercel before building.

moodle - database connection failed when running sync.php script

I am setting up a moodle plugin for enrolment from an external database based on instruction in https://docs.moodle.org/39/en/External_database_enrolment. I was successful in setting up a similar plugin for authentication from an external database. But I am having a problem with a plugin for enrolment from the external database. When I test the plugin settings it is successful as shown below https://i.stack.imgur.com/fdrqG.png
But When I run php sync.php I got
Error: Database connection failed
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
My moodle version is 3.9.1 and I am using Mac OS.
Thank you in advance.
First, turn on debug, to get errors.
Finally found that the problem was, the plugin do not work with PHP7.4 (while Moodle do).
Fixed by downgrading PHP to 7.2

Changing Meteor Servers

I'm working on switching my Meteor app from Galaxy to AWS, and it's currently running on both, linking to the same MongoDB, with the same user, but users created on the Galaxy server, can't login on the AWS server. Does anyone know why and how to fix it?
Figured it out, just had to change "setupMongo" to false.

Deploying Meteor + Angular2 app to Heroku

I have an app I'm writing using Meteor, Angular2 (using the angular-meteor package), Typescript, and MongoDB. I'm trying to put it up on Heroku and running into difficulties. I'm using this meteor buildpack. I'm not sure whether the problems are with Meteor, Heroku, or Angular2, though I suspect it's something Heroku isn't configuring correctly for Angular2. The site is at http://alfred-zahner.herokuapp.com/ and the error I'm getting is:
EXCEPTION: No provider for t! (e -> t)
I've checked the Heroku logs and there is no sign of trouble there. Part of my problem is that I can't see what t and e are, as someone (Heroku?) is uglifying the JavaScript. I'm not really sure how to proceed in debugging this.
One way to solve this problem would be to figure out and fix the error, but I'd be happy if there's a better build pack, or even a better (must be free!) hosting environment that I could be using.
Edit
It's not Heroku's problem. The same thing happens when deploying to Meteor's built in deployment testing (meteor deploy site.meteor.com). If I deploy using meteor deploy --debug site.meteor.com, however, it works, so Angular2 has some problem with the extra processing that happens when Meteor prepares an app for production.
On the angular2-meteor Github I found out that this is an issue with Angular 2 in particular, when using UglifyJS. For now, it seems the only solution is to use meteor deploy --debug. I'm planning to just use that on meteor's built in hosting until Angular 2 plays nicely.

Cannot update repository Windows Azure

I'm trying Windows Azure now.
I have been following instruction from
https://www.windowsazure.com/en-us/develop/java/java-home/download-the-windows-azure-sdk-for-java/
I'm running on eclipse helios, but when i try to install new software and enter url repository :http://dl.windowsazure.com/eclipse
Eclipse always timeout,
message on message box like bellow :
Unable to connect to repository http://dl.windowsazure.com/eclipse/content.xml
Unable to connect to repository http://dl.windowsazure.com/eclipse/content.xml
Connection timed out: connect
How to solve this, i very need it to deploy my first app on Windows Azure platform
Help me to solve this, please
Now i try to runnning azure project on Cloud Azure, but why when i try to upload cspkg file and cscfg file, the process always timeout, whereas connection is running normally when i look on ping -t
this is message when i try upload on azure hosting service :
Uploading the selected package has failed, please verify your network connection and try again.
How to solve this issue ?
it's very strange error. >-<
I think there is some problem with your network connection as I have just tested the same download location and it does work perfectly fine as below:
As you can see below I am using http://dl.windowsazure.com/eclipse URL to download the Java specific Azure components:
After that once I select "Next", the following two components are listed to be installed in my machine:
Microsoft JDBC Drive 3.0 for SQL Server (This will work with SQL Azure)
Windows Azure Plugin for Eclipse with Java
I am sure that the problem is specific to your network connection so please have it corrected.
Yes, it's foolish of me, i forget to shutting down my proxy server on My compute.After i disable it,everything gonna be alright :D
Thanks
surely I haven't meet this situation before , but just for your additional information..
Have you follow this step on installing azure #eclipse? like .net version must be >= 3.5
here are some source link for your help http://www.windowsazure4e.org/download/
I haven’t worked with Windows Azure Java SDK. But the error message is complaining the file C:\Users\workspace\AzureFirst\emulatorTools\ResetEmulator.cmd cannot be found. It would be better if you can check whether the file exists. In addition, the call stack points out you’re using Windows Azure SDK 1.4. Please try to upgrade it to 1.6 to see whether it works fine. You can find SDK 1.6 on http://www.microsoft.com/en-us/download/details.aspx?id=28045. Please install WindowsAzureEmulator and WindowsAzureSDK. The WindowsAzureLibsForNet is not needed if you don’t want to use .NET.
Best Regards,
Ming Xu.