I am having an error when trying to change an iFrame's location.
WebSocket network error: The operation cannot be completed. (kCFErrorDomainCFNetwork Code 2)
I am having this exception on Safari Mobile (iPad). This error does not occur on Safari Desktop.
kCFErrorDomainCFNetwork Code 2 is kCFHostErrorUnknown. But, what does this mean and how can I fix this?
According to the documentation,
kCFHostErrorUnknown
An unknown error occurred (a name server failure, for example). For additional information, you can query the kCFGetAddrInfoFailureKey key to obtain the value returned by getaddrinfo and look up the value in /usr/include/netdb.h.
Where can I query the kCFGetAddrInfoFailureKey? Also, I don't think I can look up netdb.h.
I found the issue. Since I am using IP Address to access the server. The WebSocket server should also be IP Address.
Related
I am working oncan application which is to push records to azure table & blobs. My application ran for around 8 days perfectly fine but then it started giving connection time out error related to blob. Can anyone please guide to to workaround this?
Error logs below :
"java.net.ConnectException: Operation timed out (Connection timed out)\n\tat java.base/java.net.PlainSocketImpl.socketConnect(Native Method)\n\tat java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)\n\tat java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)\n\tat java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)\n\tat java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)\n\tat java.base/java.net.Socket.connect(Socket.java:609)\n\tat java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:299)\n\tat java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)\n\tat java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)\n\tat java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:569)\n\tat java.base/sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:266)\n\tat java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:373)\n\tat java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:203)\n\tat java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187)\n\tat java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081)\n\tat java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:189)\n\tat java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592)\n\tat java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)\n\tat java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)\n\tat java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:334)\n\tat com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:115)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.exists(CloudBlobContainer.java:744)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.exists(CloudBlobContainer.java:731)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.exists(CloudBlobContainer.java:705)\n\tat
To resolve the error "java.net.ConnectException: Operation timed out (Connection timed out)" try below suggestions if helpful:
Try setting a small timeoutInterval and use a large maximumExecutionTime in your blobRequestOptions.
If the above does not work, use fiddler to verify that you are sending and receiving a response as expected.
Try checking the code you are using to upload files to Azure blob.
Check the system configuration and make sure there is no firewall that blocks the request from Java.
Connection timeouts usually occurs if there are too many requests overloading the server.
Otherwise, try uploading blob in chunk as a workaround.
If still the error persists, try using code snippet mentioned in this link.
Check whether the IP address/domain and port are incorrect or down.
For more information in detail, please check below references:
java - Azure StorageException: An unknown failure occurred : Connection timed out: connect - Stack Overflow
java - What could cause socket ConnectException: Connection timed out? - Stack Overflow
Why would a "java.net.ConnectException: Connection timed out" exception occur when URL is up? - Stack Overflow
I'm trying to get the HTTP response code in an OnNavigateError event of a TWebBrowser. The StatusCode passed to me is always -2146697211 when it should be 404. What am I missing? I'm using Delphi 10.3.
TWebBrowser uses Microsoft's Internet Explorer, so information about the NavigateError event can be found online.
The explanation of the StatusCode parameter links to "NavigateError Event Status Codes" - there you see your typical 3-digit HTTP status codes, but also additional ones. Your decimal value of -2146697211 is $800C0005 in hexadecimal - both match the INET_E_RESOURCE_NOT_FOUND constant, which again links to another page:
It means "The server or proxy was not found."
Why is this a separate error code and not a HTTP one? Because it happens before HTTP is performed: looking up the IP address to a hostname has failed - nobody knows which IP address the hostname you tried to browse to has. That's what the Domain Name System (DNS) is for. Not being able to get in contact with a server is a different thing than being able and getting a response. HTTP 404 is a reponse. But since you don't even got a response, hence you cannot get a HTTP status code.
Long story short: host not found (instead of "HTTP 404" = host found, but not the page you're looking for). Try it with an address/a hostname that can be actually resolved.
I'm getting started with websocket-rails, trying to convert an old polling system for notifications (on Ruby 2.1/Rails 4.0) to something a bit more modern with WS. I'm using WebsocketRails in standalone mode, here is my configuration, basically, the default:
WebsocketRails.setup do |config|
config.standalone = true
end
I have also setup a fresh Redis running on the default port - there seems to be no communication issues here.
On the client side, I have added the websocket-rails's JS and when trying to open an connection and subscribe to a channel, with:
#dispatcher = new WebSocketRails "localhost:3001/websocket"
#channel = #dispatcher.subscribe "notifications"
I see an error in the Chrome console:
WebSocket connection to 'ws://localhost:3001/websocket' failed: Invalid frame header
In Firefox, the error is different but still an error:
The connection to ws://localhost:3001/websocket was interrupted while the page was loading.
From the websocket server logs, I can see that a connection has been initiated and then dropped, but there are no other logs, even tho log level is "debug"... There are no other errors that I can see and a cursory Google search doesn't bring up anything regarding "invalid frame header", so I'm pretty much stuck.
Any help would be appreciated!
EDIT: I ended up using NodeJS+Faye to get things moving, and it has been working so well that I'm happy to introduce this new moving part in the system. I'm sure the issue was just something temporary based on my specific setup but sometimes, you just have to get things done.
I think you are looking for the following resources:
From the question thread: debugging websocket in google chrome
Chrome developer tools now have the ability to list WebSocket frames and also inspect the data if the frames are not binary.
Process:
Launch Chrome Developer tools
Load your page and initiate the WebSocket connections
Click the Network Tab.
Select the WebSocket connection from the list on the left (it will have status of "101 Switching Protocols".
Click the Frames sub-tab. Binary frames will show up with a length and time-stamp and indicate whether they are masked. Text frames will show also include the payload content.
Theres also this (somewhat old) blog article from 2012: Inspecting WebSocket Traffic with Chrome Developer Tools
I think that there's something wrong with the format of the data being sent over the wire.
Carefully look at the format of the message. Has it been properly stringified? Do your brackets and parens, {}, [], and () all match? Did your IDE insert an extra somewhere? Try validating a message with a linter or an online validator.
Inspect the message on both the sender and receiver sides. Make sure that everything is correct.
This may not be the answer to the author's original question but I want to add a possible solution to this Invalid Frame Header error.
From my small research, Invalid Frame Header can be generated on Websocket protocol when the server sends an empty response (message with 0 length). 0 length in TCP signals that connection has been closed and therefore any data transmission after the empty message fails.
This is the link that helped me to find this solution. I hope someone in the future will find this useful and save some time.
I have a web application which i need to be load tested using LoadRunner. When I record the website using vugen it works good and there is no any application bug. But when I tried to replay the script, script failed after login and while navigating to next page, say, Transaction. At the end of log, I receive error:
Action.c(252): Error -26612: HTTP Status-Code=500 (Internal Server Error)
for "http://rob.com/common/transaction
Please help me to resolve this error.
LoadRunner generates HTTP request just as your browser does, this error is the same error you would get if you would go to that URL using your browser. Error code 500 is a generic server error that is returned when there is no better (more specific error to return).
Most likely the login process requires some form of authentication which is protected against a replay attack by using some form of token. It is up to you to capture this token using Correlations in LoadRunner and replay it as the server expects. The Correlation Studio in VuGen should detect and identify the token for you but since authentication methods vary it is sometimes impossible to do this automatically and you will have to create manual correlation. Please consult the product documentation for more details on how to do it. If your website is publicly available online then post its URL and I will try to record the script on my machine.
Thanks,
Boris.
Most common reasons
You are not checking each request for a valid result being returned and using a 200 HTTP status as an assumed correct step without examining the content of what is being returned. As a result when data being returned is incorrect you are not branching the code to handle the exception. Go one to two steps beyond where your business process has come off the rails with an assumptive success and you will have a 500 status message for an out of context action occurring 100% of the time.
Missed dynamic element. Record three times. Compare the code. Address the changing components.
I am working on MVC 4 web application. I need to know if there is a way to find the role of the currently logged in user in the Application_PreRequestHandlerExecute() function (present in Global.asax).
I used to use Roles.IsUserInRole("Admin") function to know if the user belongs to Admin role or not, but for some reason this function and User.IsInRole("Admin") function do not seam to work.
The above mentioned two functions are giving the following error:
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)
I tried searching for a solution but failed to find one. If someone has any idea and can guide me on this.
Thanks.