'MSSQL' encountered unexpected exception of type 'InvalidOperationException' with HResult 'x80131509' while opening connection - azure-machine-learning-service

When I am trying to load a query into a tabular dateset (from a devops docker image) I will get the following error:
raise DatasetValidationError(error_message + '\n' + str(e), e)
azureml.data.dataset_error_handling.DatasetValidationError: Cannot load any data from the datastore using the SQL query "<azureml.data.datapath.DataPath object at 0x>". Please make sure the datastore and query is correct.
Error Code: ScriptExecution.DatabaseConnection.Unexpected
Failed Step: 9ad57100-4870-49d2-a32f-1c9c15c244e0
Error Message: ScriptExecutionException was caused by DatabaseConnectionException.
DatabaseConnectionException was caused by UnexpectedException.
'MSSQL' encountered unexpected exception of type 'InvalidOperationException' with HResult 'x80131509' while opening connection.
Internal connection fatal error.
I believe that I have allowed the connection in firewall (I might not have done it quite right).
I don't get the error when I am running it from the notebook (on the compute instance).

Is the code that is running on the compute instance the exact same as the docker image? If so, it's likely that the firewall is causing connectivity issues. One way of checking this is to (be cautious) disable the firewall and see if the connectivity issue is gone.
If you're comfortable sharing the firewall/network configurations, that will also help troubleshoot this.

Related

Error when opening a terminal in Microsoft Azure Machine Learning

After creating a compute instance under Microsoft Azure Machine Learning and select Jupyter to open Jupyter Notebook, I am selecting a New terminal from the menu. However, I am getting the following errors:
terminado.js:4 WebSocket connection to 'wss://xalapa.eastus2.instances.azureml.ms/terminals/websocket/2' failed: Error during WebSocket handshake: Unexpected response code: 426
make_terminal # terminado.js:4
index.js:5 Uncaught TypeError: Cannot read property 'parentElement' of undefined
at proposeGeometry (index.js:5)
at fit (index.js:30)
at Terminal.terminalConstructor.fit (index.js:44)
at window.onresize (main.js:54)
I have recreated the compute instance with no luck.
Do you know what is the issue related?
Thanks
Looks like you might have your websockets blocked. Here is the troubleshooting doc: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-run-jupyter-notebooks#troubleshooting
If you can't connect to a notebook, ensure that web socket
communication is not disabled. For compute instance Jupyter
functionality to work, web socket communication must be enabled.
Please ensure your network allows websocket connections to
*.instances.azureml.net and *.instances.azureml.ms.
Looks like you cannot connect to your compute instance, and 426 means the server refuses to connect.
Could you try to open Jupyter / JupyterLab from the same compute instance?

pyodbc Azure transient error

My script is listed below:
import pyodbc
cnxn = pyodbc.connect(driver=driver,
server=server,
user=username,
database=database,
Trusted_Connection='yes',
autocommit = True)
However, I got error message:
('HY000', '[HY000] [Microsoft][ODBC Driver 13 for SQL Server]SQL Server Network Interfaces: The Microsoft Online Services Sign-In Assistant encountered an error that might not occur if retried. Possible reasons include a transient network error. [x80048849]. (-2147186615) (SQLDriverConnect)')
Anyone has idea? My error came out when I tried to connect to azure. In the error message, it said retried may work, but I have tried several times, and I still saw this error. I see most of people have this issue when they run the query. Please feel free to leave your comment.
I have figured out the issue. Because it is connected to Azure, i dont need to include Trusted_Connection='yes', which is for windows authentication.

Database Operation Failed: Azure SQL and Azure Data Factory

Database operation failed on server 'worker.database.windows.net,11146' with SQL Error Number '40197'. Error message from database execution : The service has encountered an error processing your request. Please try again. Error code 4815.
A severe error occurred on the current command. The results, if any, should be discarded..
I'm getting the following error. What does error code 4815 mean? Couldn't find any documentation regarding that error code.
The error 4815 means that the SQL Server engine received an invalid column length from the bcp client for colid. You might want to check the parameters again and try this task again.
Here is some documentation on the error codes. Hope this helps.
https://technet.microsoft.com/en-us/library/cc645613(v=sql.105).aspx

Error on project

Im getting this error running my project.
type Exception report
messageInternal Server Error
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/IFPWAFCAD"
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/IFPWAFCAD"
Anybody had a clue why this is happening?
Thanks for the help
This error could happened for many reasons (and since you don't upload more code its pretty difficult to help you).
First Possible Reason
You are getting this error "no suitable driver" because the resource referens isn't beed added to the web.xml deployment descriptor, so add the following code.
<resource-ref>
<description>Database for IFPWAFCAD application</description>
<res-ref-name>jdbc/IFPWAFCAD</res-ref-name>
<res-type>javax.sql.data source</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Second possible Reason
This may be tricky but check that there is not 'blankspace' on your xml files
Third possible reason
If you are deploying the current app lets call them "testApp" to a Webserver, have in mind that you should copy the mysql connector to the lib directory of that web server
Hope this Help You

How to handle DNS-lookup failure to Azure Blob Storage

(I'm quite new to Windows Azure development, so I hope I'm using the right terms.)
We have an Azure Worker Role that is supposed to fetch data stored in Blob Storage.
Somehow we occasionally get the following error message:
Microsoft.WindowsAzure.StorageClient.StorageServerException: The server encountered an unknown failure: The remote name could not be resolved: 'XXX.blob.core.windows.net' ---> System.Net.WebException: The remote name could not be resolved: 'XXX.blob.core.windows.net'
This seems strange, since requests only a second before and/or after works as expected.
If I understand things correctly, the CloudBlob class has internal retry functionality. It seems that this is not considered as a "retryable" error. Is this perhaps handled by the Transient Error Handling Block (Topaz), or do we have to handle this specific error in some other way?

Resources