I am using TeamCity version 10.4. I am trying to create the database on my local machine.
However, I am getting this error:
The connection to the host localhost, named instance hsalman-pc failed. Error: "java.net.SocketTimeoutException: Receive timed out".
Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later,
verify that the SQL Server Browser Service is running on the host.
I have the required driver here:
Aslo, I cannot locate the database properties file in the data directory. So what is the problem?
Related
I have the task to establish a connection to a Firebird database that is located on a Windows instance. What I was able to accomplish so far was to establish a connection via PHP PDO on my local machine and query the databases.
However, I run into dead ends when I try to connect to the Firebird database that isn't on my PC locally. The database is located on a Windows remote server. The provider opened a port for that gets then redirected to port the Firebird database should be listening to as well (5143 was on my local machine and provider said it was the same on their end. So we try to connect over serveraddress:port and get forwarded to the corresponding port then).
First issue was to get Firebird working in CentOS but I got that down.
Connecting to the specified port I get the error "SQLSTATE[HY000] [335544421] connection rejected by remote interface", any other, not open port, returns correctly "connection refused".
Is it even possible to connect to a Windows remote server? Am I even "connected" / trying to connect to the Firebird database there and it gets declined then?
I read a lot about the rejected by remote interface error but nothing really pops into my mind what it can be.
I tried various setups, tried different ports, we logged on over TeamViewer and set up an ODBC connection locally on the remote desktop which succeeded. Both connections over the 32-bit and the 64-bit ODBC worked. We checked the Firebird versions and they were identical. We even tried to connect from a Windows notebook to the Windows remote.
I basically just want to establish a connection over PHP PDO.
I make a connection for connect to the Database Server (other machine).
Then I found "An error was encountered performing the requested operation:
IO Error: The Network Adapter could not establish the connection
Vendor code 17002".
Please look the picture in URL below.
I tried to make a connection but can't access but my team can access it.
My friend used TNS connection type and I did everthing similar him but can't access. I tried to use JDBC thin for connect but can't also.
I had the old connection which I can connect but why I can't connect the new connection.
You're trying to connect to a machine on a network that SQL Developer is unable to reach.
For a TNS connection,
Look at the appropriate TNSNames entry (you will have a tnsnames.ora) file, and find the IP address or network name associated with the connection you're trying to establish -
And then start by trying to ping that resource.
In this case, i'm trying to talk to a database on MY machine, on port 1521. Yours should look quite different.
If you're using a basic connection, then you can look at the connection properties and see what machine/port you're trying to communicate with.
Ping
If you can't reach that machine from your machine, there's zero chance you can connect to a database there.
So, always start with a ping.
Once you see that you can get to that machine, if you're still getting that message, the next thing to think about is blocked ports, the listener defaults to port 1521, but you'll see that in the TNS descriptor as well.
It usually happens when a another process is running on the same port or there is an absence of listener.
Go to Run>services.msc>OracleXETNSListener>Start
Try to reconnect.. Even if the error still prevail then go to cmd
Use code:
npx kill-port <portnumber>
The port number by default is 1521, but you can check the port number in database properties.
It is possible, that your connection is forbidden by the firewall -
go to Control Panel\System and Security\Windows Defender Firewall - Advanced - Outbound Rules - Add a rule. (If you have some antivirus firewall, add rules there)
Create a temporary TCP rule for your port and another rule for UDP. Allow all nets and comps.
Check the telnet connection as cmd -> telnet ->
open remote.host.address PortNumber
If you can connect now, then the problem IS in firewall - edit your new rules, setting the hosts and nets exactly.
This error is because your sqldeveloper is not able to reach the database server's sql service.
One reason could be lsnrctl is down for some reason.
If you have access to machine where database is installed.
In Windows machine, follow: https://www.youtube.com/watch?v=r9pHqOfV2f0&ab_channel=TLinaTutorials
In Linux/macOS machine: Go to $ORACLE_HOME/bin and check status of lsnrctl
execute from $ORACLE_HOME/bin lsnrctl status, if it's down. Then restart it by lsnrctl start.
Check the details of connection in command output like SID, PORT, HOST etc. and try connecting again from sqldeveloper.
I have launched an AWS RDS with Oracle 11g (on port 1521).
Tried to connect using Oracle SQL developer. While testing the connection, getting the following error..
Error:
Status : Failure -Test failed: IO Error: An existing connection was forcibly closed by the remote host, connect lapse 0 ms., Authentication lapse 0 ms.
Explored various options and even opened up the windows outbound port from my local laptop to 1521 port. Nothing helped so far a week.
Found a solution..
Just launched another windows instance in AWS and modified security groups to make it secure access.
Security Group changes:
Opened the 1521 port of AWS RDS Oracle to the new windows instance
alone
Windows instance is restricted to only from office public IP.
This does not solve the real problem. However, this solves my purpose..
Thank you all..
Why would a Visual Studio Web Deploy have a failure of "unexpected error occurred on a send" when publishing to an intranet site that resolves as an IPv6 address? I am assuming IPv6 had something to do with it because adding the IPv4 address to the hosts file resolves the issue and the web deploy succeeds.
Details:
Initially the build error came from a TeamCity build agent, but the same issue occurs when attempting to publish (or just validate the connection in the publish profile) from Visual Studio.
A ping (successful) to the target machine resolves to an IPv6 address which is identical to the address found from running "ipconfig" on the target machine itself, except for a different Scope ID on the tail end.
Windows UNC share paths to the target machines work fine
The target machine is actually the host of the VM on which the build agent runs.
Below is the error from validating connection on publish profile.
And detail from the original build/deploy attempt.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4276, 5): Web deployment task failed. (Could not complete the request to remote agent URL 'https://tapserver:8172/msdeploy.axd?site=MealPlannerCIAPI'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not complete the request to remote agent URL 'https://tapserver:8172/msdeploy.axd?site=MealPlannerCIAPI'.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Again I've fixed the issue, but it is a very baffling fix to me. What would break any of the msdeploy calls that is fixed by adding the IPv4 address to the hosts file when it is clearly already reaching that host using v6?
Have you checked the Option IP Address Restrictions in the Management Service-Configuration (IIS)?
Please be aware that you're always connecting with your local IPv6 address if you try to access an IPv6 target. If you have configured any restrictions, they won't apply for your IPv6 address as the restriction configuration is not compatible with IPv6. So your connection attempt will be declined automatically if you set Access for unspecified clients to Deny.
I am attempting to create a new Database Project in VS2010 via the New Project Wizard, and via this article: http://msdn.microsoft.com/en-us/library/aa833432(v=vs.100).aspx
I am on the 'Configure Build/Deploy' step, and am attempting to connect to a named instance of SQL Server 2008R2 that I just installed, called DEVELOPMENT. Assuming the server name is DB-01, I am using DB-01\DEVELOPMENT as the Server name in the dialog in the screenshot below. I'm also using the remaining settings in the dialog, but it keeps giving me the following error:
A network-related or instance-specific error occurred while
establishing a connection to the 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 - A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to
respond.)
DEV is the name of a database I created on the DEVELOPMENT instance. If I use DB-01 as the server name, which is the default instance, it connects. In the past, we've been developing from a database on the default instance, with no issues, but I'm trying to move to local, source-controlled databases. What am I missing with this not connecting?
EDIT: As a little more context, it's not the username/pw combination, or the existence of the DEV db on the instance, because I receive different errors if either of those are incorrect. It's simply not able to connect once I give it the named instance.
Figured it out:
The default instance of SQL Server (called MSSQLSERVER in some places) uses port 1433 by default for incoming connections, which was opened in Windows Firewall. This is why I was able to connect to the default instance (DB-01). If you've created a named instance of SQL Server, by default these instances use port 1434 for incoming connections. These are TCP ports for each case. Well, I have to admit that I opened TCP port 1434 in Windows Firewall and still was not able to connect to the named instance remotely, and still am not sure why this was the case. So instead, I opened up a random port (6969) in Windows Firewall, and configured the DEVELOPMENT (named) instance to accept incoming connecting over that port only. For instructions on how to configure specific SQL Server instances to use ports other than the default, see this article:
Configure a Server to Listen on a Specific TCP Port
Once I configured the instance to use port 6969, I was able to connect with no issue. Hope this helps others that are having a similar/same issue.