getting error in AWS EMR not sure why it's trying to connect to Mysql DB. I don't have any code that connects to mysql.
Error:
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
Related
I have a VPS running Ubuntu 18.04. The server is running an ASP.NET Core application in a docker container and SQL Server Express 2019 is NOT in a container. I am trying to access a database from an application.
My connection string:
Server=host.docker.internal,1433;User ID=SA;Password=mypass;Database=mydb
In application
services.AddDbContext<UniversityContext>(options =>
options.UseLazyLoadingProxies().UseSqlServer(Configuration.GetConnectionString("ConnectionString")));
I get an error
SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught)
Running a container:
docker run -d -p 228:80/tcp myrepos/myproject
ASP.NET Core application successfully connecting to SQL Server from my PC
Also, I tried
docker run -d -p 228:80/tcp myrepos/myproject --network="host"
and 127.0.0.1 or localhost instead of host.docker.internal and get similar error but with another code
SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server)
UPDATED
If I'm not mistaken SQL Server is already listening 1433
I'm having a hell of a hard time trying to figure out why I can connect to my SQL Server using Management Studio using my local ip or local computer name or sql instance name but I can't connect to the same SQL Server using my public ip address.
I have tried all of the below steps but nothing seems to fix the Wait Operation Timed Out error message:
Disabled firewall on the SQL Server and the computer I'm trying to use to connect with.
Port forwarding is enabled for the port I'm using which is the default 1433
Ran the telnet command: telnet publicip port from a computer outside of my network and it was successful
Restarted the SQL Server plenty of times
Enabled remote connections for the server and enabled tcp/ip for the 1433 port
I also enabled port forwarding for the sql browser service using the recommended port of 1434 via udp
Tried to connect with named instance but only works with local ip and not public ip
I am pretty much out of ideas at this point so any help is greatly appreciated
Here is the full error message just in case anyone needs to see it:
Cannot connect to XX.XX.XXX.XXX,1433.
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)
I have recently downloaded the oracle database 12c enterprise edition. So I got Oracle SQL developer installed with the package. I started to create new database connection as given in the documentation.
My problem is....
When I try to test or connect with the following field values:
Hostname: localhost
Port: 1521
SID: orcl (I have tried 'xe' as well but the error persists.)
I get the following error:
Status: Failure -Test failed: IO Error: An existing connection was forcibly closed by the remote host, connect lapse 15080 ms., Authentication lapse 0 ms.
I have also tried to use different port numbers but the issue remains the same. Don't know what went wrong.
If local server sqlplus connection is fine, and error occurs only for remote client such as sql developer, check your sqlnet.ora file to see if it has tcp.validnode_checking = yes. Valid Node Checking allows or denies access from specified IP addresses to Oracle services. Set tcp.validnode_checking = no and restart database listener should solve issue.
Change the connection setting to Connection Type=Basic and use SID (not Service Name).
If you use Connection Type=TNSNAMES or Service Name instead of SID - the connections will be dropped.
Middleware: Oracle HTTP Server(OHS)
Version: 12.2.1.3
Configured Oracle HTTP Server(OHS) in standalone mode. Node manager is running perfectly. While starting "./startComponent.sh ohs1" i am getting the below error,
"""
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
Error: Error occurred while performing nmConnect : Cannot connect to Node Manager. : Unrecognized SSL message, plaintext connection?
"""
The solution found in internet is to changing the SecureListener to false in Nodemanager properties file.
When i did that i got the below error,
"""
weblogic.nodemanager.NMConnectException: Connection refused (Connection refused). Could not connect to NodeManager. Check that it is running at localhost/XXX.0.X.X:XXXX.
Error: Error occurred while performing nmConnect : Cannot connect to Node Manager. : Connection refused (Connection refused). Could not connect to NodeManager. Check that it is running at localhost/XXX.0.X.X:XXXX.
"""
And the solution for this is Setting the SecureListener to true in node manager properties file.
I am confused. Can someone help in resolving these errors?
Installed Oracle Access Manager(OAM) and OHS on same machine, but installed OHS in Standalone mode in different folder. After that, uninstalled OHS and Installed OHS in the same folder where i installed OAM, It worked.
I've tried enabling TCP/IP - setting tcp port - restarting sql service - creating firewall inbound rule for the port - allowing remote connections on sql server - I'm able to ping - server name: tcp:, with correct credentials - server name: , and still not working.
What am I missing?
Error I'm getting:
Cannot connect to <server name>
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: TCP
Provider, error: 0 - The wait operation timed out.) (Microsoft SQL
Server, Error: 258)
If you are not setting the domain users then make sure you are using SQL Server authentication and either set up local user in the database or simply use the sa user (not recommended)
Because you are not specifying the SQL Server edition, please take a look this link for enabling remote access if you are using SQL Server 2005