Connection refused on client and server, both are on MAC - ios

I am using Mac book and having client and server running on same machine. Server opens socket whenever it has to send command to Client. Problem is Client opens socket at startup but whenever server opens on . Ip adress is different. I would like to know if i create tunnel between these 2 sockets. Right now, while in server i am getting "Connection refused" error.
Any help is appreciated.
Thanks

Just use 127.0.0.1 loopback address for testing your initial socket code. Server bind()s and listen()s on some known port, client connect()s to it. Once you figure out that setup you can move on to routing between real addresses.

Related

ngrok and docker, failed to complete tunnel connection

i've changed nothing within my setup and ngrok seems to have stopped working for me.
Running ngrok http -host-header=rewrite launch.localhost:80 would usually work just fine.
This is my error:
The connection to http://d678207f86ae.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address launch.localhost:80.
Make sure that a web service is running on launch.localhost:80 and that it is a valid address.
The error encountered was: dial tcp: lookup launch.localhost: no such host
If I navigate to launch.localhost the docker server is running just fine.
Not too sure what kind of other information you'd need to help?
For me, it was never running before, but I was getting the same error for
ngrok http -host-header=rewrite launch.local:80
It helped when I changed it to
ngrok http -host-header=launch.local 80

Port forwarding, DMZ, turning off firewall and adding port doesn't work to reach out port

I am using Windows 10 with IIS 10.0
I am publishing website on IIS and I need to reach it with public ip.
What I did;
* Port forwarding through router
* Adding DMZ with my local IP
* Turning off firewall
* Adding port to firewall inbound rules with allow edge traversal
I can connect with internal IP like 192.168.1.75:81
I get "System.Net.Sockets.SocketException A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond from [MYPUBLICIP]" when I try to reach it like MYPUBLICIP:81
What are the possible scenarios that blocks to port?
Thanks.
As far as I know, the error message means there is no server listening at specified ip/port that you are trying to connect to.
In my opinion, you should firstly make sure your client machine could access your server by using this MYPUBLICIP address.
Then I suggest you could try to make sure the port 81 is your IIS web application port.
Besides, I suggest you could try to open your event viewer to find out the details error message.

Cannot Connect to a Firebird 2.5 database remotely

I currently have a Firebird 2.5 database at a client premises, installed on a Windows 7 Pro machine (32 bit), that has multiple stations in their local network that can connect to the database, along with the local machine being able to connect with our application and IBExpert.
However, for some of our software packages, a remote connection is required (outside of the local network). This previously was working but no longer works.
When I connect with FlameRobin from my office (I'm located in a different city / different network), I receive the following error message:
IBPP::SQLException
Context: Database::Connect
Message: isc_attach_database failed
SQL Message: -923
Connection not established
Engine Code : 335544421
Engine Message :
connection rejected by remote interface.
Performing this connection attempt with IBExpert, both from my office and from other external networks fail with a same message.
However, I am getting TCP/IP communication from what I can see. Here are the details of my troubleshooting steps for the last week:
Originally, I was receiving the following error when connecting from outside the network:
"Connection not established
Connection refused by remote interface"
Since that time, we have done a restart of the router and now have the current "connection rejected by remote interface." error message.
I can telnet to the public IP through port 3050 from my office and other outside networks.
I tested port 3050 on sites like YouGetSignal.com or CanYouSeeMe.org and they appear as open.
Other ports that we communicate on publicly are open and communicating.
The site has Kaspersky antivirus installed but all tests to connect via IBExpert while Kaspersky was in sleep mode behaved the same.
Installation of Firebird 2.5 to another workstation in the same local network, pointing to port 3051 (both in Firebird.conf and in the Windows Firewall and Router) show up as being open through Telnet and CanYouSeeMe.org but again, cannot be communicated on from outside via port 3051.
IBExpert works from a workstation in the network to the server
The server currently has no entry for RemoteBindAddress in the Firebird.conf
Wireshark shows that when a connecting from outside, there are packets coming through.
The TCP/IP test in IBexpert under Communication Diagnostics for the public IP as the host and the Service show the following Test Results:
Attempt connecting to XX.YY.ZZ.AAA.
Socket for connection obtained.
Found service 'GDS_DB' at port '3050'
Connection established to host 'XX.YY.ZZ.AAA',
on port 3050.
TCP/IP Communication Test Passed!
Database path, username, and password have all been checked multiple times.
locally on the server, I've changed security of the database.FDB and the security2.FDB to have Everyone, Full Control
At this point, we have a scheduled restart of the ISP's modem happening soon, although the fact that we have full TCP/IP communication over the port makes me doubtful that this is the issue.
If anyone can lead me down any recommended next steps to debug or to any tools that are available to help in this situation, that would be greatly appreciated.
This turns out to be a networking issue. We performed the following tests:
We performed a power cycle on the ISP's modem which showed no change in behavior
We connected a laptop directly to the ISP's modem but couldn't communicate to FB even with proper port forwarding rules in place on the machine and firewall.
We ran wireshark on both sides and on connection attempts, we found many attempts to connect with retransmissions that failed.
The technical team at the client side decided to install a VPN capable router and now we're good to go. From what we found there may be some kind of ISP blocking occurring as many of the tech teams remote services were failing to connect with similar behavior.
Hopefully this post helps people in the future with remote connectivity debugging, and all of the places you can look at when you're running into this problem.

Filezilla connection debugging

I know this question is too broad to answer, but I can't connect to a filezilla server I'm hosting.
The computer its on has a real IP address (not not).
I am allowing connections on ports 21 and 22.
I can connect from a local filezilla client over both ftp (mapped to port 21) and ftps (mapped to port 22).
Whenever I try to connect from another computer, nothing happens.
When I connect to a website hosted on the same computer (over http or https) the connection works fine.
The client just hangs and the server doesn't print any new lines, as if it has detected no connection at all.
How can I debug this problem? It seems too broad to really ask about, so how do I go about testing to improve the situation?
try telneting to the port :
telnet HOST 21
if you get any response, it should be from a ftp server.

"No connection could be made because the target machine actively refused it"

I have one server called 'testapp' and client machine called 'clientapp'.I am trying to install one windowservice called 'SVM' on client machine. If install 'SVM' in 'clientapp' and configure 'testapp' as Server here in this service tab, Then in server 'testapp' i can see client machine as connected and server will start monitoring.
But what actually going is i am not able to install windowservice on client. I am getting error which is mentioned down as trace file:
Actively refused it means that the machine was reachable but it replied with a nack.
This means that nothing is listening on that port for that IP address.
You have to assure that your server is listening and that he is listening for connections on your localhost.
It could probably help too if you just used 127.0.0.1 as local host. Whatever you put after 127. will connect you with your local host, but 127.0.0.1 is used by convention.
127.xx.xx.xx is reserved for loopback to the same machine - in other words, that's not actually trying to talk to the server. It's unclear where that address has come from, but if you find the right address, it may just start to work.

Resources