w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Establish remote SSL connection after or before local user connection for SSL wrapper?
For any kind of proxy server (including an stunnel clone), opening the backend connection after you accept the frontend connection is clearly much simpler to implement. If you pre-open backend connections in anticipation of receiving frontend connections, you can certainly save an RTT (which is good for latency), but you have to deal with the issue you hinted at: the backend will close idle connections. At any time that you receive a frontend connections, you run the risk that the backend connection that you are about to associate with this frontend connection and which has been opened some time ago is too old to use and may be closed by the backend. You will have to manage a pool of currently open backend connections and periodically close and refresh them when they become idle for too l

Categories : C#

Error on host m/c - can't establish a connection to the server at 127.0.0.1:8888
Did you change the Vagrantfile to do port forwardings? For example, in your case, host port 8888 <=> guest port 8000 Vagrant.configure("2") do |config| config.vm.network :forwarded_port, guest: 8000, host: 8080 end Refer to the docs: http://docs.vagrantup.com/v2/networking/forwarded_ports.html

Categories : Django

Unplugging causes Adb connection Error:An existing connection was forcibly closed by the remote host
Solution1 run this command: adb uninstall com.yourpackagename Solution2 This is not an answer to solve problem with unplugging. However, if you set android:debuggable="false" in your manifest, then running your android in release mode with the wire plugged in is quite fast. So if you don't switch devices, u don't need to unplug your device then. it is 10x speed up vs running in debug mode.

Categories : Android

An existing connection was forcibly closed by the remote host on WCF
"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host." This error could be generated because of Group Policy Settings. Try connecting to Analysis Service using SQL Management Studio, if error persist try to elevate the user privilages.

Categories : Wcf

UDP Socket: An existing connection was forcibly closed by the remote host
In BeginReceiveFrom your remoteEP should indentify the socket that is listening, mostly the same endpoint that you have used for the Bind. And in your callback method ReceiveCallbackUDP you should call EndReceiveFrom, as this is the corresponding Method to BeginReceiveFrom: EndPoint tempRemoteEP = (EndPoint)client.remoteEndpoint; int bytesRead = UDPSocket.EndReceiveFrom(ar, ref tempRemoteEP); See the Example in http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.beginreceivefrom.aspx, where tempRemoteEP passed to BeginReceiveFrom is the same Endpoint as sender passed to Bind.

Categories : C#

"An existing connection was forcibly closed by the remote host" in eclipse
Check to see if you have two versions of adb installed. Eclipse installs one and perhaps HTC Sync installed another. They might be different versions. You'll have to do some path trickery to get both apps to use the same version of adb. You can search for ADB in your path by entering the following in a command prompt: where adb.exe

Categories : Android

An existing connection was forcibly closed by the remote host("CommunicationException was Unhandled")
Try this settings: <system.web> <httpRuntime maxRequestLength="102400" /> </system.web> This will set the maximum message length to 100 MB. Check this MSDN page for more information.

Categories : C#

SocketException (0x80004005): An existing connection was forcibly closed by the remote host
This will happen when, as the exception implies, the remote host (server) closes the connection unexpectedly. This can be due to a multitude of reasons, but typically is due to an unhandled exception on the server side. Investigate the server code and go from there.

Categories : C#

