How do I connect my swift code in Xcode on a mac with a MYSQL or mongoDB server

2020-04-29 07:21:54.444114-0500 testings[13772:143787] [si_destination_compare] send failed: Invalid argument

2020-04-29 07:21:54.444242-0500 testings[13772:143787] [si_destination_compare] send failed: Undefined error: 0

MongoKitten.MongoDatabase
NIO-ELT-0-#0 (9): Precondition failed: lock() failed in pthread_mutex with error 11

Precondition failed: lock() failed in pthread_mutex with error 11: file ( SourcePackages/checkouts/swift-nio/Sources/NIOConcurrencyHelpers/lock.swift )

Same Error and we can also see that this is where it actually timesout and has that precondition failed error too

Maybe you've got a whitelist up on MongoDB atlas? Other than that I'm not sure how I can help with the debugging.

Nope I made it available from anywhere, you can test that url it should work........At this point I have no choice but to try to use Mysql but that driver is also not available or make api calls with AWS service with the following structure APi Gateway -> Lmabda -> DynamoDB or RDS and back.

Trying this I get:

[2020-04-29T12:49:01.294Z Connection-1 severe] SSL/TLS not enabled on Postgres server

sslNotSupported

This is a known issue where Xcode/lldb/XNU kernel work together and cause this issue. This is being worked on. However, if you hit this case, it should be EINVAL (which is 22 on macOS) and not EDEADLK 11 Resource deadlock avoided. (I'm assuming you're on macOS because you mention Xcode)

This is the same thread trying to acquire a lock again that it already holds. If you post the whole stack trace (bt in lldb, more info here), then we should be able to tell where the problem is.

You can ignore those, they're not from NIO/MongoKitten/... but from the networking system itself, that's also a known bug in the OS.

Set config.ssl = false if you don't want to enable/configure SSL.

But for realz: