Author Topic: Local Wan Server Error  (Read 1154 times)

justinISO

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 52
    • View Profile
Local Wan Server Error
« on: April 26, 2017, 01:35:36 PM »
Hello,

I am trying to set up a local server on WAN only, hosted by a Mac and accessed by a few computers on the network.
When my router is connected to the internet it works just fine. However, when I am connected to only the router with no internet, I get "Unable to resolve the external IP address" and "Network is unreachable".

Any thoughts on how I can fix this?

justinISO

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 52
    • View Profile
Re: Local Wan Server Error
« Reply #1 on: April 26, 2017, 01:53:19 PM »
Please excuse use of the term WAN, we kept referring to it as the wireless network and I misspoke. It is LAN only that we are trying to set up using a wireless router.

Thanks!

mythikos

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 18
    • View Profile
Re: Local Wan Server Error
« Reply #2 on: April 26, 2017, 03:26:02 PM »
Its hard to tell when you aren't giving any stack traces or code for us to see.

justinISO

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 52
    • View Profile
Re: Local Wan Server Error
« Reply #3 on: April 26, 2017, 03:41:57 PM »
The code is just the code from the example menu repurposed. For this test I have even reverted to just trying to get the example menu to run as is packaged with TNET, no changes at all. One issue I was able to resolve, was the "Unable to resolve the external IP address". That was fixed by changing the router mode (using an Apple Airport Extreme) to DHCP and NAT.

So now, the example menu shows the LAN address, but WAN stays at "resolving..." and I still cannot start a local server.

Would you be able to tell me how to obtain a relevant stack trace from my program?

Thanks!

 

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Local Wan Server Error
« Reply #4 on: April 27, 2017, 12:26:24 AM »
The "WAN: Resolving..." string is just debug info, it doesn't necessarily indicate a problem with TNet's functionality (similar to the UPnP message).

What do you mean by "cannot start a local server"? Is there an error message? There should be some info output to Unity's console. An error message would help us a lot, but if you want to help yourself I'd recommend setting a breakpoint on the TNServerInstance.Start(...) and TNManager.Connect() calls in ExampleMenu::DrawConnectMenu(). Step into those calls and see where it errors out (if it does error out).

justinISO

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 52
    • View Profile
Re: Local Wan Server Error
« Reply #5 on: April 27, 2017, 10:50:30 AM »
Well I was able to get it working last night. The only way I was able to make it work was to go out and buy a normal netgear router instead of trying to use the Apple Airport. It is interesting because we have two Airports, and the one connected to the internet worked fine, but the second one in the office that is just for local stuff and has no internet access would not work.

Thanks for everyone's help!
(Still curious as how to obtain a relevant stack trace for the TNET stuff if I get more errors in the future)
I was getting debug statements in Unity but I had already mentioned what they said "Unable to resolve external IP address" and "Network is unreachable" which didn't give me much.

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Local Wan Server Error
« Reply #6 on: April 27, 2017, 06:33:27 PM »
The unable to resolve external address message is simply debug info, doesn't provide any value. The network is unreachable message is a .NET message and could be the result of any network call. Without knowing which call produced the error it also provides no value. That's why I was asking if you were able to press the Start Local Server button and if any messages showed up in Unity's console. There should certainly be some message specifically as a result of pushing the button. From the info you've provided I have no idea when your error messages show up. Are they there on startup? Do they show up only when you push the button? Do they repeat for each button press?

Anyway, I'm glad you were able to resolve it. Maybe ArenMook can figure out what's going on and add support for your Apple Airport device.

On the topic of stack traces, each message in Unity's console comes with a stack trace: simply click on the message and ctrl+C (or whatever the copy keyboard shortcut is :D). You could also set a breakpoint and when hit your IDE / debugger should populate a call stack or stack trace window.
Example from Unity's console:
  1. EditorQuest ShowWindow called
  2. UnityEngine.Debug:Log(Object)
  3. EditorQuest:ShowWindow() (at Assets/Editor/EditorStoryManager/EditorQuestManager/EditorQuest.cs:40)
  4. EditorStoryManager:OnEnable() (at Assets/Editor/EditorStoryManager/EditorStoryManager.cs:112)
  5. UnityEditor.EditorWindow:GetWindow(String, Type[])
  6. EditorStoryManager:ShowWindow() (at Assets/Editor/EditorStoryManager/EditorStoryManager.cs:53)
  7.  

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Local Wan Server Error
« Reply #7 on: April 28, 2017, 10:33:42 AM »
If I understand you correctly... you're running a LAN-only setup. There is no internet access, correct? To determine the external IP, TNet needs to ping a website on the internet. It's the only true way to figure out the external address in the situation when you have multiple routers. Since your server has no access to the internet, it's not possible -- so you get the "unable to resolve" message -- because of course it can't resolve it without being able to access the remote website.