Visual Studio Remote Debug to Amazon EC2 machine - visual-studio-2010
I'm trying to use Visual Studio 2010 Remote Debugging to debug an app on an Amazon ec2 cloud machine [from here on called REMOTE) and have not been able to get it working.
0) The machines:
LOCAL is running Windows 7 Pro-64 bit
REMOTE is running Windows Server 2008-R2 64 bit
1) I've got the Remote Debugging monitor and whatnot on the REMOTE machine (and I have a lot of experience with remote debugging, just usually in simpler networking situations). I am using the 64 bit version of msvsmon.exe
2) The LOCAL machine's Windows Firewall is set to allow devenv.exe to send anything out.
Incoming rules allow port TCP 135, UDP 500 and 4500
Between LOCAL and the internet we have:
LOCAL Router
Forwards TCP & UDP ports 1-1193 and 1195-48999 to LOCAL
LOCAL Ooma box
Forwards TCP & UDP ports 1-1193 and 1195-48999 to "LOCAL Router"
I've tested forwarding with tcping.exe and port 45678 and that works, so I know the forwarding rules for the router and ooma box are working.
I've tested remote debugging to another machine on my local network and it works correctly. So if there are problems in LOCAL's firewall, it seems it could only be of scope (Private / Public / Domain). We have no domains involved here. As far as I can tell, I've checked all 3 boxes in every firewall rule I've looked at, so I don't think scope is the issue. Though I wonder about the
3) The EC2 firewall's security group settings allow inbound that I think apply:
TCP 135
TCP 139
TCP 445
TCP 4015
UDP 0-65535
4) On REMOTE I've created Inbound rules to allow:
TCP 135, 139, 445, and 80
UDP 137, 138, 500, 4500 (though I'm not using IPSec, as far as I know)
5) I also allow msvsmon.exe to configure the firewall to allow connections from any machine when I start it up, which is probably redundant, but at this point I'm trying everything.
6) In msvsmon, Tools > Options, I enable, "No Authentication (native only)" and check, "Allow any user to debug". Port is 4015.
7) On LOCAL I change Transport to, "Remote (native only with no authentication)". I put the REMOTE hostname in Qualifier.
Then, on REMOTE, the msvsmon shows, "Doug connected".
Great! Except I get nothing else. After a wait, on LOCAL I get, "Unable to connect to [hostname]. The remote machine is not responding."
8) I'm unable to close msvsmon on remote. I can click File > Exit, but msvsmon then freezes.
ProcessHacker on REMOTE shows these connections:
msvsmon.exe (7364), [REMOTE Hostname], 3893, , , TCP, Listen,
msvsmon.exe (7364), [REMOTE Hostname], 3894, , , TCP, Listen,
msvsmon.exe (4232), [REMOTE Hostname], 3901, [REMOTE Hostname], 4015, TCP, Established,
msvsmon.exe (7364), [REMOTE Hostname], 4015, , , TCP, Listen,
msvsmon.exe (7364), [REMOTE Hostname], 4015, [LOCAL hostname], 58007, TCP, Close Wait,
msvsmon.exe (7364), [REMOTE Hostname], 4015, [REMOTE Hostname], 3901, TCP, Established,
LOCAL ProcessHacker shows:
devenv.exe (4624), Ducky, 58175, [RemoteHost], 4015, TCP, FIN Wait 2,
If I want long enough, the "FIN Wait 2 connection" on LOCAL goes away, but the "Close Wait" connection on REMOTE does not until I kill the msvsmon process.
9) So it seems maybe REMOTE is trying to contact LOCAL on a different port and that doesn't come through? Or...?
I'm really out of ideas. Clearly I've got something wrong, somewhere. I've tried it with both LOCAL and REMOTE's windows firewalls turned off and get the same results.
Got it. At least, I finally got a real connection. I still don't know what port is messing things up.
I went to the Amazon EC2 and allowed all TCP ports through. I'd tried that earlier, but I must've had a problem somewhere else when I did. Now I need to find out what port was stopping things from working. I'll post here when I do.
Related
Local HTTP Server Only Access-able When Wifi is Turned Off
This was woorking for me a week ago and I have no idea what changed. I have a local http server on one device that I'm accessing with my Mac (through javascript),they are directly connected through Ethernet/a switch. I have the ethernet network on my mac set to a manual ip/mask to reflect the address of my server. I can interact with my server perfectly when wifi is turned off on my mac, however, when I turn it on everything breaks and my requests to the server time out with no response (wifi is still functional). Things I've tried: Changing the network priority in network system preferences on my mac to make sure the wired Ethernet connection takes priority over WiFi. This changed nothing Added a static route sudo route add -host [ip of http server] -interface en10. After I changed this, the server was unreachable even when wifi was down so I may have done something wrong rebooted :) I'm super lost here - any advice or any debugging tips would be much appreciated!
Perforce - Windows server 2016 can't connect from client
I am trying to set up my Azure Virtual machine to become a Perforce remote repository server. First let me take you through the installation of Helix on the server: And after the install is complete it says: So far so good now from my client computer (my local desktop) I attempt to connect to this server, however, I get an error: Now first I thought that the port wasn't open in my inbound so I added the following network rule in my Azure cloud portal: However, this didn't do anything for me and I get the same error. So now I am left kinda stranded. Has anyone had this issue and know how i can connect to my remote machine from perforce? From the comment below when i type p4 info i get the following: User name: ****** Client name: PerforceServer Client host: PerforceServer Client unknown. Current directory: c:\Users\***** Peer address: 127.0.0.1:50413 Client address: 127.0.0.1 Server address: PerforceServer:1666 Server root: C:\Users\*****\VersionControl Server date: 2018/11/21 14:44:12 +0000 Coordinated Universal Time Server uptime: 00:01:27 Server version: P4D/NTX64/2018.2/1724420 (2018/11/02) Server license: none Case Handling: insensitive However using the prefix PerforceServer:1666 i still cannot connect When running netstat: TCP 127.0.0.1:50688 PerforceServer:1666 TIME_WAIT TCP 127.0.0.1:50689 PerforceServer:1666 TIME_WAIT Also if i run p4d i get the following error: Perforce server error: Listen 1666 failed. TCP listen on 1666 failed. bind: 0.0.0.0:1666: WSAEADDRINUSE
Allow the port through the Windows firewall. 1)Press Windows logo + X keys on the keyboard and select Control panel from the context menu. 2)Select System and Security from the options and click on Windows Firewall from right side panel of the window. 3)Click on Advanced settings and select Inbound Rules from left side panel of the window. 4)Click on New Rule under Actions tab from right side panel and select Port radio button from the window. 5)Follow the onscreen instructions and check if the changes are effective.
Virtualbox socket hangup
I'm having problems connecting to my WebSocket server through the VirtualBox port forwards. The forwarding rules themselves work just fine (I use them all the time for http and ssh) and the WebSocket server does just fine aswell, when connecting from within the VirtualBox guest (via wscat for example). When I try to connect to the server from my host it says "Connection Reset" in my browsers and "error: Error: socket hang up" in wscat. If I remove the port forwarding rule from virtualbox or change the port the server is running on (which is more or less the same thing), it says "error: Error: connect ECONNREFUSED", which means that there is at least something going on. The WebSocket server console does not say anything when connecting from the host.
Well, this is embarrassing. The only thing I had to do was change the address for the WebSocket server to run on to 0.0.0.0 instead of using localhost ...
Raspberry Pi SSH connection over Ethernet fails
I'm trying to establish a connection over SSH from my Win 8.1 laptop to my raspberry pi 3 model B as the host. Connecting over wifi works flawlessly each time, however I need to demo projects in class and the campus wifi does not play well with SSH, our professor stated that we must use an Ethernet connection. I have tried both putty and Bitvise SSH clients with same results - either "connection refused" or "no connection could be made because the machine actively refused it". I have tried: Enabling internet sharing on the Ethernet connection and enabling the SSH services (port 22 both TCP and UDP) Disabling wifi on Win Forgetting wifi on raspberry Manually activating SSH server on raspberry even though I'm pretty sure it was activated already. Deleting SSH keys from the wifi sessions Completely disabling the firewall ipconfig /release ipconfig /renew Restarting both machines after every of the above Reimaging memory card with newest Raspbian Any help would be greatly appreciated. Edit: The link What can be the reasons of connection refused errors? did not help, the listed reasons are closed ports or firewall and as I already said I tried to open the required ports through the shared Ethernet connection and turned off Windows firewall completely with no other firewall programs running. From my understanding Raspbian doesn't come with any enabled firewalls and allows all traffic. Can someone correct me if I'm wrong?
I finally found a guide that works: http://www.circuitbasics.com/how-to-connect-to-a-raspberry-pi-directly-with-an-ethernet-cable/ The crucial step was to set the static IP address of the pi to my laptop's Ethernet adapter address but modify the last part. You're welcome, all you poor souls from the future.
Firewall settings for remote kernel to work (Mathematica)
What firewall settings must be used on the remote machine for a remote kernel connection to work? In particular I'm interested in connecting from Windows (front end) to a Linux machine (kernel).
I don't know the exact ports, but this is a generic way to solve most such firewall issues: (at least with connections using TCP) Try to use the 'netstat -n' command and see which remote ports do the connections that are being blocked by the firewall use. They should be in the SYN_SENT state or something similar. Then on the remote machine open those ports and try to repeat this process until it works.