SQLinstance problems - connect

SQL- I can not connect to my instance after I Shutdown my instance .
How do I connect to my Instance ?
Thanks

Related

pixellib is hanging on aws ec2 instance

For object secgmentation process with flask I have using the pixellib library but in AWS EC2 instance (instance type t2 xlarge). but this process is holding at semantic_segmentation(). anyone please support to how to solve this issue or which server need to use?

After installing mongo db in my project with express js i am mongo db is not connecting why?

Please help me to find the what is mean by connect ECONNREFUSED 127.0.0.1:27017
If you are using windowsOs then go to task manager -> services -> click on mongodb -> click on services button on the right bottom of the tab -> click on start .. this should restart your mongodb server and fix the issue.
If you are using a command prompt/ terminal then just restart your mongodb server.
https://www.youtube.com/watch?v=xgpGmi0EgcA
This video might help.

Error: can't connect to new replica set master

I have been trying to connect my node js application to mongo db atlas but i keep getting this error
`MongoDB shell version v4.2.5
connecting to: mongodb://cluster0-shard-00-02-kmhdr.mongodb.net:27017,cluster0-shard-00-00-kmhdr.mongodb.net:27017,cluster0-shard-00-01-kmhdr.mongodb.net:27017/test?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true
2020-04-12T18:35:54.356-0700 I NETWORK [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-02-kmhdr.mongodb.net:27017,cluster0-shard-00-00-kmhdr.mongodb.net:27017,cluster0-shard-00-01-kmhdr.mongodb.net:27017
2020-04-12T18:35:54.358-0700 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-02-kmhdr.mongodb.net:27017
2020-04-12T18:35:54.359-0700 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-01-kmhdr.mongodb.net:27017
2020-04-12T18:35:54.359-0700 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-00-kmhdr.mongodb.net:27017
2020-04-12T18:35:56.232-0700 I NETWORK [ReplicaSetMonitor-TaskExecutor] Confirmed replica set for Cluster0-shard-0 is Cluster0-shard-0/cluster0-shard-00-00-kmhdr.mongodb.net:27017,cluster0-shard-00-01-kmhdr.mongodb.net:27017,cluster0-shard-00-02-kmhdr.mongodb.net:27017
2020-04-12T18:35:58.988-0700 I NETWORK [js] Marking host cluster0-shard-00-02-kmhdr.mongodb.net:27017 as failed :: caused by :: Location40659: can't connect to new replica set master [cluster0-shard-00-02-kmhdr.mongodb.net:27017], err: AuthenticationFailed: bad auth Authentication failed.
*** It looks like this is a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.
2020-04-12T18:35:58.991-0700 E QUERY [js] Error: can't connect to new replica set master [cluster0-shard-00-02-kmhdr.mongodb.net:27017], err: AuthenticationFailed: bad auth Authentication failed. :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
2020-04-12T18:35:59.025-0700 F - [main] exception: connect failed
2020-04-12T18:35:59.026-0700 E - [main] exiting with code 1
Please help me resolve this issue. Thanks
I had similar issue.
Check if your ip is whitelisted. Follow instructions here
https://docs.atlas.mongodb.com/tutorial/whitelist-connection-ip-address/.
Check your system/hosting is not blocking port 27017 and for testing of this port see instructions on http://portquiz.net:27017/
That's how i solved this.

Determine instance IP or DNS for Stopped instance with no EIP assigned

I looked in the AWS documentation, but can't find, if an stopped instance might launch with an IP once I start it. I'm scripting something with boto3 and python, but neither boto3.resource nor boto3.client have given successful information.
The public IP is released when you stop the instance. For a stopped instance:
import boto3
session = boto3.Session(profile_name='your_profile')
ec2 = session.resource('ec2')
instance = ec2.Instance('i-09f00f00f00')
print(instance.public_ip_address)
Returns: None
To get the private IP from your instance ID (running or stopped instance):
print(instance.network_interfaces_attribute[0]['PrivateIpAddress'])
Returns: 10.0.0.200
Reference: Boto / EC2 / Instance / network_interfaces_attribute

connecting socketcluster servers

I'm trying to implement this solution (on Win10 x64), but for some reason all the SocketCluster nodes refuse to communicate with each other.
Sothis is my cur. configuration:
1 StateServer [7777]
1 BrokerServer [8888]
2 SocketCluster servers running on ports [ 8000, 8001]
1 LoadBalancer [2000] to divide the trafic between the 2 nodes.
I ensured that both the State and Broker severs are listening:
TCP [::]:7777 [::]:0 LISTENING
TCP [::]:8888 [::]:0 LISTENING
From what I've understood so far, BrokerServer along with the SocketCluster nodes should all connect to the StatusServer(?)
I could successfully connect the BrokerServer to StateServer, but whenever I try to connect any of the SocketCluster services, it reports 'socket hung' errors.
StateServer:
SC Cluster State Server is listening on port 7777
Sever d08298c6-523f-4c1b-9fcc-efd4e92fab22 at address undefined on port 8888 joined the cluster
Client 10612bde-514f-40d3-9340-7179a1901376 at address undefined joined the cluster
Cluster state converged to active:["ws://[undefined]:8888"]
SocketCluster instance:
{ SocketProtocolError: Socket hung up
at Emitter.SCSocket._onSCClose (C:\Users\Alex\AppData\Roaming\npm\node_modules\sc-cluster-broker-client\node_modules\socketcluster-client\lib\scsocket.js:596:15)
at Emitter.<anonymous> (C:\Users\Alex\AppData\Roaming\npm\node_modules\sc-cluster-broker-client\node_modules\socketcluster-client\lib\scsocket.js:285:12)
at Emitter.emit (C:\Users\Alex\AppData\Roaming\npm\node_modules\sc-cluster-broker-client\node_modules\component-emitter\index.js:131:20)
at Emitter.SCEmitter.emit (C:\Users\Alex\AppData\Roaming\npm\node_modules\sc-cluster-broker-client\node_modules\sc-emitter\index.js:28:26)
at Emitter.SCTransport._onClose (C:\Users\Alex\AppData\Roaming\npm\node_modules\sc-cluster-broker-client\node_modules\socketcluster-client\lib\sctransport.js:175:30)
at WebSocket.wsSocket.onerror (C:\Users\Alex\AppData\Roaming\npm\node_modules\sc-cluster-broker-client\node_modules\socketcluster-client\lib\sctransport.js:104:12)
at WebSocket.onError (C:\Users\Alex\AppData\Roaming\npm\node_modules\sc-cluster-broker-client\node_modules\ws\lib\WebSocket.js:452:14)
at emitOne (events.js:96:13)
at WebSocket.emit (events.js:188:7)
at WebSocket.EventEmitter.emit (C:\Users\Alex\AppData\Roaming\npm\node_modules\socketcluster\node_modules\sc-domain\index.js:12:31)
name: 'SocketProtocolError',
message: 'Socket hung up',
code: 1006 }
Are you running those instances in Docker containers by any chance?
Based on the log output that you're getting from the state server (address undefined), it looks like the scc-state instance cannot figure out your instances' IP addresses. This can happen for several reasons. For example, running an instance inside a Docker container can obscure that instance's real IP address. It's also possible that running SCC on Windows could cause similar problems.
The solution to this problem is to set an SCC_INSTANCE_IP environment variable when launching each instance - This environment variable should hold the IP address of the instance which other instances can use to connect to it (if using Docker, you can use the docker inspect command to find the private network IP address of a specific container).
SCC_INSTANCE_IP can be either a private IP address, public IP address or a hostname.
It turned out, that scaling the cluster horizontally isn't working properly on Windows OS yet (using the current version v.1.2.1).
Both SocketCluster nodes aren't communicating with the brokerServer for some reason.

Resources