TcpTestSucceeded: False cannot connect to specific port - sockets

I am trying to connect to open up port 89 on my Windows machine so others can access it, but I'm having trouble doing so. I added a rule to Firewall to allow access to port 89, but it still seems like it's not working. Any advice on how to resolve or even how to debug?
PS D:\> Test-NetConnection devbox -p 89
WARNING: TCP connect to (fe80::188d:3b90:868b:c3f6%5 : 89) failed WARNING: TCP connect to (2001:4898:3:25:7975:d61e:f88e:bfe2 : 89) failed WARNING: TCP connect to (2001:4898:3:25:188d:3b90:868b:c3f6 : 89) failed WARNING: TCP connect to (fe80::4c9e:1380:c530:b43a%42 : 89) failed WARNING: TCP connect to (fe80::6d77:dd66:a5b1:902c%26 : 89) failed WARNING: TCP connect to (fe80::69d3:4282:2917:485d%18 : 89) failed WARNING: TCP connect to (fe80::c9a:5dbc:5823:fdd9%13 : 89) failed WARNING: TCP connect to (10.123.77.38 : 89) failed WARNING: TCP connect to (172.24.96.1 : 89) failed WARNING: TCP connect to (172.24.48.1 : 89) failed WARNING: TCP connect to (172.21.128.1 : 89) failed WARNING: TCP connect to (2001:0:d5b:9458:c9a:5dbc:5823:fdd9 : 89) failed ComputerName : devbox RemoteAddress : fe80::188d:3b90:868b:c3f6%5 RemotePort : 89
InterfaceAlias : vEthernet (New Virtual Switch)
SourceAddress : 2001:4898:3:25:188d:3b90:868b:c3f6
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : False

Be sure that you or your friend exactly do this:
Navigate to Control Panel, System and Security and Windows Firewall.
Select Advanced settings and highlight Inbound Rules in the left pane.
Right click Inbound Rules and select New Rule.
Add the port you need to open and click Next.
Add the protocol (TCP or UDP) and the port number into the next window and click Next.
Select Allow the connection in the next window and hit Next.
Select the network type as you see fit and click Next.
Name the rule something meaningful and click Finish.
That's all you have to do to open a firewall port in Windows 10
Many devices have open ports to send error reports to a server. But
the things is those devices are their to send and then recieve
acknowledgement to the sent packet. So what you need is a device to
recieve and then send to. To overcome this problem, you need to become
that server which the device request/send to and recieve the service
from it. You can send a .bat file to a friend/ victim laptop which cab
change its dns and gateway address to your server which you will be
running ,hence Becoming the middle man.(just an example)
Client tries to connect to IPv6 address: TCP connect to (fe80::188d:3b90:868b:c3f6%5 : 89) failed.
Maybe your server is listening only IPv4.
Also the problem may come from trying to connect to an IPv6 address instead of the IPv4 address that you are listening to. Instead, you can try entering the IPv4 address, 10.3.10.200, as the "ComputerName" to restrict the test to IPv4.
Notify me if this works for you.

Related

QuickFixN disconnect during the day and could not reconnect

We are using QuickFixN for sending orders to exchange and receiving execution reports.
If the VPN for exchange is disconnected during the day, the QuickFixN could not reconnect until the next day, despite having the ResetOnLogon and ResetOnDisconnected settings set to N.
We do not understand the reason: the sequence, or something else?
0171217-12:15:39.122 : Created session
20171217-12:15:39.129 : Connecting to 172.16.105.151 on port 10060
20171217-12:15:39.399 : Connection succeeded
20171217-12:15:39.423 : Initiated logon request
20171217-12:15:39.680 : Session FIX.4.2:NOOR->MBS disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)
at QuickFix.SocketInitiatorThread.Read()
20171217-12:15:41.140 : Connecting to 172.16.105.151 on port 10060
20171217-12:15:41.398 : Connection succeeded
20171217-12:15:41.399 : Initiated logon request
20171217-12:15:41.654 : Session FIX.4.2:NOOR->MBS disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)
at QuickFix.SocketInitiatorThread.Read()
Requests to exchange
20171217-12:15:39.423 : 8=FIX.4.2|9=65|35=A|34=7304|49=NOOR|52=20171217-12:15:39.415|56=MBS|98=0|108=30|10=192|
20171217-12:15:41.398 : 8=FIX.4.2|9=65|35=A|34=7305|49=NOOR|52=20171217-12:15:41.398|56=MBS|98=0|108=30|10=196|
20171217-12:15:43.397 : 8=FIX.4.2|9=65|35=A|34=7306|49=NOOR|52=20171217-12:15:43.397|56=MBS|98=0|108=30|10=198|
20171217-12:15:45.398 : 8=FIX.4.2|9=65|35=A|34=7307|49=NOOR|52=20171217-12:15:45.398|56=MBS|98=0|108=30|10=202|
20171217-12:15:47.399 : 8=FIX.4.2|9=65|35=A|34=7308|49=NOOR|52=20171217-12:15:47.399|56=MBS|98=0|108=30|10=206|
20171217-12:15:49.400 : 8=FIX.4.2|9=65|35=A|34=7309|49=NOOR|52=20171217-12:15:49.400|56=MBS|98=0|108=30|10=192|
Well the error means your counterparty is likely sending a TCP reset packet to you. So it looks like you're making the connection, but then failing the logon attempt and the result is the reset packet.
Is your username / password correct?
First of All , thank you #rupweb for your replay and interest to give a hand .Second , there were two sources of this problem : 1 - before disconnecting the client system -that connects to remote party - it must logout. 2 - the executable file of client system must run from the same physical location each time.Because, the Fix generates file to keep the sequence on my device to start another handshaking and connecting next time.

