w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SSL handshake error javax.net.ssl.SSLHandshakeException Received fatal alert bad_certificate
You have to check that your cert has the proper info, you should check that the CN of your client cert has the same name as the server: CN=com.app.local After that with this command you can import you p12 to your JKS *keytool -v -importkeystore -srckeystore C:your_location our_file.p12 -srcstoretype PKCS12 -destkeystore d:certyour_store.jks -deststoretype JKS* hope it helps

Categories : Ssl

How to track down "Connection timout during SSL handshake" and "Connection closed during ssl handshake" errors
This sounds like clients who are going away mid-handshake (TCP RST or timeout). This would be normal at some rate, but 5-10% sounds too high. It's possible it's a certificate issue; I'm not certain exactly how that presents to Things that occur to me: If negotiation is very slow, you'll have more clients drop off. You may have underlying TCP problems which you weren't aware of until your new SSL endpoint proxy started reporting them. Do you see individual hosts that sometimes succeed and sometimes fail? If so, this is unlikely to be a certificate issue. I'm not sure how connections get torn down when a user rejects an untrusted certificate. You can use Wireshark on the HAProxy machine to capture SSL handshakes and parse them (you won't need to decrypt the sessions for handshake anal

Categories : Ssl

Connection loses on data-send. Server receives RST, ACK after handshake
I don't think it's related to your code, but I do have several questions: 1. What is the network speed between client and the server? Are there any packets lost for other applications? What's the size of the message sent from client? 2. How long is it between the RST received and the handshake finishes (server) or message sent (client)? 3. Do you know if there are any firewalls between the client and server? You also said it worked well on LAN. The China GFW often does so.

Categories : Sockets

How to avoid the 'tlsv1 alert unknown ca' error in libmproxy?
This happens when the proxySG certificate that is presented to the user isn't signed by a trusted CA. I had this error too, I fixed it by pushing the CA (the one used for ssl proxy) to the actual browser, through group policy.

Categories : Ssl

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. TCP provider, error: 0
Did you uninstall VS 2012 to "fix" this issue? Why can't you install .NET 4.5 on the server or copy the DLLs to the server per Marc Gravell's post at http://marcgravell.blogspot.co.nz/2012/09/iterator-blocks-missing-methods-and-net.html?

Categories : Asp Net

SSL Handshake between Java Server with Netty Frame and C# Client with dotnetasyncsocket
Answering my own question, turns out that there was no problem with the code! it's with the self signed certificate on the client side. I used keytool of java to make the self signed certificate but it didn't work when i used this certificate on c# client using dotnetasyncsocket. So what I did was obtain a certificate signed by CA on http://cert.startcom.org/ that is for free.

Categories : C#

Fatal: Server unexpectedly closed network connection
The command is working fine for me. However, your question suggests that you're trying to connect to an FTP server. WinSCP can handle both SCP/SFTP and FTP connections, but to my knowledge psftp supports only SFTP (a file transfer protocol based on SSH, not to be confused with FTPS). If your server is not an SSH server, you need an FTP client for the data transfer (e.g. ftp.exe shipped with Windows). If your server is an SSH server, try running psftp with the option -v to get more information, and also check the logs on the server.

Categories : Powershell

weblogic ssl handshake failure trust store issue
There are several other things you could try: Have you also tried JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.security.SSL.trustedCAKeyStore=/weblogic92/server/lib/cacerts" Try adding the certificates using the console (servers->server_name->keystores) You might also have to add following java options: -Dweblogic.security.SSL.verbose=true -Dweblogic.security.SSL.enable.renegotiation=true -Dsun.security.ssl.allowUnsafeRenegotiation=true In servers->server_name->SSL (advanced) check Use JSSE SSL. Check Use server certs. Change Hostname Verification to None

Categories : Ssl

"SSL handshake failure" Oracle ADF Mobile Webservice Integration
See if this helps: http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/security.htm#autoId18 Its from the documentation Frank

Categories : Oracle

Show an Alert Dialog when a server socket accept a connection
public void showDialog(Activity activity, String title, CharSequence message) { AlertDialog.Builder builder = new AlertDialog.Builder(activity); if (title != null) builder.setTitle(title); builder.setMessage(message); builder.setPositiveButton("OK", null); builder.setNegativeButton("Cancel", null); builder.show(); }

Categories : Java

FATAL EXCEPTION MAIN on socket based client/server app
Caused by: android.os.NetworkOnMainThreadException You're doing networking on the main thread. Move the networking code to another thread using AsyncTask. That should be a sufficient wrapper around threading for your needs.

Categories : Java

How to prompt a msgbox if connection in the server fails
in thius case you the ADODB.Connection object would throw an error on the Connect or Execute method. You can trap that error and handle it with the message box. Here is an example: dim adoCN as new adodb.connection dim sConn as string on error goto err_Connection sConn ="OLEDB;Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=VQPBOS;Data Source=" & "GHSI" & strcode with adoCN .connectionstring=sconn .cursorlocation=aduseclient .open end with exit sub err_Connection: msgbox "The Connection failed to server: " & "GHSI" & strcode & vbcrlf & vbcrlf & "Please check your connection settings", vbokonly+vbexclamation you can get correct Connection strings either from Connectionstrings.com or you could create a

Categories : Excel

Connection from IIS7 to sql server fails when outbound traffic is blocked
1433 is the port your remote machine listens to not the outgoing port of the clients. Outgoing ports are dynamically assigned by the OS. Go on a process basis. An outbound rule All Ports of w3wp to 1433 works.

Categories : Windows

C Sockets recv: connection reset by peer
Since you didn't post full code, I am going to take a stab at it and make an assumption: You populate the format string of "GET %s HOST:%s " with restOfURL and baseServer However, during the time of the sprintf call restOfURL isn't initilized so you're pushing garbage data into the first %s Either post more of your code or make sure you initialize resOfURL

Categories : C

Failure sending message in smtp/The SMTP server requires a secure connection or the client was not authenticated
Why this much blah blah codes. Just Try in Simple way., For Example: In your Web.Config / App.Config: <system.net> <mailSettings> <smtp from="Your Email ID"> <network host="Your Host Namecom" defaultCredentials="false" password="*********" userName="Your User Name" enableSsl="true" /> </smtp> </mailSettings> </system.net> In Your Code Behind: private void SendMail(string Address, string Body) { try { MailMessage mailMessage = new MailMessage(); mailMessage.To.Add(Address); mailMessage.Subject = "Your Subject"; mailMessage.IsBodyHtml = true; mailMessage.Body = Body

Categories : C#

iOS push notification alert message based on data in alert
No this is not possible in the way you want. iOS handles the push notification and your app has no influence on the way the notification is presented. iOS will just present what you send in the notification. However you can use localization to achieve what you want: "alert" : { "loc-key" : "ALERT_FORMAT", "loc-args" : [ "FriendsName", "pink"] }, Where the ALERT_FORMAT is a localization in you Localizable.strings file: "ALERT_FORMAT" = "Color from %@ is %@" But you will have to change the type of notification on the server, so the notification you send it an invite you will need to change the notification on the server. So you will send something like this for the invite: "alert" : { "loc-key" : "ALERT_INVITE", "loc-args" : [ "drinks", "adress"] }, Where the ALERT_INVITE is a lo

Categories : IOS

Efficiency of Python TCP socket recv(1) vs recv(n)
Getting big chunks is definitely more efficient simply because you are doing less operations. Think about it like this: if you have a message of length 1000, then your loop will fire 1000 times in first case and in second only 16. Performance loss is obvious. Of course this is because of Python, but even on OS level it is more efficient because of the same reason: making 1000 sys calls instad of 16. And scanning string (by the way: you should scan chunk instead of message) of length 64 is less expensive then 64 calls to recv. That's pretty much it.

Categories : Python

Is it possible to establish connection from backend server to Android phone, based on Google Account
that's what Google uses to install apps on device: http://developer.android.com/google/gcm/index.html You could theoretically use the same tool. The phone receives the cloud message and it initiates the connection without your home network. Probably this message would/could have your home network PC- addressing so it knows where to connect to. But the problem is that for this to work you need your own server running on the cloud to receive a message from the user computer, use the data in that message to create the GCM and send it to Google.

Categories : Android

How to close the ADO connection if the database connection fails while inside a transaction
Well, didnt do this in a long time but: 1) you have to start your transaction with db.BeginTransaction(); and not with BEGIN TRANSACTION ( http://support.microsoft.com/kb/198024/en-us ) 2) simply kill the transaction when you notice your connection went down via: SqlConnection db = new SqlConnection("ado..."); SqlTransaction transaction; db.Open(); transaction = db.BeginTransaction(); //.......... // stuff here //.......... if ( connGone ) { transaction.rollback(); db.close(); }

Categories : C++

Two problems with this java code, one fatal one not as fatal what are they?
Here is what I guess : CSVReader reader = null; try { reader = new CSVReader(new FileReader(filename)); } catch (FileNotFoundException e) { e.printStackTrace(); } String [] nextLine = null; // nextLine[] is an array of values in the current line try { while ((nextLine = reader.readNext()) != null) { currentRow = new ArrayList<String>(); for(String s: nextLine){ //Puts data into a row in an arraylist currentRow.add(s); } data.add(currentRow); //Adds row into arraylist } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } So what happens if you do not initialize CSVreader ? The next block will throw a NullPoint

Categories : Java

download multiple subsequent files from one server with one TCP handshake
Looking at you code, you keep receiving until the socket is close at the other side, so there is no way of using the same socket since it's closed. If you can program both, the server and the client, then, I would suggest one possible way of doing it, and that is with a protocol, instead of receiving the file directly, the first packet you get is an integer which indicates the size of the file you're going to receive. If that length is 0 (cero) it means there no more files and the connection should be closed. At the server: While (the_are_files_to_send) { Socket.write((int) FileSize); Socket.write(file's content); } Socket.Write(0); // No more files; Socket.Close(); At the Client: While ((size = Socket.read(buffer, 0, 4)) != -1) { int FileLength = convert_to _int(buffer

Categories : Android

Is there a Java API for GCM Cloud Connection Server
For the GCM Server there is a library, the javadoc is at http://developer.android.com/reference/com/google/android/gcm/server/package-summary.html There is a demo server app Google has written here at http://developer.android.com/google/gcm/server.html As I understand you can choose whether you want to use the XMPP service or the old HTTP service. Not sure what the advantage is.

Categories : Java

QSslSocket proxy server (https) and certs. Handshake error
I believe you need to call setSocketDescriptor before calling the setPrivateKey and setLocalCertificate methods. Below is code that I've used to create a HTTPS Server Socket, extending QTcpServer. void SslServer::incomingConnection(qintptr socketDescriptor) { QSslSocket *serverSocket = new QSslSocket; if (serverSocket->setSocketDescriptor(socketDescriptor)) { QFile keyFile(<sslKeyFileName>); if (!keyFile.open(QIODevice::ReadOnly)) { delete serverSocket; return; } QSslKey key(&keyFile, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey); if (key.isNull()) { delete serverSocket; return; } keyFile.close(); serverSocket->setPrivateKey(key); // to prevent asking

Categories : C++

Java - cannot connect to server - connection refused
"Connection refused" means that the connection attempt from the client reached the server (or a server), but there was nothing accepting connections at the specified IP address and port. Since you are using port 8001 in both cases, the simplest explanation is that either your server or your client aren't using the correct IP address to communicate with the other end. You're using this line to create the server socket: InetSocketAddress iaddr = new InetSocketAddress(InetAddress.getLocalHost(), 8001); the simplest explanation is that InetAddress.getLocalHost() isn't returning the same IP address that the client is using.

Categories : Java

how to send message to particular websocket connection using java server
You have to design an architecture for that. When a client establishes a connection with the server (opens the WebSocket), the server has to keep the connection somewhere (howsoever you're identifying a specific connection with the Java backend you're using), in a data structure that will depend on what you're trying to do. A good identifier would be an ID the user provides (like a nickname that's not already picked by another peer connected to the same server). Otherwise, simply use the socket object as a unique identifier and, when listing other users on the frontend, associate them with their unique identifier so that a client can send a message to a specific peer. A HashMap would be a good choice for a data structure if a client is going to chat with another specific client, as you c

Categories : Javascript

How to test whether MySQL connection has been timed out by the server (Java)?
I have encountered the same problem. A solution that must be tested is to call the "isValid(int timeout)" method from the java.sql.Connection Or set autoreconnect in mysql: http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html Or change the timeout in mysql (default = 8 hours): http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout EDIT: but I think that the best pratice is to open the connection during a transaction and then close it directly after that.

Categories : Java

Java: How to make multiple HTTPS request with only one SSL handshake?
I'm currently seeing seeing that each HTTPS request triggers a new handshake, albeit it's a session resume. How can I keep the SSL session alive between multiple HTTP requests? The fact that it's a session resume indicates that what you are asking for is already happening. The new connection is joining an existing SSL session. When you put HTTP keep-alive on top of that, whereby TCP connections are reused for multiple requests, with no re-handshake at all, there is really nothing left of your requirement that isn't already there. Your question doesn't make sense, or is already answered by the existing implementation.

Categories : Java

Android Fatal Connection with JSON
First, make sure your app requests the INTERNET permission. More on that here. Second, you can significantly declutter your code using the droidQuery library: public void getMovie() { $.ajax(new AjaxOptions().url("http://website.com/myphp.php") .type("POST") .dataType("JSON") .data("{ids: 1}") .context(this) .success(new Function() { @Override public void invoke($ droidQuery, Object... params) { JSONArray json = (JSONArray) params[0]; Object[] datas = $.makeArray(json); for (Obj

Categories : Java

Getting segfault due to string data type variable in PROTOBUF server and clent communcation through sockets on recv end in cpp
Your problem is here: star pkt; recv(csd,&pkt,sizeof(pkt),0); and here: star pkt; pkt.set_name("Pratap"); cout<<"Send Data without help of another variable.... "; send(sd,&pkt,sizeof(pkt) ,MSG_CONFIRM); You can't receive/send the star instance directly without de/serializing it from/to protobuf wire format first. Have a look at the ParseFrom SerializeTo methods of the protobuf::MessageLite class. The best way is to send the length of the serialized message first in a fixed format (e.g. a uint32_t in network byte order). Then the receiver can read this first and allocate a buffer of the appropriate size before receiving the serialized message that is send afterwards. UPDATE: Try s.th. like this: Sender.cpp star pbMsgObj; pbMsgObj.set_name("Pratap"); std::string pkt;

Categories : C++

Recovering jdbc connection after db link failure
Use a connection pool, eg Apache DBCP http://commons.apache.org/proper/commons-dbcp/ they restore failed connections automatically. It also a preferred way to work with DB connections.

Categories : Java

Chrome / Android Jingle-SDP ICE connection failure
So, as it turns out, LibJingle isn't yet equipped to work with SDP / ICE conversions. Specifically, LibJingle does not currently support the XEP-0176-compliant version of ICE signaling. So, the only recourse was to redo the system to an SDP based system.

Categories : Android

VB6 application on Citrix ODBC connection failure
I have received that same error about the null database in a classic VB 6 application but not using DSN and whenever I saw that error it was usually when it was querying a corrupt table. When was the last time that you compacted and cleaned the database out? Also, the error combined with disk or network error could have to do with write permissions and citrix, as if it is not able to write out the .ldb file or database lock file. Have you looked into your event viewer after one of these errors have occurred to see if that would shed some more light on an error happening at the same time?

Categories : Windows

SQL code to alert user if the above script fails
I assume if your script runs into problems, you kick out some sort of error code. Or, if successful, you kick out a success code. If you have these in place, you can have it redirected to call some sort of monitoring capability that will, in real time, be able to kick out the email. I guess you'll also want to log the event, with time stamp, so you can go in and do any fixing or analysis. Check out developer.alertcaster.com Though you already have a SMS client in place, you can use the monitoring-reporting-alerting capabilities it offers. Further, you can attached unique events in your script and it will keep track of it all for you. Also, if there is something catastrophic that happens, it will make a phone call to you - however you want to configure.

Categories : Mysql

TFS 2012 Alert when test case fails
It does not appear this is possible through the standard TFS alerts setup. The main issue is that the status of the test case (active, passed, failed) is actually associated with a test run and not the test case itself. The test run does not appear to be a work item I can query against. I believe we will go with creating a bug when a Test Case fails (easy enough to trigger emails regarding new bugs)...I think this maybe the more "traditional" approach in the Scrum template.

Categories : Tfs

Getting "Handshake failed...unexpected packet format" when using WebClient.UploadFile() with "https" when the server has a valid SSL certificate
You have to make sure the port you areconneting to is port 443 instead of port 80. Example of explictely setting the port to be used in the url: var request = (HttpWebRequest) WebRequest.Create("https://example.com:443/"); request.Method = "GET"; request.UserAgent = "example/1.0"; request.Accept = "*/*"; request.Host = "example.com"; var resp = (HttpWebResponse) request.GetResponse();

Categories : C#

database query hangs to DB2 server, using tomcat connection pool in java code
I'm not sure what you mean by "handling the connection properly". You could set the commandTimeout datasource property to terminate the query after some time if that's what you want. However, I have a feeling that the problem is on the database size. For example, you suffer from lock conflicts and the locktimeout parameter in the database is set to infinity, which causes some connections to wait forever. You probably need to talk to your DBA.

Categories : Java

scrapy User timeout caused connection failure
If you are scraping multiple images (especially from multiple domains), then downloads will happen concurrently and each download may take longer when compared to downloading a single image from the command line. Try decreasing the CONCURRENT_REQUESTS setting and increasing the DOWNLOAD_TIMEOUT. Check with scrapy fetch URL that you can retrieve the image to rule out a Scrapy issue. Finally, check the differences in request headers (User-agent, cookies, referrer, etc.), some difference here could account for a difference in the response from the server. If you can find a header that makes the difference, it's easy to change in Scrapy.

Categories : Python

'instance failure' error while connection string is correct
As you got the error "instance failure", that might be the error with your SQL Server instance.. Make sure your SQL Server instance(MSSQLSERVER) is running, where you can check in: Services list. TO get into services list: open run dialog box and type: "services.msc" (without quotes) and hit Enter. That takes you to services management console, where you can check whether your instance in running or not.. If the problem still persists, then try using: Data Source=.SQLEXPRESS instead.. :) Happy Coding... :)

Categories : Asp Net

How do I minimize or inform users of database connection lag / failure?
But are there ways to minimize connection lag / failure? Or a way to inform the users that something went wrong with the process? A rollback changes feature (either via program, or SQL), so that any incomplete data in the database will be undone? As we discussed in the comments, transactions will address many of your concerns. A transaction comprises a unit of work performed within a database management system (or similar system) against a database, and treated in a coherent and reliable way independent of other transactions. Transactions in a database environment have two main purposes: To provide reliable units of work that allow correct recovery from failures and keep a database consistent even in cases of system failure, when execution stops (completely o

Categories : C#

Oracle Database connection failure on VS 2010 C# express
The difference is SqlPlus uses a different data provider to connect than .Net. I have a blog post that talks about the minimum requirements needed for .net and oracle to work together. The main points to consider is to make sure you have the correct data provider (32 / 64 bit) and your oracle bin folder is in the path statement for the OS. The difference is SqlPlus uses a different data provider to connect than .Net. I have a blog post that talks about the basic requirements. Blog Post Link -Text from Post Download the latest Oracle 11g2 client software from Oracle. Note – Be sure to determine which bit level you need if using a 64 bit operating system. If your apps are compiled to 32 bit specifically then you must use the 32 bit oracle client. If they are compiled to run

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.