PDA

View Full Version : Local server not found error (Mac-OS FGU)



Mirloc
December 6th, 2019, 15:27
I installed and updated FGU on Mac-OS Catalina (10.15.1) this morning.

1. Click on HOST CAMPAIGN
2. Select Server Type: LOCAL
3. Select any game system (or new)
4. Select START.

There is a pause and this error shows:

30679

It works perfectly if you choose Cloud hosting, so I'm not sure what's not communicating inside there.

Contents of CONSOLE.LOG:

[12/6/2019 9:42:59 AM] [NOTICE] Launcher scene starting.
[12/6/2019 10:21:12 AM] [NOTICE] Spawning private server.
[12/6/2019 10:21:17 AM] [NOTICE] Connection error - Unable to connect to game server. Verify network access, and try again.
[12/6/2019 10:28:18 AM] [NOTICE] Connection error - Cancelled by user.

(edited to add console.log contents)

Star Drayke
December 6th, 2019, 15:33
I also had this question, how is the connection tested for port forwarding, I have a couple of screenshots.
I'm on Mojave, I have the port open in Firewall, and port-forwarding set up on my router.

30681
30680
30682
30683

Moon Wizard
December 7th, 2019, 00:30
@Mirloc,
Thanks. I've filed as FGU-788 for the local server issue. The difference is whether the server is instantiated locally or on our lobby/cloud server; the GM actually connects to their own server, even locally.

@gfrear,
FGC tests the port forwarding connection by setting up a mini-server on port 1802, and then asks the FG web server to try to establish a connection.
FGU is using a networking library that attempts to set up port forwarding for local servers, but also allows a cloud server to facilitate connections. There is no way to check port forwarding on local servers in FGU currently. However, you can always you canyouseeme.org and related sites to test port 1802 once you have started a campaign in local server mode.

Regards,
JPG

Star Drayke
December 7th, 2019, 00:54
Thanks @Moon Wizard,

I guess my issue is the same as Mirloc, I can't get a local server running, independently if 1802 is open or not.

Cheers,
GFP

Moon Wizard
December 7th, 2019, 01:01
Thanks for confirming. I'll need our Mac guy to investigate next week.

Regards,
JPG

PhilAdams
December 7th, 2019, 02:38
I tried to confirm this last night. Third Mac user who can't create a local server. Cloud server is fine.

Also, there's no way to tell it which IP to grab. It grabbed my WiFi IP. I use my CAT-5.

LordEntrails
December 7th, 2019, 02:46
I tried to confirm this last night. Third Mac user who can't create a local server. Cloud server is fine.

Also, there's no way to tell it which IP to grab. It grabbed my WiFi IP. I use my CAT-5.
In Windows FG grabs the connection that has priority. This can be changed in the registry, but have no idea if such is possible on a Mac. I'm Apple ignorant! (Intentionally, it keeps the help requests from family to a manageable level!)

Moon Wizard
December 7th, 2019, 05:17
On Windows, you can usually define network interface priority order, so that the interface you want to be your default is used first before others. Is there something similar on Macs?

Regards,
JPG

jrowsey1
December 7th, 2019, 05:38
I too can’t host a game on a local server using Mac OSX. Cloud server works fine.

Chris CB
December 7th, 2019, 08:37
On Windows, you can usually define network interface priority order, so that the interface you want to be your default is used first before others. Is there something similar on Macs?


There is something similar.

OSX Preference > Network
At the bottom of the list there's a cog. Click on it and select the option to define "Service Order" (I don't know what the exact menu name in english, but it's "Définir l'ordre des services" in french).

Moon Wizard
December 16th, 2019, 20:01
Ryan and I sat down to try and figure out what was causing the local server to fail on the Mac today; and when we ran the latest Mac build, the local server was already working. However, I want to figure out whether this is something we fixed, or whether it might be a configuration issue we need to look into more.

Can some of the Mac users try running a local server, and let us know your results?

Thanks,
JPG

PhilAdams
December 16th, 2019, 21:59
I'll test tonight.

