Synergy connection timeout (Mac client, Windows 10 server) - virtualbox

[Apologies for posting a non-programming topic, but I thought this post would help others in need.]
I'm trying to get synergy working between a PC and a Mac.
I'm using auto-config, and all the default settings. It works perfectly with the mac as the server.
However, when the PC is the server and the mac as client, the PC first detects a zeroconf client, but then just sits there with no more log messages. Meanwhile, the mac client keeps "timing out" and never connects.
Things I've checked:
Windows Firewall is correctly configured to let synergy run - there
are rules allowing TCP and UDP connections for the synergy
executables
I've tried both 32 bit and 64 bit synergy versions
I've tried auto-config client, and also tried using the screen name and
the IP address.
I've tried running with elevated permissions
I can PING each machine from the other using the terminal - we are
connected to the same Wi-Fi network!
I have a Macbook (10.11) called Ian-Mac.local, with IP address 192.168.0.6.
I have a Windows 10 Laptop called Ian-PC with 5 different IP addresses listed. The default one is 192.168.56.1
Here's the debug-level log from the PC:
[2016-12-06T12:04:49] NOTE: started server, waiting for clients
[2016-12-06T12:04:49] DEBUG: event queue is ready
[2016-12-06T12:04:49] DEBUG: add pending events to buffer
[2016-12-06T12:04:49] DEBUG: screen "Ian-PC" shape changed
[2016-12-06T12:04:49] DEBUG: accepted ipc client connection
[2016-12-06T12:04:49] DEBUG: start ipc handle data
[2016-12-06T12:04:49] DEBUG: ipc read: IHEL
[2016-12-06T12:04:49] DEBUG: finished ipc handle data
[2016-12-06T12:04:49] DEBUG: ipc hello, type=node
[2016-12-06T12:04:49] INFO: watchdog status: ok
[2016-12-06T12:04:50] DEBUG: started process, session=1, elevated: yes, command="C:/Program Files (x86)/Synergy/synergys.exe" -f --no-tray --debug DEBUG --name Ian-PC --ipc --enable-drag-drop --profile-dir "C:\Users\Ian\AppData\Local" -c "C:/Users/Ian/AppData/Local/Temp/qt_temp.ZU7304" --address :24800 --serial-key MY_LICENCE_KEY --res-w 1920 --res-h 1080 --prm-wc 960 --prm-hc 540
[2016-12-06T12:04:55] INFO: zeroconf client detected: Ian-Mac.local
Here's the debug-level log from the mac:
2016-12-06T12:12:02] INFO: starting client
[2016-12-06T12:12:02] INFO: command: /Applications/Synergy.app/Contents/MacOS/synergyc -f --no-tray --debug DEBUG --name Ian-Mac.local --enable-drag-drop 192.168.56.1:24800
[2016-12-06T12:12:02] INFO: config file: /var/folders/k3/rzjn4xxj5tz3j1ygq72cwyj00000gp/T/Synergy.txK899
[2016-12-06T12:12:02] INFO: log level: DEBUG
[2016-12-06T12:12:03] INFO: drag and drop enabled
[2016-12-06T12:12:03] DEBUG: screen shape: center=0,0 size=1920x1080 on 1 display
[2016-12-06T12:12:03] DEBUG: starting watchSystemPowerThread
[2016-12-06T12:12:03] DEBUG: adopting new buffer
[2016-12-06T12:12:03] DEBUG: opened display
[2016-12-06T12:12:03] NOTE: started client
[2016-12-06T12:12:03] NOTE: connecting to '192.168.56.1': 192.168.56.1:24800
[2016-12-06T12:12:03] DEBUG: waiting for carbon loop
[2016-12-06T12:12:03] DEBUG: started watchSystemPowerThread
[2016-12-06T12:12:03] DEBUG: waiting for event loop
[2016-12-06T12:12:03] DEBUG: event queue is ready
[2016-12-06T12:12:03] DEBUG: signalling carbon loop ready
[2016-12-06T12:12:03] DEBUG: add pending events to buffer
[2016-12-06T12:12:03] DEBUG: starting carbon loop
[2016-12-06T12:12:03] DEBUG: carbon loop ready
2016-12-06 12:12:03.091 synergyc[1059:39119] starting cocoa loop
[2016-12-06T12:12:18] WARNING: failed to connect to server: Timed out
[2016-12-06T12:12:18] DEBUG: retry in 1 seconds
[2016-12-06T12:12:19] NOTE: connecting to '192.168.56.1': 192.168.56.1:24800
[2016-12-06T12:12:34] WARNING: failed to connect to server: Timed out
[2016-12-06T12:12:34] DEBUG: retry in 1 seconds

Synergy picked up the wrong IP address!
I have a Windows 10 Laptop called Ian-PC with 5 different IP addresses
listed. The default one is 192.168.56.1
Running IPCONFIG on the windows machine showed that the IP address picked up by synergy was for my "Ethernet adapter VirtualBox Host-Only Network". The issue was due to my installation of "Virtual Box".
Instead of using the default IP, I entered the one listed by IPCONFIG as "Wireless LAN adapter Wi-Fi", which was 192.168.0.4

I had this problem as well - but actually I was attempting to connect an iMac to a MacBook Pro running Win10 via Bootcamp (so basically the same problem). When I ran ipconfig and obtained the IP address for my wifi adapter, everything connected perfectly.
Thanks for giving me back the rest of my evening.

I was having the same issues with Barrier. Which is a fork of Synergy Core and Open Sourced.
So I'm posting how I resolved it. It might help somebody.
I had the same issues. After an hour of searching Internet, I got it working.
Barrier was picking up the wrong IP Address which was my Ethernet IP Address. Thanks to Ians Answer
So make sure you run ipconfig on the server, in my case, it's Windows 10
and see the correct IP Address Under Wireless LAN adapter Wi-Fi IPV4 address.
Make sure you give the same Screen Name
In my case, the name is mac (Windows 10 Screenshot)
Mac OS Screenshot
I had problems if my Wifi is set to password-protected (which is just my mobile hotspot). So to get around that I made it public and limited the connections to it.
That's it. I hope it helps somebody :)

Related

Could not connect to TCP port: Connection refused when trying to open Expo app on Android Emulator in WSL2

I've been following this guide https://medium.com/#pellea/using-adb-with-wsl2-7aebbb070a47 and so far have gotten to the point where WSL2 can see the emulator(s) running on Windows through Android Studios -> AVD manager. For example, on both Windows and WSL2, adb devices correctly shows:
List of devices attached
emulator-5554 device
However, when I go to my expo app and try to launch the Android emulator, I get the following error message:
Couldn't start project on Android: could not connect to TCP port 5554: Connection refused
This is after I've tried the following:
exporting ADB_SERVER_SOCKET=tcp:<MY IP>:5037 in my WSL2 profile(s)
Unblocking WSL2 vEthernet connections from my Windows firewall via (from the above link)
Set-NetFirewallProfile -DisabledInterfaceAliases "vEthernet (WSL)"
I've portforwarded 5554 from Windows to WSL2, as well as 5037 (from 0.0.0.0 to 127.0.0.1):
$WSL_CLIENT = bash.exe -c "ip addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'";
$WSL_CLIENT -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
$WSL_CLIENT = $matches[0];
iex "netsh interface portproxy add v4tov4 listenport=5554 listenaddress=127.0.0.1 connectport=5554 connectaddress=$WSL_CLIENT"
The ports are as follows:
netsh interface portproxy show all
Listen on ipv4: Connect to ipv4:
Address Port Address Port
--------------- ---------- --------------- ----------
127.0.0.1 8081 172.25.38.171 8081
0.0.0.0 5037 127.0.0.1 5037
127.0.0.1 5554 172.29.149.0 5554
Just had the same issue with Expo.
Here is what fixed it for me:
Check for a process that uses port 5555 (Terminal)
netstat -ano | findstr 5555
Kill the process using its ID (PowerShell)
Stop-Process -ID [PROCESS_ID] -Force
Then it started working.
I had the exact same problem, but with a different setup (using Expo with the Metro bundler on a Mac). I worked around it by trying different virtual device images. Maybe the same can help you.
The virtual device that works with me so far is the one selected in this screenshot: https://i.stack.imgur.com/CFTJ0.png. The other two in the screenshot have the same problem. I don't really know the actual reason, must be something with port access with those other emulated devices.
Image details:
Name: 4 WVGA (Nexus S) API 29
API: 29
Target: Android 10.0 (Google APIs)
CPU/ABI (x86)
I'm sure other images work as well (or configuring the others somehow), i just haven't tried many more because it takes so long and they're so big.
Did you try to map port 5554 to Windows IP instead? (or localhost). The Android emulator is running on Windows, not WSL2, so the port proxy should be from WSL2 to Windows, not backwards.
Have you already solved it in another manner?

How do I fix VirtualBox Bridged Adapter problem?