LibGDX: Error making a socket connection to *ip-adress*

I want to make 2 devices communicate via sockets.
I use this code for the client socket:
Socket socket = Gdx.net.newClientSocket(Net.Protocol.TCP, adress, 1337, socketHints);
(SocketHints: timeout = 4000)
I get a GdxRuntimeException each time this line is being executed. What is wrong with the socket?
Screenshot of stack trace
You get that message because the socket couldn't be opened.
Note the last line about the return in the API:
newClientSocket:
Socket newClientSocket(Net.Protocol protocol,
java.lang.String host,
int port,
SocketHints hints)
Creates a new TCP client socket that connects to the given host and port.
Parameters:
host - the host address
port - the port
hints - additional SocketHints used to create the socket. Input null to use the default setting provided by the system.
Returns:
GdxRuntimeException in case the socket couldn't be opened
Try doing some debugging to find out why you are getting this error.
Is the port already in use? Are you trying to open more than one connection on the same port? Is the server IP valid? Maybe something else is causing the issue?

Search and test connection to AWS RDS using Windows Power Shell

I am trying to install and configure TFS Server on Windows 2012 AWS EC2 instance. I will like to configure an RDS SQL Server as backend but I am facing some issues with the connection so I am testing the ports and the connection using this command:
Test-NetConnection -Port 1433 -ComputerName tfsserver.sqlserver.region.rds.amazonaws.com -InformationLevel Detailed
And the command result is:
ComputerName : tfsserver.sqlserver.region.rds.amazonaws.com
RemoteAddress : sql_server_address
RemotePort : 1433
AllNameResolutionResults : sql_server_address
MatchingIPsecRules :
NetworkIsolationContext : Internet
InterfaceAlias : Ethernet
SourceAddress : tfs_server_address
NetRoute (NextHop) : gateway_hop_address
PingSucceeded : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : False
Note: I changed originals IP address and RDS endpoint name
My issue here is:
The ping command is not allowed in my security group so how do I know if the connection is open because:
TcpTestSucceeded : False
Is that result related with the ping command or is the 1433 port closed? I will like to know if the connection is open.
That is a result of the tcp port not being accessible. Either as it's not open, its not allowed somewhere along the path (local firewall, route or RDS security group)
If you specify the -Port parameter then it's a TCP test not an ICMP echo (ping) https://technet.microsoft.com/en-us/library/dn372891.aspx

Alfresco smtp configuration for organisational mail

I am trying to configure smtp for organisational mail in alfresco 4.2e.
Here is my global configuration
mail.host=smthost.abcd.com
mail.port=25
mail.username=sameer#abcd.com
mail.password=password
mail.encoding=UTF-8
mail.from.default=sameer#abcd.com
mail.smtp.auth=false
I am unable to send the mail. Here is
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtphost.abcd.com, port: 25;
nested exception is:
java.net.SocketException: Network is unreachable: connect. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: smtphost.abcd.com, port: 25;
nested exception is:
java.net.SocketException: Network is unreachable: connect; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Could not connect to SMTP host: smtphost.abcd.com, port: 25;
I am able to connect using
telnet smtphost.abcd.com25
and I am able to ping
Your network (most likely your gateway) is telling you it cannot reach the network of abc.efgh.ijkl.com. If you test, make sure to execute telnet from the server giving you the error. Telnet should give you same error message.
tcpdump -n -i any port 25
will show all outgoing traffic targeting SMTP and should give you further information about the problem at the network level (such as IP addresses used).
After so much search I found the issue of the problem. The problem occured because java using IPv6 by default. To fix,
I disabled IPV6 on windows
Set the Java property as setx _JAVA_OPTIONS -Djava.net.preferIPv4Stack=true

XMPP server giving error "No response from server"

hi i am using smack.jar to connect to my gmail server. but xmppconnection.connet() is failing and it says that server is not responding . i am attaching the log. please help me out.
Exception in thread "main" Connection failed. No response from server.:
at org.jivesoftware.smack.PacketReader.startup(PacketReader.java:164)
at org.jivesoftware.smack.XMPPConnection.initConnection(XMPPConnection.java:945)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:904)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1415)
at JabberSmackAPI.login(JabberSmackAPI.java:29)
at JabberSmackAPI.main(JabberSmackAPI.java:79)
To be clear, the server isn't returning this error, because you haven't connected to the server yet.
It might be a configuration problem. If your server doesn't have a client DNS SRV record (e.g. _xmpp-client._tcp.gmail.com), then you'll need to pass the XMPPConnection object a ConnectionConfiguration with the name of the machine to connect to for your domain.
It is also possible that this is a network problem (connectivity, routing, firewall, etc.). To test for this, try commands like this on the command line:
% dig +short _xmpp-client._tcp.gmail.com SRV
5 0 5222 talk.l.google.com.
20 0 5222 talk2.l.google.com.
20 0 5222 talk1.l.google.com.
20 0 5222 talk3.l.google.com.
20 0 5222 talk4.l.google.com.
% telnet talk.l.google.com 5222
Trying 74.125.155.125...
Connected to talk.l.google.com.
Escape character is '^]'.
>
Note that you type the greater-than character. Most XMPP servers will disconnect you immediately at this point, since you've sent them XML that is not well-formed.
If you've got a network problem, you'll see something like this:
Trying 74.125.155.125...
telnet: connect to address 74.125.155.125: Connection refused
telnet: Unable to connect to remote host