PhilAdams
December 17th, 2019, 02:35
The problem remains. I didn't update prior. I'm running the update now.

30882

PhilAdams
December 17th, 2019, 02:38
No change post-update.

Moon Wizard
December 17th, 2019, 03:14
Hmm, I wonder if it has something to do with NIC binding order. Are you familiar enough with Mac to try reordering the network card priority order on that machine to see if the order might get it to work?

Ryan (my Mac guy) is mostly out through Christmas and I don't have a Mac (or know how to use it well), so I won't have the ability to dig in until he gets back.

Regards,
JPG

PhilAdams
December 17th, 2019, 04:40
I tried this with my WiFi turned off and turned on. My router is configured to have port forwarding with the CAT-5 IP address. The CAT-5 interface is also the top service in my list.

I think someone said they had this problem connected to one network but not another (physically different locations).

30885

IdGibbins
December 17th, 2019, 04:59
I see the same behavior on macOS 10.14.6. I am running with the latest FGU updates but have seen the problem on each release that I've tried since the beta was released for macOS. I removed extra entries from the network service list (that's where the network interfaces are listed and prioritized) so I only have Wi-Fi listed there with no other entries but still see the problem.

Interestingly, in the Firewall Options (under System Preferences -> Security & Privacy -> Firewall), which is where you permanently allow incoming connections through the firewall, I can see listings for FGC but none for FGU. And each time I restart FGU and attempt to run a local server, I'm prompted to allow "FantasyGrounds.app" to accept incoming connections. It doesn't seem to store this setting as I'm prompted anew each time that the application is restarted. But this may not be related to the connection error as turning off the firewall temporarily eliminated the prompt but the connection error stayed the same.

Moon Wizard
December 17th, 2019, 17:58
Thanks for the information!

I wonder if the lack of the Firewall saving the access is indicative that it's not getting saved at all, and thus being blocked. I won't be able to test that scenario until Ryan is back.

Regards,
JPG

Star Drayke
December 18th, 2019, 03:16
Thanks for the information!

I wonder if the lack of the Firewall saving the access is indicative that it's not getting saved at all, and thus being blocked. I won't be able to test that scenario until Ryan is back.

Regards,
JPG

Hi Moon Wizard,
Just to confirm on both accounts:
I do get another allow app/firewall pop-up, and I get the unable to connect to host error, that's after the latest update.

Cheers,
Graeme.

Mirloc
December 18th, 2019, 15:14
Sorry for the delay, but I wanted to test with the 10.15.2 update (Catalina), and I am still seeing the same behavior even after the update.

mattash77
December 19th, 2019, 21:28
I'm having a similar issue starting a locally hosted session.

I installed FGU this week and began testing it on my MacBook Pro as well as a PC I have. I noticed on the forums there are several other Mac users that are having issues related to connecting to locally hosted games. I’ve been digging into the issue and found some interesting issues.

If I start with a v4.0.0 FREE client I can start a locally hosted session, but neither my PC or other Mac can connect. The host does start the session though

If I put in my license number for ULTIMATE and my host displays v4.0.0 ULTIMATE and attempt to start a session WITHOUT the firewall on the program hangs. If I have the firewall on, I get the same issue as the others in this thread. I’ve turned on logging within the program and found that a bunch of files are missing from the installation that are attempting to be loaded and may be part of the issue.

I am including a log file that might shed some light on the problematic issues.

I sent this in an email to support as well.

Moon Wizard
December 20th, 2019, 01:23
Thanks for the additional info, and the follow-up to support e-mail as well.

If you remove the license, you can run in free mode which does not try to start a network server, which appears to be the problem right now.

Regards,
JPG

IdGibbins
February 9th, 2020, 15:28
The current FGU provides an error with a stack trace when I attempt to run a local server:



[2/9/2020 8:37:43 AM] [NOTICE] Launcher scene starting.
[2/9/2020 8:38:32 AM] [NOTICE] Daily session backup created.
[2/9/2020 8:38:32 AM] [NOTICE] Starting private server mode. [(192.168.34.211:1802) (fe80::28f4:4b24:7743:700f%11:1802)]
[2/9/2020 8:38:37 AM] [<color="red">ERROR</color>] LAUNCHER START BUTTON: System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'Ids-MacBook.local'
at System.Net.Dns.Error_11001 (System.String hostName) [0x00015] in <ae22a4e8f83c41d69684ae7f557133d9>:0
at System.Net.Dns.GetHostByName (System.String hostName) [0x00021] in <ae22a4e8f83c41d69684ae7f557133d9>:0
at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00052] in <ae22a4e8f83c41d69684ae7f557133d9>:0
at NobleConnect.Mirror.NobleNetworkManager.OnStartSer verLANOnly () [0x00005] in <ddabc3e97a80408bb1c027166470a7ad>:0
at NobleConnect.Mirror.NobleNetworkManager.OnStartSer ver () [0x0005f] in <ddabc3e97a80408bb1c027166470a7ad>:0
at FG.NetworkLibrary.OnStartServer () [0x00000] in <ddabc3e97a80408bb1c027166470a7ad>:0
at Mirror.NetworkManager.SetupServer () [0x0006b] in <c426eb1cb8794c66adc84576c050b85e>:0
at Mirror.NetworkManager.StartHost () [0x00007] in <c426eb1cb8794c66adc84576c050b85e>:0
at NobleConnect.Mirror.NobleNetworkManager.StartHostL ANOnly () [0x00007] in <ddabc3e97a80408bb1c027166470a7ad>:0
at FG.NetworkLibrary.StartPersonalServer (System.Int32 BHOPPABLJNL, System.String BJGNJIDEFOF, System.Int32 KFDKFIABKNO, System.String OKMEPDIOKAF, System.Boolean KFPDBBGCDME, System.Boolean CMFJOCMLFOP) [0x00072] in <ddabc3e97a80408bb1c027166470a7ad>:0
at CDMNBKMEIBG.PGFIGJBOEAG (System.String OKMEPDIOKAF, System.String DMNMMAFPGKE, System.Boolean CMFJOCMLFOP, System.Int32 LACFKGCAMMF) [0x000d8] in <ddabc3e97a80408bb1c027166470a7ad>:0
at JECDJEHHEIE.ILNNFDLFCHH (System.String OEKADEOGOOL, System.String EDDLBLODPCM, System.String BOLDJMHMGNJ, System.String DMNMMAFPGKE, System.Boolean CMFJOCMLFOP, System.Boolean JOJMOLKGDPJ, System.Int32 PGGLDPLNGBD, System.Collections.Generic.List`1[T] GOEAJEEMHLH) [0x00089] in <ddabc3e97a80408bb1c027166470a7ad>:0
at FG.LauncherScene.GJBJEPOCJNF () [0x000a7] in <ddabc3e97a80408bb1c027166470a7ad>:0
at FG.LauncherScene.StartButtonClicked () [0x00037] in <ddabc3e97a80408bb1c027166470a7ad>:0


It appears that, despite already knowing the local IP addresses (they're visible on the "Starting private server mode" line before the error), the application is attempting to get local IP addresses by looking up the system's hostname. From a quick poke around Stack Overflow, this does not appear to be a reliable method on macOS. It's likely related to name resolution behavior for the .local domain used on macOS.

Moon Wizard
February 9th, 2020, 19:07
@IdGibbins,

This appears to be working on some Mac machines without issue. We actually tested that internally on a couple Macs before we released.

What version of Mac OS are you running? Anything else that you can think of as unique? (laptop vs. desktop, etc.) Also, do you remember the link on Stack Overflow where you read this?

I'll need to pass this back to network library developer; so the more information I have the better. Plus, if we can determine workaround, we can implement short term fix.

Thanks,
JPG

IdGibbins
February 15th, 2020, 16:41
Finally got some time to dig further into this and figured it out. I run my mac with all sharing services disabled (it provides a reduced attack surface). When macOS starts with all of its sharing services disabled, it doesn't start its mDNS service. mDNS is what resolves name lookups for the .local domain.

A solution to work around this is going to vary by macOS version. For my version (10.14.6 Mojave), a single sharing service that depends on mDNS can be temporarily enabled, for instance the Remote Apple Events service (found in System Preferences -> Sharing; Enable Stealth Mode in System Preferences -> Security & Privacy -> Firewall -> Firewall Options may also need to be unchecked). Once this has been done, mDNS will run for the next 120 seconds (or you could leave a sharing service enabled to leave mDNS on). While mDNS is running a Fantasy Grounds local server can be successfully started.

The error that I get should be replicable in recent versions of macOS by first disabling all services in System Preferences -> Sharing; and then waiting 120 seconds for mDNS to automatically stop (or restarting macOS so it isn't even started). A quick way to see if mDNS is disabled is to ping the system's hostname:



$ ping `hostname`
ping: cannot resolve Ids-MacBook.local: Unknown host


A correct fix for the network library that you're using would be for it to _never_ rely on hostname resolution to determine the local system's own IP addresses. It should instead get a list of network interfaces and work through the list looking for active unicast IP addresses. It's likely already doing this in some parts of the library since the log in my last post showed the correct addresses before the stack dump. Using the hostname to get the system's local IP addresses will work a lot of the time but not all of the time and may, as shown here, prove difficult to root cause why some people have issues and others don't.

Star Drayke
February 15th, 2020, 21:11
I had to add an entry to my hosts file

try this:
MyIP=$(ifconfig | grep 192.16| awk '{print $2}')
echo "$MyIP $(hostname)" | sudo tee -a /etc/hosts (use yr login password)
check:
cat /etc/hosts

Moon Wizard
February 15th, 2020, 22:05
I'll report to the network library creator.

From a quick search, the code setup they are using is fairly commonly used for .Net applications. I'm guessing your situation is uncommon.
https://stackoverflow.com/questions/6803073/get-local-ip-address

Regards,
JPG

zuilin
February 16th, 2020, 06:45
@Star Drayke - After adding the hosts entry (which for me is 10.0.0.41 My-MacBook-Pro.local) to hosts, how are you accessing the host? Are you using a second copy of the .app bundle and running it locally? Are you running from another computer? What are you entering in the "Join By IP and Port" field, the host name? (i.e. My-MacBook-Pro.local)

zuilin
February 16th, 2020, 07:07
Finally got some time to dig further into this and figured it out. I run my mac with all sharing services disabled (it provides a reduced attack surface). When macOS starts with all of its sharing services disabled, it doesn't start its mDNS service. mDNS is what resolves name lookups for the .local domain.

A solution to work around this is going to vary by macOS version. For my version (10.14.6 Mojave), a single sharing service that depends on mDNS can be temporarily enabled, for instance the Remote Apple Events service (found in System Preferences -> Sharing; Enable Stealth Mode in System Preferences -> Security & Privacy -> Firewall -> Firewall Options may also need to be unchecked). Once this has been done, mDNS will run for the next 120 seconds (or you could leave a sharing service enabled to leave mDNS on). While mDNS is running a Fantasy Grounds local server can be successfully started.

The error that I get should be replicable in recent versions of macOS by first disabling all services in System Preferences -> Sharing; and then waiting 120 seconds for mDNS to automatically stop (or restarting macOS so it isn't even started). A quick way to see if mDNS is disabled is to ping the system's hostname:



A correct fix for the network library that you're using would be for it to _never_ rely on hostname resolution to determine the local system's own IP addresses. It should instead get a list of network interfaces and work through the list looking for active unicast IP addresses. It's likely already doing this in some parts of the library since the log in my last post showed the correct addresses before the stack dump. Using the hostname to get the system's local IP addresses will work a lot of the time but not all of the time and may, as shown here, prove difficult to root cause why some people have issues and others don't.

I can ping `hostname` and it resolves my hostname to 127.0.0.1 just fine, giving me a good ping. However, the FGU problem persists. I have sharing services enabled and firewall off. I'm testing by running a second copy of the FantasyGrounds.app and connecting to localhost with the default port. I've also tried 127.0.0.1, my actual IP, and localhost.local. Still doesn't work. I wonder if it has anything to do, in my case, with running the second .app bundle. I suspect it doesn't but I don't know enough to figure it out. In the end, I have to be able to run a "client version" on the same laptop as I do in Windows.

Chris CB
February 16th, 2020, 09:52
It's normal that 127.0.0.1 (localhost) is working. Try using the "internal" IP on the server launcher and use it in the client.

I've tried to launch two instances on my mac and it's working in LAN mode as in cloud mode.

zuilin
February 16th, 2020, 13:18
It's normal that 127.0.0.1 (localhost) is working. Try using the "internal" IP on the server launcher and use it in the client.

I've tried to launch two instances on my mac and it's working in LAN mode as in cloud mode.


I have and no-go. I’ll have to watch logs and see if the server is actually running.

How are you doing the client? A separate copy of the the .app?

Chris CB
February 16th, 2020, 23:34
Nop. I've wrote a shell script :



#!/bin/sh

"/Applications/SmiteWorks/Fantasy Grounds/FantasyGrounds.app/Contents/MacOS/Fantasy Grounds"


I launch the server with the icon and the client with the script.

Star Drayke
February 17th, 2020, 02:36
Hi Kent,
Sorry, I had totally misunderstood the question. Chris had the answer. And my ip is on my home network, so yeah my bad.

So in my case I needed to add my local ip to /etc/hosts, and Chris's solution works like a charm.31651


The hosted campaign was LAN, and for the second instance to join I just used my local ip.

Moon Wizard
February 27th, 2020, 23:10
Please note that we just pushed a new version today that uses an alternate method to look up IP address for LAN server mode.

If you had a problem with this previously, can you please try updating to the newest version, undoing your workarounds, and see if you get the same error or not? If you can test, please let us know.

Regards,
JPG

zuilin
February 28th, 2020, 00:39
Hi Kent,
Sorry, I had totally misunderstood the question. Chris had the answer. And my ip is on my home network, so yeah my bad.

So in my case I needed to add my local ip to /etc/hosts, and Chris's solution works like a charm.31651


The hosted campaign was LAN, and for the second instance to join I just used my local ip.

Not sure what I should be looking at in your screenshot. That you have two copies running and it's connecting? I see that. That's good.

What are you getting at with the terminal shots?

Also, what's your /etc/hosts entry?

zuilin
February 28th, 2020, 00:40
Please note that we just pushed a new version today that uses an alternate method to look up IP address for LAN server mode.

If you had a problem with this previously, can you please try updating to the newest version, undoing your workarounds, and see if you get the same error or not? If you can test, please let us know.

Regards,
JPG

Out of the box, new computer (believe it or not), fresh install of FGU with today's build (2020-02-27) and still no go connecting to localhost or my actual IP (10.0.0.48). I can ping localhost and 10.0.0.48 just fine.

"Client" is just a copy of the .app called "FantasyGrounds copy.app"

FYI: No license entered in the License field. Just my username/password entered in those fields. Should be considered a nice, clean, "free", beta version.

Moon Wizard
February 28th, 2020, 00:45
The issue we were trying to address with this fix was whether the LAN server started without errors, per @IdGibbins earlier posts.

I'll have to see if Ryan (our Mac build guy) to see if he's seeing same issue. Any other Mac people who are having the same issue as @Kent Signorini?

Thanks,
JPG

Star Drayke
February 28th, 2020, 03:39
Hi Moon Wizard and Kent.

@Moon Wizard, originally I had errors on trying to start host via LAN, to fix it I just added my local ip to /etc/hosts, and then no issues.

@Kent, same deal, I just used the local ip to join, wait until host is completely up, and then join with client, using local ip. (not localhost-127.0.0.1)
31784
31785

And don't forget to hit the allow connections button. (firewall asks again every-single-time)

Cheers.

IdGibbins
February 29th, 2020, 21:51
The latest version successfully starts a local server for me without incident or workaround. Good job! :)