Failed to connect to MFQ:1433 nodejs - node.js

In my local machine there is no connection issue, but after I pushed to the server and run the node js project it throws an exception:
Failed to connect to MFQ:1433 - Could not connect (sequence)
Node js connected to the sql server throw the mssql module
I have started sql server browser
In my local machine it working perfectly

First & foremost please verify that correct PORT is utilized on the connection string (ensure you have one) if you already do then the fix would the below SQL Server Browser service is not running on the port 1433 on the database server & must be reachable. (Normally the default PORT is 1433)
Open the SQL Server Configuration Manager.
In SQL Server Network Configuration select Protocols for [yourServerInstance]. In the right-hand pane, make sure that TCP/IP is Enabled.
Open the 1433 port in your firewall.
In the SQL Server Configuration Manager,right-click TCP/IP and select Properties.
Select the IP Addresses tab and make sure the TCP Port for IP1 is 1433. - If you are using a named instance, create an extra rule in your firewall with the port 1434

Related

Microsoft Azure, issue with open ports

Currently hosting a microsoft azure server that has a SCP: Secret laboratory game server on it.
OS: Ubuntu 20.04
After setting up the server and downloading the server files, I can't seem to connect to the server. The port that is needed for the game server is 7777 and I have the port open under NSG with UDP and TCP protocol, but after using multiple port checkers and trying to connect in game, I always got the port closed answer or was given a connection error.
I have tried using the azure's own troubleshooter, but that says the ports are open. Tried different ports like 7778 or 7779. Checked the firewall, but I dont even have it enabled.

Cannot connect to SQL Server database on Nodejs EC2 server

I have an EC2 instance running a node server. The pages and routes render fine on the frontend, but when I do anything that requires a call to the api it says failed to connect to XX.XX.X.XXX:1433 (which is my SQL Server database). When I run the app locally (not inside the EC2 instance) it works just fine and connects to the DB. Btw, my local computer is NOT where the SQL Server database is being hosted.
What could the issue be on the instance?
EDIT: TCP is enabled and the Browser part is running in the SQL manager.
EDIT2:This is the error I get every time my EC2 app makes an api call to te database:
ConnectionError: Failed to connect to XX.XX.X.XXX:1433 in 15000ms
But when I do the dame thing on the app from its development computer on localhost it works just fine.
Ok, so, it looks like this is a network connectivity problem. Can you ping the DB server?
ping xx.xx.xx.xx
Second, can you telnet to the port?
telnet xx.xx.xx.xx 1433
My guess is that both of these will fail. So, the question is, why?
Some things to consider:
Is the database server on the public internet? (I hope not, for security reasons.)
Is your client computer on the public internet?
What is the network access path to get from your client machine to the DB server? VPN tunnel? SSLVPN connection? Something else?
I don't have a specific solution for you, but hopefully I gave you some ideas as to where to look. The problem is (almost certainly) not a database problem, but a network connectivity issue.

Unable to establish the Cassandra - Generic JDBC connection in AQUA Data Studio

Your server is not listening or accepting connections on 127.0.0.1:9042. Verify host and port information is correct
VM: 127.0.0.1:9042
JDBC URL :jdbc:cassandra://127.0.0.1:9042/quantum_cassandra
Driver:cdata.jdbc.cassandra.CassandraDriver
Appreciate your help on this.
This error message in Aqua Data Studio indicates that your host/port is incorrect, or your server is not listening on that port, or a firewall is blocking network access to it.
You just need to make sure your server is running correctly and no firewall is blocking your connection. Note that IP address 127.0.0.1 is a local loopback and is only accessible on the same machine and not remotely.

SQL Server 2016 cannot connect remotely

I am using the "test.udl" to test the connect.
When I use the IP which is from the router, it can connection test is succeeded.
Then I try to use the real IP for testing connect, it got fall.
The router has set as below:
Archer C2>forwarding>Virtual Server:
Service Port=1433,1434,49172
Ip address=192.168.0.100(Permanent)
And I have closed the firewall in windows.
The Sql server configuration manager setting:
TCP IP Properties>IP Address>
IP1:
Active:yes
Enabled:yes
IP Address:119.246.x.x
TCP Dynamic ports:0
TCP port:null(unset)
IP2:
Active:yes
Enabled:yes
IP Address:192.168.0.100
TCP Dynamic ports:0
TCP port:null(unset)
test.udl test information:
Fail test
server name:119.246.x.x\server
Use Windows NT integrated security
result:
Test connection failed because of an error in initializing provider.
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
succeed test
server name:192.168.0.100server
Use Windows NT integrated security
result:
Test connection succeeded.
Does anyone know where i got wrong?
It is a bug.
SYMPTOMS
When you try to connect to a clustered Microsoft SQL Server 2005 or Microsoft SQL Server 2000 named instance by using the "servername\instancename" syntax, you receive the following error message:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
You may receive this error message when the following conditions are true:
SQL Server 2005 or SQL Server 2000 is installed on a cluster.
You are connecting to a SQL Server named instance by using TCP/IP sockets.
IPSec policy is enabled on the client domain.
IPSec policy is not enabled on the server domain.
CAUSE
This problem occurs during the discovery phase of the connection. The IPSec policy on the client drops packets from the server when the source IP changes.
WORKAROUND
To work around this problem, you have to hardcode the TCP port or the Named Pipe of the SQL Server named instance. To do this, use a connection string that is similar to one of the following:
[oledb]
; Hardcoded TCP OLE DB initstring
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security >Info=False;User ID=clientID;Data Source=tcp:TcpIpAddress,port
[oledb]
; Hardcoded Named Pipes OLE DB initstring
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security >Info=False;User ID=clientID;Data Source=np:\ServerName\pipe\MSSQL$InstanceName\sql\query
*Source taken from https://support.microsoft.com/en-us/kb/888228
Hope it helped
I have solved it. It may cause of the default port is not 1433.
I checked the log file viewer(SQL server Management studio>SQL Server Agent>Error logs>current(archive is also work))
only tick on the sql server check box
find "server is listening on[ 127.0.0.1 xxxx].
In my case it is 9662/9663
I add them all in my router and succeed to connect.
Thank you all above.

Can ping a local server IP but can't browse a site into the server

I have a server connected to the network with the ip 192.168.xxx.xxx. I can ping the ip but when i try to access from the browser to the server's localhost, obviusly with the IP, i can't.
What is wrong??
UPDATE!!
There was a network error... not configuration!! Thanks for help! Problem solved!
Check if the port you are trying to connect is open. If it is not, you have to bring up the port first, Example: if you are trying to run an app from tomcat, start tomcat first,
There are multiple reasons why this would happen:
The server is not set up to receive incoming connections. Check your firewall settings
The server isn't publicly visible (Meaning the server will appear to a ping, but all the ports are closed
The server isn't able to make outbound connections, again, check the firewall.
To test ports, either port forward, or put the server in to a DMZ (All ports are open)
Manually attempt a file transfer or another service by using ftp <IP of server>:<port number eg 21) or an SSH tunnel. If the FTP passes, then the HTTP port of the server may be down (port 80/8080).
Verify the router interconnecting your PC and the server isn't restricting local peer crosstalk.

Resources