I have not had this problem in the past.
I have searched the internet but not found a solution.
I have asked the same question in Virtualbox forum but not received any answers.
I have the following setup
Host: Windows 10 (192.168.86.35), wired eth.
VirtualBox v6.0.16
Networking: Bridged Adapter
Guest 1: Ubuntu 18.04 (192.168.86.29)
Guest 2: Ubuntu 18.04 (192.168.86.26)
Both host and guests recieves IP from the same DHCP server and is on the same subnet.
Both host and guests can ping the DHCP server successfully or any WAN address for that matter.
The problem: However neither can ping each other.
Guest ping
avec#GUEST:~$ ping 192.168.86.35
PING 192.168.86.35 (192.168.86.35) 56(84) bytes of data.
^C
--- 192.168.86.35 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3050ms
Host ping
C:\>ping 192.168.86.29
Pinging 192.168.86.29 with 32 bytes of data:
General failure.
General failure.
General failure.
General failure.
Ping statistics for 192.168.86.29:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
What I have tried
Host: Turned Avast Shields off. There is no difference. I have not
tried to uninstall Avast it as I do not think this is the problem.
Guest: Condirmed Ubuntu firewall have "status: inactive"
Host: Repaired later reinstalled Virtualbox
Host: Started guest as Ubuntu Live cd. All is the same as running from the vdi (disk)
Host: Created a second Guest (cloned Guest 1 vdi)
Does anyone have any idea what the problem might be? I'm stuck.
I have found the solution and it had nothing to do with VirtualBox or the configuration/setup.
I had NordVPN installed and running as a background process on the host.
There is a setting in NordVPN called "Invisibility on LAN" defaulting to ON. That was the problem. As fast as I turned that setting to OFF host and guests could reach each other.
Turn 'invisibility on LAN' to OFF

How to setup VirtualBox network property to make ClickHouse callable on default port 8123 from master OS?

