TightVNC Java Viewer connection - java

I have source code of the tight VNC and installed 'Real VNC' on my local system. When I run the source of tight VNC, it asked for the host and port so I passed following credentials: Host: 127.0.0.1 Port: 5800. Then I can see the status as connected on the console of my eclipse. But I am not able to see my local screen. Can anyone help me that how can I record my local screen using tight VNC?
I am getting EOF exception.

Port: 5800 is a port that is mostly used by webSocket connections.
Try connecting through standart VNC port 5900.

Related

How to debug remote JVM exposed by ngrok tunnel

I have a java process on one of my machines listening on port 4502. I have created a tunnel using ngrok so that I can access the application on my development machine. The issue I'm facing is attaching a debugger to the remote JVM.
Here is the debug java configuration I'm using:
-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n
Here is the ngrok configuration for the tunnel to the application:
ngrok http 4502
Here is the ngrok configuration for the tunnel to the JVM (I have also tried http protocol with no luck):
ngrok tcp 5005
ngrok outputs the following for the tcp tunnel:
Forwarding tcp://2.tcp.eu.ngrok.io:10928 -> 127.0.0.1:5005
Using IntelliJ, I configure the remote debugging like this:
Debugger mode: Attach to remote JVM
Host: tcp://2.tcp.eu.ngrok.io
Port: 10928
I get the following error when starting the debugger:
Error running 'Debug Author Desktop': Unable to open debugger port (tcp://2.tcp.eu.ngrok.io:10928): java.io.IOException "handshake failed - connection prematurally closed"
On the machine running the java process, I have made sure that the 5005 port is open before starting the process. On the machine using IntelliJ, I have made sure that the 10928 port is open. What must I do so that I can attach the debugger to the process running on my second machine? Any help would be appreciated.
I've found the solution. The issue was in the Remote Debugger configuration. When specifying the host, you must not include the protocol. Once I changed tcp://2.tcp.eu.ngrok.io to 2.tcp.eu.ngrok.io, it worked!

sendmail SMTP connection timed out error at MATLAB

Kindly, I have the mentioned error for this code when running on Wifi while it works when using phone 3G hotspot:
username='XXX#hotmail.com';
pass='XXXXX';
port='587'; % hotmail
props = java.lang.System.getProperties;
props.setProperty('mail.smtp.starttls.enable', 'true' );
props.setProperty('mail.smtp.auth','true');
props.setProperty('mail.smtp.socketFactory.port',port);
setpref('Internet','SMTP_Server','smtp.live.com');
setpref('Internet','E_mail',username);
setpref('Internet','SMTP_Username',username);
setpref('Internet','SMTP_Password',pass);
sendmail(username,'Available');
Error:
Error using sendmail (line 171)
Could not connect to SMTP host: smtp.live.com, port: 25;
Connection timed out: connect
Should I change anything in the router settings?
enter image description here
You might have port 25 blocked. Try this:
telnet smtp.live.com 25
and copy results here.
Port 25 is often blocked by ISP to prevent spamming.
If you use Windows OS, you may have telnet client switched off in your system, so you are not able to use it in your command window (cmd). Go to Control Panel -> Programs and Features -> Turn Windows Features on or off and check Telnet Client.

connect failed: ECONNREFUSED

I am developing one app, and what I think I wanna do is receive data from server database in android. So I started to run some tutorials. I found one that is doing pretty much what I want.
But I am getting:
detailMessage "failed to connect to localhost/127.0.0.1 (port 8080): connect failed: ECONNREFUSED (Connection refused)" (id=830021648792)
Whole code of this tutorial is here link
Error occurs on :
OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
I checked that:
firewall is disabled
ping is working
connection string is exactly the same as when I run the servlet from server admin interface - http://localhost:8080/Requestor/RQSRV
-the servlet is running
My configuration :
Server : Glass Fish 4.0
Android App - Developed in Eclipse
Servlet - Developed in NetBeans
To access your PC localhost from Android emulator, use 10.0.2.2 instead of 127.0.0.1. localhost or 127.0.0.1 refers to the emulated device itself, not the host the emulator is running on.
Reference: https://developer.android.com/studio/run/emulator-networking#networkaddresses
For Genymotion use: 10.0.3.2 instead of 10.0.2.2
if you are using genymotion then go to command prompt type ipconfig
-find for Ethernet adapter virtualBox host-only network:
-find for Ipv4 Address..............192.1**.**.*
copy
http://192.1..*/foldername/filename/filename.json or filename.php
to check if its working go to browser in emulator copy paste the url you should find the file which you are looking in your browser..
Sorry for English..
This worked for me hope this might help some one..
Thank u..

Java Socket connection refused with my Public IP

I have a client server architecture project in android. I cant connect with my public IP to server. I closed firewall, and did the port redirection for server. My friend can connect from outside to my server, but i can't, why? how can it be?..
Thanks..
Which OS are you running your client server code. If Windows, look for c:\Windows\System32\drivers\etc\hosts, if it's linux go the /etc/hosts/ file
Open the file with sudo privileges.
Format:
<IP> <HOSTNAME>.<DOMAIN> <ALIAS>
Example:
127.0.0.1 localhost.localdomain localhost
Add your IP here with domain name. Your Domain Name can be anything and try again. Also your question is a bit vague. Please add more details such as your os env and what exactly are you trying to achieve?

Connection problem with sockets in java

i tried this code:
http://programming-guides.com/java/tcp-client-server-chat
(full example)
and it's working but when i switch the "host" int the client side to an external IP (insted of localhost) it give me this error:
"Cannot get IO for connection to.."
i treid to switch the port but it didnt work..
Is the server running on that remote machine? Is the port open in the firewall?
Try to netcat to the remote host. If you get an connection the example maybe wrong. If not, you cannot connect to that host: host not exists, not listen on that port, port is filtered, etc, etc.

Categories