Hi there,
I’m developing an application based off of the Resin Wifi-Connect source code, and in it I create my own hotspot which acts as a very basic server to give credentials to other devices who connect to it. Because of this, the server is only designed to handle two routes. My logs are getting overrun with unhandled requests from mixpanel that look like this:
RROR:iron::iron: Error handling:
Request {
url: Url { generic_url: “http://api.mixpanel.com/track?data=eyJldmVudCI6IkRldmljZSBzdGF0ZSByZXBvcnQgZmFpbHVyZSIsInByb3BlcnRpZXMiOnsiZXJyb3IiOnsibWVzc2FnZSI6IiJ9LCJkaXN0aW5jdF9pZCI6IjI1NTU0ZmY5MmI3Yzc0ZjIxNDk2MjE4ODlhNjI2YmM1IiwidXVpZCI6IjI1NTU0ZmY5MmI3Yzc0ZjIxNDk2MjE4ODlhNjI2YmM1IiwidG9rZW4iOiI5OWVlYzUzMzI1ZDRmNDVkZDA2MzNhYmQ3MTllM2ZmMSIsIm1wX2xpYiI6Im5vZGUifX0%3D&ip=0&verbose=0” }
method: Get
remote_addr: V4(192.168.42.5:52670)
local_addr: V4(192.168.42.5:80)
}
Error was: NoRoute
How do I disable these mixpanel requests? I know it is related to resinOS, but I do not want mixpanel interfering with my server or any of my software in general. Is there any way to disable it system-wide? If not, how can I blacklist it?
1 Like
Hi @freako987 – To get the full value out of resin, the device would have to be internet connected, without that you wouldn’t be able to manage the device, view the logs, ssh in via the device’s VPN connection, and manage software deployments, settings and so on via our dashboard.
If that is indeed the goal, it might be easier to use the raspbian / debian installer for WiFi connect instead and skip ResinOS all together: https://github.com/resin-io/resin-wifi-connect#raspbiandebian-stretch
if you would want to use ResinOS as the base, which I wouldn’t recommend in this case, it is possible to disable all online services by downloading the config.json from your device using the resin CLI tool: https://docs.resin.io/reference/cli/#config-read – and then adding an supervisorOfflineMode & offlineMode : true to the config to disable all our online services, and writing the config file back to the sd card / device.
I should clarify - we are using Resin to manage our fleet and love resinOS. We have a need to quickly connect multiple devices in close proximity and as such I have modified wifi-connect for that purpose. The issue only arises when I am broadcasting a second hotspot from the device after the initial captive portal. Other devices connect to this hotspot to receive the credentials the user entered on the first device. MixPanel is making requests to this hotspot that it cannot handle, and thus iron is throwing errors all over the place. It doesn’t break the application, but clutters the logs and causes unnecessary traffic on the network. It’s these mixpanel requests I hope to avoid.
1 Like
Could we take a quick moment to confirm my understanding of the quick deploy process:
- Captive portal the wifi details into a seed device
- This seed device publishes a hotspot that other devices know to look for
- Other devices connect to this hotspot and request wifi details
- Other devices then use these wifi details to connect to the internet
BUT during (3) these other devices are attempting to use that hotspot as though it were an internet connection.
So, the ideal outcome would be a way of temporarily minimizing how keen the device is to connect to the cloud?
That’s correct. Requests are being made to the device outputting the credential hotspot from other devices. Iron handles the errors just fine, but I would prefer to keep these requests from being sent at all so they do not clutter the logs or prevent devices from connecting while they are being handled.
Does your seed device’s hotspot publish a DHCP Default Gateway?
It’s an old trick but a network without a Default Gateway shouldn’t have internet access.
I think that could work. and this wouldn’t have any impact on the other devices ability to connect? sorry, my networking knowledge is spotty at best.
Default gateway is a per-network setting, it will only affect connections to that network, so when your devices hop to the configured connection that will provide its own default gateway.
1 Like
@freako987 I’ve prodded a couple of people internally and had excited noises come back from them about the rapid configuration workflow you’ve made. I’ve dubbed it “Viral Configuration” for now.
If you’re not aware of our blog4swag program then nip over to The return of blog4swag - share your resin.io project writeup for swag! and consider whether you could write a little something about this really cool configuration trick!
I was not aware, thanks for the tip. I’ll have to clear it with the ol boss but I’d love some swag! I’m sure what I have currently could use significant improvement, but as it stands I’m able to configure 32 devices from a single seed within about 10 minutes.