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

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.

I have just set it up like this, all my local network can access, and gateway appears as disconnected on the things Stack. I have a question that may be the issue. (I have config gateway mikrotik to access server address from IP)

Is possible to have same devices (gateways and end nodes) with obviously same EUI, in different the things stack?
I mean I have gateway in the things stack public server and now in the things stack, private server in localhost too.

Your private stack and TTS CE will not be in direct communication for many many good reasons, not least security. So it is OK to have the same configs on both. However if you have a gateway that is on TTN as well as this Mikrotik, you could end up with a lottery as to which one a device joins.

As for the gateway, as long as its configuration points to the IP address of your private stack and it can ping that IP address, it should be good to go. The update on the connected status can be slow & mislead you - the acid test is to use a device to see what happens on it, the gateway log and the web console.

So now I have one more question for next image:
Screenshot_20220710-124929

These are IP addresses from gateway, the one that it gets from dhcp via ethernet from local network router, 192.168.18.0 where is set my virtual machine via bridge mode to host (192.168.18.2) and network that creates the own gateway (192.168.88.0).

I’m not able to ping dhcp IP from gateway(192.168.18.233), neither ping from gateway to virtual machine’s IP(192.168.18.2 = server address).
Is it possible that i must set virtual machine’s IP, it’s means being connected to wi-fi from gateway (192.168.88.0), to could have that connection between them? And making possible that state of connected y tts?

Pd: I cannot make ping to 192.168.18.233 from my host neither

Are you using a bridge network as explained on VirtualBox Network Settings: All You Need to Know ?
Usually a VM will have just one network adapter, a wired one. Having a wireless adapter in a VM is very unusual.
When using the bridge network your VM should get an IP address in the same range as your PC and you should be able to ping your router and the MikroTik gateway from both.

Yes, I’m able to ping router, my pc and every device in 192.168.18.0 both sides but not gateway(192.168.18.233). No one from my network can ping gateway.
The way I config it, connecting it’s wi-fi, make me think that I must be connected to it for receiving an IP in his network (192.168.88.0).
That’s what i’m gonna try meanwhile how it’s set up now should works.