I made VM Ubuntu 16.04 with one network adapter "network bridge" and second adapter "internal network". ClickHouse DBMS installed by default.
Test call within slave Ubuntu curl 'http://localhost:8123/' returns Ok.
But the same call from master Windows host returns nothing :(
Telnet and browser from master OS on http://assignedIP:8123 returns ERR_CONNECTION_REFUSED.
At the same time pings slave Ubintu from master OS and opposite are successful.
How to setup VM's network properly to be able to call ClickHouse on port 8123 from master OS?
Found it!
Have to change
<listen_host>::1</listen_host>
to
<listen_host>::</listen_host>
in /etc/clickhouse-server/config.xml
Could you please check Unbutu firewall status. If it is up, bring it down and try.

Slamdata Issue in Ubuntu (14.04.3 LTS) AWS Bitnami instance

There isn't any error on installation and on startup I get the below message :
Server started listening on port 20223
Failed to open browser, please navigate to http://localhost:20223/
But the server is instance is not reachable # http://localhost:20223/ or
http://localhost:20223/slamdata/index.html
netstat -pnlt show the server is up & listening to port
tcp6 0 0 :::20223 :::* LISTEN 24564/java
any help ?
This was initially caused by a threading issue that was identified and resolved. If a user's virtual (or physical) environment had only one CPU available then the Scalaz executor might hang. It should not matter how many CPUs a server has now. See here for SD-1574 in JIRA.
Recent versions of SlamData (i.e. late April 2016 and newer) do not have this problem.

KGDB remote debugging connection issue via USB and Serial connection

I am having issues with serial and usb connection between host and target. Below is my setup. Both host and target do NOT have any serial (DB9) ports.
Host : Running windows + VMshare + Ubuntu
Target: Running linux kernel 3.19 . Has a MINI usb port which acts as a serial port, i think its ( CP210x uart to usb )
Connection 1 : Host ( USB to DB9 male-PL2303) + DB9 female to female + (DB9 male to USB) target.
Connection 2 : Host ( USB ) --cable-- (USB mini) Target
Host ( ubuntu VM ), can recognize the USB device (both connections types ) as /dev/ttyUSB0. The device does not show up on the windows device manager since VM takes over the device control.
Target boots into UEFI shell. I modify the syslinux.cfg file to append "kgdbwait kgdboc =ttyS0, 115200" to APPEND flag. Save the change ( press F2) then exit ( press F3 ). Boot into the image. Target now enters the kdb prompt with the following message
kgdb: Waiting for connection from remote gdb...
Entering kdb ( current= <64bit address>, pid 1) on processor 0 due to Keyboard Entry
Kgdb > _
on the host side, i do the following commands and below is error
root#ubuntu: cd /images
root#ubuntu: sudo gdb ./vmlinux
Reading symbols from ./vmlinux done.
(gdb)
(gdb) target remote /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Bogus trace status reply from target: timeout
Experiments i tried
on Host i used " target remote /dev/ttyS0 " , still same issue
Tried different cables in each connection ( 1 and 2 ) mentioned above
on Target removed the edit in the syslinux.cfg file in UEFI shell, booted the image and entered kgdb using "echo g > /proc/sysrq-trigger"
All kernel configuration related to KGDB* , KGDB_SERIAL*, KGDB_USB* are enabled
all available baud rates
Questions
If i use "kgdbwait kgdboc=ttyUSB0, 115200" instead of " kgdbwait kgdboc=ttyS0, 115200" the target does NOT halt. When the target boots up fully to login prompt, i can see the device is recognized as ttyUSB0 when using connection 1. However as it does not stop does that mean, KGDB using USB does not work ? or for USB debug , i need to use direct USB--USB wire ( connection 3 ) ?
does syslinux.cfg support USB debug? becuase there is a SERIAL flag which has value" 0, 115200 " where 0 refers to ttyS0. syslinux documentation does not have any values for USB type device.
using connection 2, why am i seeing the timeout and packet error issues
occasionally with connection 2, when i execute " target remote /dev/ttyUSB0 " on the host, i notice junk characters on the target. So there is some communication happening, so tried different baud rates still same issue. Does this indicate anything inherently wrong with my setup?
In many online forums/ documents i do not see the "entering kdb due to keyboard entry" when the kernel enters kdb prompt. is this unusual?
The setup of remote kgdb debug is a bit tedious. There are several prerequisites/limitations for the kgdb to work. I will try to break it down.
You have to prepare two machines in this setup.
HOST: Where the agent-proxy & GDB installed.
TARGET: The Linux system being debugged.
Connection Setup
[Host /dev/ttyUSB0] USB to Serial --------- COM port [Target /dev/ttyS0]
On the TARGET side, it's not possible to use the USB interface with kgdb. This is because all the USB-Serial driver (CP210x, PL2303, ...etc) did not implement the polling hook. You have to connect the COM port with a serial cable directly. It is ok to use the USB interface on the HOST side. Since it is a serial connection, you have to use a USB-to-Serial converter and install the proper driver on HOST.
Set the proper baud rate on both sides:
[Target] stty -F /dev/ttyS0 115200
[Host] stty -F /dev/ttyUSB0 115200
Make sure the serial connection works on both direction. You can use:
[Host] cat /dev/ttyUSB0
[Target] echo 'from TARGET to HOST' > /dev/ttyS0
[Target] cat /dev/ttyS0
[Host] echo 'from HOST to TARGET' > /dev/ttyUSB0
You should see the messages on both side of machine. If not, there might be some problems on the cable or driver.
Compile Kernel
Enable KGDB* , KGDB_SERIAL*, KGDB_USB*, DEBUG_INFO, DEBUG_INFO_DWARF4, MAGIC_SYSRQ in the kernel config. Compile and install on the TARGET.
The main purpose here is to enable KGDB feature & preserve debug information in vmlinux.
agent-proxy Setup
agent-proxy acts as a proxy for the TARGET's serial port. It splits up the serial port for multiplexing. One for primary console I/O, the other for GDB session. Thus, we can work on both simultaneously. You should run the agent-proxy on HOST machine.
git clone http://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git
cd agent-proxy ; make
./agent-proxy 5550^5551 0 /dev/ttyUSB0,115200
This will redirect:
TARGET's console to HOST:5550
TARGET's kgdb listening port to HOST:5551
Start To Debug
First, open the primary console:
[Host] telnet localhost 5550
Entering the kdb mode, either by:
[Target] echo ttyS0,115200 > /sys/module/kgdboc/parameters/kgdboc
[Target] dmesg | tail
(you should see KGDB: Registered I/O driver kgdboc, otherwise it failed)
[Target] echo g >/proc/sysrq-trigger
Or, by adding the following kernel parameters in TARGET's bootloader (for early kernel debug):
console=tty0 console=ttyS0,115200 kgdbwait kgdboc=ttyS0,115200
The TARGET machine will halt immediately once it breaks into the kdb.
At the same time, you will see a kdb prompt on the primary console:
....
Entering kdb (current=0xcb846c80, pid 2301) on processor 3 due to Keyboard Entry
[3]kdb>
Type kgdb then enter. The TARGET is now pending for remote GDB's connection. We will connect it from the HOST.
Host> gdb vmlinux
(gdb) target remote localhost:5551
Remote debugging using localhost:5551
kgdb_breakpoint () at kernel/debug/debug_core.c:1072
1072 wmb(); /* Sync point after breakpoint */
(gdb)
Enjoy your kernel debugging!