HAProxy loadbalancing Azure SQL login failed - azure-sql-database

I am trying to configure a HAProxy load balancer for an instance of Azure SQL, my config file is as follows;
defaults
mode tcp
balance leastconn
timeout client 30000ms
timeout server 30000ms
timeout connect 3000ms
retries 3
listen sql-db
bind *:81
mode tcp
balance leastconn
option log-health-checks
server DB-1 ********.database.windows.net:1433 check port 1433 inter 1000
This configuration file works fine when targeting an instance of SQL Server on an Azure VM. But when targeting Azure SQL the connections are denied due to a logon failure: "Cannot open server "..." requested by the login. The login failed. (.Net SqlClient Data Provider)" I am 100% sure the username/password are correct. They must be getting lost along the way.
Any ideas why this would be?
Thanks,
Jason

Turns out you need to specify the server name in the username when targeting SQL resources.
e.g. user#server

Related

filezilla can't connect to vsftpd with TLS, but does work with unencrypted connection

I set up my server on centos7
From client side(not localhost), I can connect and transfer files to server with unencrypted connection but can't connect with TLS
It's my vsftpd.conf:
listen=YES
listen_ipv6=NO
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
rsa_cert_file=/home/user/server/sync.crt
rsa_private_key_file=/home/user/server/sync.key
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
pasv_enable=YES
pasv_min_port=50000
pasv_max_port=60000
pasv_address=1.1.1.1
and filezilla's errorcode:
Connection attempt failed with "ETIMEDOUT - Connection attempt timed out".
425 Failed to establish connection.
How do I solve this problem?
This kind of error typically happens when a data connection cannot be created to transfer files or directory listings. Such data connections are done using dynamic ports, where in case of PASV the port to use is announced by the server within the response to the PASV command.
Firewalls often employ helpers to scan the traffic and look for such responses announcing which port the client should use - and then temporarily allowing such access. In case of plain FTP without encryption the firewall can see the response and determine the port to open - then it works. But, in case of FTPS the control connection is encrypted and therefore the firewall only sees encrypted communication and cannot determine the port to open - then it fails.

Cannot connect to SQL Server remotely from Management Studio

I have a SQL Server setup on one machine, where I have created a user and assigned a database to the user.
Now I want to access that server from client machine using management studio.
What I did:
I enabled remote access from Management Studio on the server machine from server properties and set authentication mode as "Windows auth and SQL Server auth"
I set TCP port as "1433" for IPAll in SQL Server Network Configuration and restarted SQL Server Services
I created an inbound rule in firewall settings to accept all connections on port "1433"
I added port forwarding in my router settings as follows: Router Port Forwarding
(That's my private IP address in destination address)
I types public IP (49.36.55.132\SQLEXPRESS) in client machine SQL Server Management Studio along with username and password with SQL Server authentication mode.
Getting this error on client machine:
Cannot connect to 49.36.55.132\SQLEXPRESS.
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
Check out your port forwarding on your Server machine, you should add your port on your modem.
change your port, 1433 is default port.so you need to have Dynamic Port for you service.
First you have to completely disable firewall in server machine and check if client machine sees server. After that if it's ok, check connecting with sql server management studio from client and at last enable firewall with rules to check if error is from firewall port settings.

Wait Operation Timed Out When Connecting to SQL Server

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)

apache mina FTPS on remote requets not works

For the Apache MINA FTP Server SSL FILTER configuration : I tried everything and I read more than 50 posts on stackoverflow to find the error. But still no solution.
Problem Is that,
When the SSL Filter Enabled for the Apache MINA FTP, it is working on server side and at the Server Locally FileZilla Client Can Access to server over implicitSSL it works without problem.
I allowed the 21 port and passive ports over firewall for all ips.
But when the remote client wants to access to the server, SERVER getting request but session.write not works then MINA can not switch to USER exec, SO REMOTE client can not connect FTP server.
But when I disable implicitSSL mode on SERVER side, CLIENT can connect . SO, without SSL, Client Connect Remote SERVER. It is tricky But WHY, what is the problem.
If the problem is firewall , why the client connects when I disable implicitSSL.
If the CODE is or configuration is the problem, WHEN I enable implicitSSL =true, WHY local SERVER filezilla application can connect to server over implicitSSL.
**
Please help.
**

create localhost connection in Oracle SQL Developer Tool

I want to create localhost connection in Oracle SQL Developer tool
my credentials are
username : SYSTEM
password : SYSTEM
Hostname :localhost or 127.0.0.1
port : 1521
sid : xe
When i connect i gives error The Network Adapter could not establish connection
The Network Adapter could not establish connection is caused because:
The database host name or port number is wrong.
The listener process (service) is not running. You can re-start it with the "lsnrctl start" command or on Windows by starting the listener service.
you have either the wrong SQL Developer URL or you have a basic SQL*Net connectivity issue! This error is most likely caused by one of these factors:
You are using the wrong URL
The wrong port number or IP address (or DNS host name) was used
The listener is not configured properly
The listener process (service) is not running. You can re-start it with the "lsnrctl start" command or on Windows by starting the listener service.
For a step by step checklist, see the notes on troubleshooting an Oracle connection problem.