"An existing connection was forcibly closed by the remote host" sporadic error from HttpWebRequest
You could have dangling connections, and in HTTP 1.1 you are limited to 2 connections. Try changing the HTTP Protocol Version used in the request: request.ProtocolVersion = HttpVersion.Version10; If that doesn't work, it could be taking a long time to resolve the proxy settings, which can be fixed by disabling the proxy settings in your application by adding the following to the .config file: <system.net> <defaultProxy enabled="false"> <proxy/> <bypasslist/> <module/> </defaultProxy> </system.net> If either of the above fixes the problem, I'd recommend adding a try...catch...finally block around your request code, to ensure that each request is properly closed and disposed of (try setting request = null in your finally statem

Categories : Asp Net

WCF 4 - An existing connection was forcibly closed by the remote host when DataTable is returned from service
Returning a DataTable is not always a best practice in doing web service, imaging your consumers are not using .NET, how would they serialize the message, what is the counterpart of DataTable in their language, blah blah. Regarding your questions, I think you should add diagnostics to be able to see the exactly happened: Add the following section to serviceModel <diagnostics> <messageLogging logEntireMessage="true" logMalformedMessages="false" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" maxMessagesToLog="300000" maxSizeOfMessageToLog="2000000"/> </diagnostics> And this section to 1st level of app.config or web.config <system.diagnostics> <trace autoflush="true" /> <sources>

Categories : Wcf

How to establish connection with database
you missed port number in getconnection() change con=DriverManager.getConnection("jdbc:mysql://localhost/hr","abilash","abilash"); to con=DriverManager.getConnection("jdbc:mysql://localhost:3306/hr","abilash","abilash");

Categories : Java

Not able to establish connection via SqlHelper class
Probably the problem is that there is no connection string on your config file with name Constr as, according error description, the problem should be on this line public static string Connect = ConfigurationManager.ConnectionStrings["Constr"].ConnectionString.ToString();

Categories : C#

Unable to establish connection with SQL Server on LAN
Have you checked to see that TCP-IP connections are enabled from the server? A lot of the time when testing locally on the server vs externally this can cause confusion. http://msdn.microsoft.com/en-us/library/bb909712(v=vs.90).aspx It's also worth double checking that the server exists and you can connnect to it locally via management studio.

Categories : Sql Server

Tor Browser Bundle can not establish a connection
I had the same problem, try to change the default bridges and try again. Check this question on tor.stackexchange. To have a short review, go to BrowserTorBrowserDataTor and open torrc file. Get new bridges and copy them into the file. make sure to add UseBridges 1.

Categories : Linux

Python code to establish an ssh to remote server and then connect to MYSQL
The ip address "127.0.0.1" that you use in your connection object refers to localhost, which is the computer the program is running on. You can't remotely connect to the localhost of another computer. You need to replace the host ip address with the ip address of the remote server. Also you should only need the MySQLdb.connect object, not the ssh object if you connect correctly.

Categories : Python

The network adapter could not establish the connection - Oracle 11g
I had the similar issue. its resolved for me with a simple command. lsnrctl start The Network Adapter exception is caused because: The database host name or port number is wrong (OR) The database TNSListener has not been started. The TNSListener may be started with the lsnrctl utility. Try to start the listener using the command prompt: Click Start, type cmd in the search field, and when cmd shows up in the list of options, right click it and select ‘Run as Administrator’. At the Command Prompt window, type lsnrctl start without the quotes and press Enter. Type Exit and press Enter. Hope it helps.

Categories : SQL

Port: Could not establish connection. Receiving end does not exist
I had this problem too. I checked my installed extensions and when I disabled the: Google Chrome to Phone Extension 2.3.1 the error stopped. If you don't have this extension installed, try to go over the installed extensions and disable one by one clicking the refresh between every one. You might found another extension that cause this error. Good luck.

Categories : Javascript

How to re-establish asyncore connection with server (solved)
The change I made was to override the handle_error method in asyncore above to simply call another method to try to initialize the connection again instead of closing the socket. As in below: (following code is added to DETClient above) def initiate_connection_with_server(self): print("trying to initialize connection with server...") asyncore.dispatcher.__init__(self) self.create_socket(socket.AF_INET, socket.SOCK_STREAM) self.connect((self.host,self.port)) def handle_error(self): print("problem reaching server.") self.initiate_connection_with_server() This solves the problem of the server not being available when this code is run. An exception is raised and handle_error is called which simply calls the initiate_connection method and tries to open the socket aga

Categories : Python

phonegap/msql(i) can't establish connection to database
Unless you've riddled the code with typos, you're mixing two entirely seperate mysql libraries: $con=mysqli_connect($host, $username, $password, $dbnaam);// or die($db_error1); ^---note the presence of an 'i' and in the other scripts: $result = mysql_query($sql) or die(mysql_error()); ^---note the LACK of an 'i' mysql and mysqli are NOT interchangeable, and connections established in one are utterly useless for the other. The mysql (WITHOUT an i) library is obsolete and deprecated. Stick with mysqli (WITH an i) only.

Categories : Mysql

when proxifier is running, eclipse says "Unable to establish loopback connection"
I'm facing the same problem as yours. A working solution for me is : Open cmd Type setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true Open file eclipse.ini ini your eclipse folder, add this line after -vmargs -Djava.net.preferIPv4Stack=true Open eclipse and see what happens. Proof : Source : http://hassanfathy.wordpress.com/2013/05/15/mengakali-eclipse-dan-android-sdk-manager-yang-ter-block-proxifier/ P.S. It's in bahasa indonesia language. You can use google translate for that site :D

Categories : Android

Java JDBC : establish a persistent connection which lasts days
You're jumping the gun a bit here. There's no evidence that the database connection is actually the problem. Usually if you were having DB connection issues you'd be getting an exception from the connection when you try to perform operations on it, a timeout, etc. You need to: Add detailed logging to your application, so you can see what it's doing as it progresses, and what it's trying to do when it stops; and Run it with -Xdebug and other suitable options for remote debugging, so you can attach a debugger to it when it stops and examine its state to see what it is doing at the time. Use the debugger user interface from NetBeans, Eclipse, or whatever you prefer to attach to the program when the logging indicates that it's stopped progressing. For logging, you can use java.util.loggin

Categories : Java

Android/WiFi Direct - how find pc with the smartphone and establish a connection
The PC does not need to be on a wireless network (that is the whole point of using Wifi-Direct) but to enable Wifi-Direct on a PC, you need to install the Intel MyWifi Dashboard software (full version) and also need to make sure that your drivers are updated. (http://www.intel.com/support/notebook/sb/CS-033660.htm)

Categories : Misc

Chrome Extention Port error: Could not establish connection. Receiving end does not exist
You'd need to use chrome.tabs.sendMessage to send messages to content scripts. From the chrome.runtime.sendMessage specification on Chrome's developer site: Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage. If this isn't a good option for you, you could have each content script open a port to your background page (which would probably need to be persistent) and then have your popup page send a message to your background page, which would relay the message through each of the ports to all of the content scripts to tell them to send a message back to the popup page. (Use chrome.runtime.connect.) Also, you've misspelled "persistent" in your manifest file. I don't want you to have to dig through cod

Categories : Javascript

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

why following code throwing exception while establish connection mysql to java using data source
Refer this link . You may get the solution. Which container you are using you will need to provide System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.apache.naming.java.javaURLContextFactory"); accordingly.

Categories : Java

How to check host connection with internet connection
use this method : public static boolean isInternetConnected(Context context) { final ConnectivityManager conMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); final NetworkInfo activeNetwork = conMgr.getActiveNetworkInfo(); final Dialog dialog = new AlertDialog.Builder(context).setIcon(R.drawable.ic_launcher).setTitle("Connection Error!!") .setMessage("Internet Connection not found. Check your settings.").setNegativeButton("ok", null).create(); if (activeNetwork != null && activeNetwork.isConnected()) return true; else dialog.show(); return false; } If you don't want to show the toast comment it. Don't forget to place permission in manifest file. Here is the permission : <uses-permission a

Categories : Android

Failed to connect to remote VM. Connection refused. when trying to debug remote java application in Flash Builder 4.7
Each debug argument must be placed in a line by itself, after the -vm argument. This should do the trick: -vmargs -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

Categories : Java

Different Characters returned via remote database connection utf8 than local connection
And your solution is: on the remote database, the data is encoded to utf8 twice, which yields incorrect results. There is no problem in your code, that database is at fault. You can fix it there (if it's a varchar, make a backup first!): convert it to latin1 first, then to binary then to utf8. An working sql fiddle to show you how is here, I'll paste the code here too in case sqlfiddle removes it somewhere in the future: -- database column correctly defined as utf8 CREATE TABLE base (col VARCHAR(128) CHARSET utf8); -- wrong data is entered: INSERT INTO base SELECT UNHEX('4672616EC383C2A7616973'); -- first, convert back to latin-1, we have now proper utf-8 data, but in a latin1 column ALTER TABLE base MODIFY COLUMN col VARCHAR(128) CHARSET latin1; -- convert to binary first, so MySQL leave

Categories : PHP

How to properly handle connection persistent things within node-mysql connection pooling
All transactions will happen in the context of a single connection. After you end or terminate the connection, you can no longer operate on that transaction. The general pattern is to open, query, close and unless you have a long running transaction, you won't have any problems of queries or variables bleeding over into other connections. In the event of a long running transaction, you will have to manage that connection object to make sure it exists and is only used by code that operates within that transaction.

Categories : Mysql

How to properly keep a DB connection from a Connection Pool opened in JBoss
How do I properly keep my connection opened? You must not do that, let the connection pool handle this. Behind the scenes, the connection pool will keep a bunch of database connections to the database engine (MySQL, Oracle, SQL Server... depends how you configure it) in SLEEPING state. When you execute this code: //avoiding all the particular exceptions just for code simplicity purposes... //in real world applications, you must handle each of these exceptions public Connection getConnection() throws Exception { ctx = new InitialContext(); ds1 = (javax.sql.DataSource) ctx.lookup(strDSName1); return ds1.getConnection(); } You're asking to the connection pool to retrieve one of these connections available. The connection pool will give you a database connection (if avai

Categories : Java

AngularJs - Router - ng-View - remote web address
I do not know if this is a Rube Goldberg job but I solved my problem by: Creating a dynamic iframe on a local template pointing to the remote address. In other words: .when('/WebMail', { controller: HomeCtrl, templateUrl: ' emplateswebMail.html' }) webMail.html: <iframe src="{{myAngular.iFrameSrc}}"> </iframe>

Categories : Angularjs

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption
Is it databaseName=MyDB or database=MyDB ? Try the latter. Are you on a Windows Machine? http://www.microsoft.com/en-us/download/details.aspx?id=24009 Download that and try to talk to your server outside of your code. The port query tool will show you if its a firewall (or similar) issue, outside of the code.

Categories : Java

SCP from remote host using groovy
In groovy, '0' is a String constant, not a char or byte. You can't subtract a String from a byte. Convert it to a char or use the first byte: byte b = 51 // ASCII '3' assert b - ('0' as char) == 3 assert b - '0'.bytes[0] == 3 A better way to get a digit from a byte is to use Character.digit(). For example: filesize = filesize * 10L + Character.digit(buf[0], 10)

Categories : Groovy

The backbone router isn't working properly
I think you need to move your script templates out of your .feed html element, when you render the HomeListView view it will remove everything inside its el, then the script templates will be unavailable to the other views that you are calling iside of the HomeListView. <section class="feed"> </section> <script id="homeTemplate" type="text/template"> <div class="home"> </div> </script> <script id="termsTemplate" type="text/template"> <div class="terms"> Bla bla bla bla </div> </script> <script id="privacyTemplate" type="text/template"> <div class="privacy"> Bla bla bla bla </div> </script> <script id="aboutTemplate" type="text/template"> <div

Categories : Javascript

How to properly use Backbone views and router
Unfortunately with Backbone (especially Backbone Views) there's not really a "proper" way to do things. There's no reference convention. A lot of people who use Backbone only use the Models/Collections and don't use the Views at all. In my opinion I would scrap having a view for a collection unless it's actually doing something important. Use the hierarchy App > ModelCollection+ModelViewCollection. So in your case: ItemsApp (Backbone.View) --ItemCollection (Backbone.Collection) --Item (Backbone.Model) -- SellerCollection (Backbone.Collection) --ItemViewCollection (Array) --ItemView (Backbone.View) -- SellerViewCollection (Array) So your ItemsApp would create and destroy ItemViews as the ItemCollection changes (listen to the events). The ItemView is responsible to know

Categories : Javascript

UDP with netty different pipeline per remote host not working
Made a fundamental mistake. With ConnectionlessBootstrap everything runs over the same channel and we were closing the channel after each call to the server...thus disabling UDP. That's what our TCP code does and it took a while to realize it works differently. Hope someone else saves some time and headaches off of this.

Categories : Java

RST request sent to the remote host after I send a SYN and receive a SYN-ACK
You can setup a firewall rule with iptables which will prevent the kernel from answering to your connections. libpcap gets the packets before the firewall denies them so you can still read them and respond to them yourself.

Categories : Networking

how to replace IP address on remote host using expect
Quote the “EOF” (here document marker) in the line where you use it, that is, change expect_transfer=`cat << EOF into expect_transfer=`cat << EOF or expect_transfer=`cat << 'EOF' When you do not quote the here document marker, the shell interpolates variable references like $ENV inside the here document. In your case, ENV='$HOME/.kshrc' so that Perl does not see $ENV{OLD} but $HOME/.kshrc{OLD} which is clearly wrong.

Categories : Linux

Recv() call hangs after remote host terminates
Assuming you want to continue to use blocking sockets, you can use the SO_RCVTIMEO socket option: SO_RCVTIMEO and SO_SNDTIMEO Specify the receiving or sending timeouts until reporting an error. The parameter is a struct timeval. If an input or out- put function blocks for this period of time, and data has been sent or received, the return value of that function will be the amount of data transferred; if no data has been transferred and the timeout has been reached then -1 is returned with errno set to EAGAIN or EWOULDBLOCK just as if the socket was specified to be nonblocking. If the timeout is set to zero (the default) then the operation will never timeout. So, before you begi

Categories : C++

Is it possible to install or update a Windows Service on a remote host in C#?
I would recommend looking at this existing question: Installing a windows service on a remote machine using a given username. In this answer they mention using "SC.exe". This is a tool in windows that allows you to "create and start a service". You should easily be able to run this program using the Process class in System.Diagnostics. For example here is code, based on the example by Patrick McDonald, that would start NewServ.exe on the computer "remotecomputer". Process process = new Process(); process.Start(@"C:WindowsSystem32SC.exe", @"\remotecomputer create newservice binpath= C:WindowsSystem32Newserv.exe start= auto obj= DOMAINusername password= pwd"); If this doesn't work, then you should be able to create your own installer, copy it to the remote computer, and then start the pr

Categories : C#



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