Can't connect Gateway Mikrotik to The Things Stack running on Localhost

Hello, I set up on a virtual machine running Ubuntu 20.0.4 The Things Stack following the guide that provides the network and everything was fine.
Now I’m adding my gateway, which is a Mikrotik WAP LR8 kit, I configure it using Winbox.
The domain where i have hosted The things stack is on my IP from virtual machine and I’m able to access it from every device in my network.

Here is the winbox configuration
image
where TTN-PR is the address of my private server with The things stack.

I must specify that gateway and also a Lorawan device is working fine in public The Things Stack without any problem, the problem is when I use it in localhost.

And here is the gateway added on my localhost The things stack service, where you can see that it appears as disconnected.
ptura

I’m stuck here and I don’t know how to fix it

I would be glad to be helped as soon as possible.
Thanks!

There is an entire section in the documentation on doing this - did you follow it?

If it’s the documentation that I followed, yes. Could you please send the link where is the section? Just to check.

Actually I think that the problem is in the Mikrotik configuration, I’ve also tried chirpstack in localhost and it doesn’t found my gateway neither.

Just adding a server doesn’t make the unit use it. Did you change the Lora setting so the unit uses that new server?

To reinforce Jac’s comment above, there is no concept of server discovery.

You create a server that has an IP address, even if you access the console via ‘localhost’, on any IP enabled system, like a gateway, ‘localhost’ refers to itself, so you’ll have to enter the IP address of computer with your TTS.

As for the documentation, can you tell me which page you looked at please so I can verify.

Yes, i changed it in devices and enabled, there must be some other configuration according to winbox which is left.
I’ve thought something related to gateway IP which makes server address unreacheable

When you set the severer did you set it to Public?

https://www.thethingsindustries.com/docs/gateways/mikrotikrouterboard/

Yes, it is set up in Public with the following config
ura

Yeah, the IP address that I set is the virtual machine one, which is the one with TTS. And everything is fine with it. I followed this video from The Things Network to set it up.

And I looked at this page for Mikrotik config
https://www.thethingsindustries.com/docs/gateways/mikrotikrouterboard/
I followed every step and how I said, it’s working in Public TTS when I connect gateway to eu1.cloud.thethings.network has no trouble, the problem must come in the way Gateway try to connect to private TTS server address(IP address)

As loverly and fun as that video is, it refers to v3.7 and is dated 20th Jan 2021.

It’s now 27th Jun 2022 and we are on v3.20.1.

Maybe the official install documentation with, as mentioned above, the section on installing as localhost just for those who need to do it, may provide better information.

PS, back then I could only manage 10minutes & as Ben had to help me hack my way through getting a localhost version running, the ‘localhost’ docs came about because of that work, you’re welcome.

Obviously I didn’t follow only this video I followed at the same time the official documentation.
I don’t think it should be a localhost installation issue.
I think there’s something missing in Mikrotik gateway, because is the only part of official documentation that makes me feel that’s uncompleted or insufficient

I’d like to solve my problem, so anything that I could do, information to sent you about config or whatever… Please tell me

Obviously I knew this with my Crystal Ball - oh noes, its batteries have run out.

If you are running on a virtual machine that is also running Docker there are a few networking layers that have to be working just right - to clarify “able to access it from every device in my network”, does this mean that you can get the web console up on another machine?

Do you have a different gateway based on Packet Forwarder that you could try - preferably a Pi based one so you can see all the logs?

I have just known that I’m able to access console from PC where I’m running VM, but I’m not able to get web console on another machine.
Probably there is the problem, Must IP from VM be unreacheable because it isn’t in the same IP range?

No I don’t have any other different gateway.

Solution could be changing static IP from VM to another in my network?

This is the problem - the VM needs to be on the main network, not running as a NAT address sharing the host computers IP address or running as a private network between it and the host machine.

In VMware, which is what I use, it needs to be in Bridged Mode - that allows the VM ethernet card to appear to be another separate machine on the network, it picks up it’s IP address from the DHCP server and is accessible by all other computers on the same network.

If you are using VirtualBox, this mode is also called Bridged. If you are using HyperV or something else, you will have to read the docs as I only know those for desktop, there are other virtualisation systems but I’d need to know what you used and what the host OS is to be able to comment.

I’m using VirtualBox(Ubuntu 20.0.4) and my host OS is Windows 10

That’s very loverly. But I can’t change settings from here as my arms aren’t long enough.

Whereas you can. Did you?

This is not the issue of gateway, only issue having with the vartual machine. I think you couldn’t access the things stack console from your windows machine.

Sorry for spend i few days trying to solve it. I initialize a Virtual machine on VirtualBox with bridge mode in network config. And I set up The things Stack as in documentation, with the IP address I received with DNS from my router on local network, but I found that’s a problem following documentation because it says that is not possible to do it with a dns IP address. And that what I saw when i set up everything and I enter web with my IP and enter the things stack login web, when I write user and password i receive ia bad request message.

Then I followed instructions from that web:
https://www.thethingsnetwork.org/article/deploy-the-things-stack-in-your-local-network#:~:text=The%20Things%20Stack%20can%20be,connection%20to%20the%20public%20Internet.

Because I guess deploying tts in my local network is what I need to have connection between my Mikrotik gateway and tts I set in virtual machine as private server.

But then I found a new trouble and it was having client id and client secret from packetbroker. Function that they installed in that example, which is no obligatory, but the didn’t show how to do it without it, so I follow that steps. Having client id and client secret i need to set up packetbroker and use command pbadmin, which after following installation from:
https://packetbroker.net/getting-started/pb-clients/install/
I was not able to use it, receiving a cannot found pbadmin command from terminal.

So that’s my actual situation, a little bit lost.
Maybe there’s an installation way which makes it easier but I haven’t found it yet.

All you had to do was switch the settings of your virtual machine to Bridged mode. Nothing else.

The “DNS IP” address implies access from outside the network, which won’t work with a router on NAT. The “instructions” are a how to article from over a year ago.

Just set the virtual machine to bridged mode so the rest of your network can access the virtual machine and follow the documentation on installing as localhost.