-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Inform URL rejected #77
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
This comment was marked as spam.
This comment was marked as spam.
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
often, assuming correct info and mapped ports, you just need a factory reset. However, in your cased, based on
it looks like you are inputting the container ip in your inform address when it should be the docker host ip. Please confirm that you are NOT using the docker container ip, which your access point would not normally have knowledge of. Additionally, if you are using 172.16 as your LAN subnet you will want to ensure your docker bridge is not conflicting with it. Finally, we do not support or test podman and we definitely do not support rootless. |
As far as I can see, the connection from the AP to inside the container actually works, but something inside the container failed. Maybe :8080 is the wrong port or we need some other path than /inform? |
This all sounds good, 8080/inform is correct Have you tried backing up your current config (do you have ANY working devices?) and doing a fresh db+unifi to test? I would test first without restoring any data, just brand-new empty and do a factory reset on your devices before adoption. If that works, then i would restore your data in a fresh setup, do a factory reset, and adopt. if that works, i would keep that instance and blow away the other. Failing those tests, i would test with docker (in a vm if needed) to rule out podman. You are correct that podman SHOULDN'T be the issue, however, it wouldn't be the first time we've seen it. --Great note from moritzbeck, however, my parents and in-laws both use my unifi controller and are NOT on my L3 subnet, while my local unifi APs ARE on the same l3 subnet. They are on completely different subnets and reach my controller via site to site vpn and have no issues and neither do I. I will note, we will not support macvlan or ipvlan on our containers, while users can make it work, we don't test like that and it's out of scope for us. |
Are your network devices on the same L3 subnet as your Docker host? I had an issue with that setup, because the network devices seemed to recognize this and only try to use L2 adoption. This does not work with the Docker NAT/bridge networking, you would need to use a MACVLAN network for that. |
Note: I opened this issue in March and since there was no response, I adopted the AP by resetting it with a pin. That worked well and all my issues are gone. The container host and the AP are in the same L2 network. Container network configuration is as follows:
So maybe this is due to using the podman bridge network? Is there anywhere more information on the Docker issue with bridge/NAT? |
The container works fine with a bridge network, however the Unifi hardware is frequently wonky when it comes to adoption, especially if it's previously been adopted by a different controller or using a different inform address. More than once I've had to factory reset an AP to get it to adopt where there's no good reason it shouldn't just work. |
Nevertheless... when I do |
Yes, a 400 error code is expected if you're not sending a valid inform payload |
can you give me an example for a valid inform payload? |
Yes, but as said from my experience and apparently also as described itt, only on different L3 subnets. |
I found out using Wireshark that the network devices were sending some other protocol I can't remember in the L2 frame and not IP, so it couldn't traverse NAT. |
I've not had any* issues with adoption of devices on the same subnet of the host and I've been using variations of our container for the best part of 5 years. That said I can't speak to anyone elses network configuration so YMMV. |
@thespad Can you maybe share your Docker Compose file? |
You are making me curious with the network talk and I did a quick tcpdump experiment. Experiment: Run tcpdump on the host with the controller while doing a set-inform on an AP. (The AP in question is happily adopted, but will try to do the inform with the host anyways) Result:
So I do see a HTTP 200 result from the unifi-host to the AP after the inform! |
To add to this, I use the compose listed in the container readme on this repo with path and uid changes. My devices adopt fine (as long as they have never been adopted before, in which case i factory reset them), on the same l3 network as my docker host, and also from 2 networks accessible over site to site vpn. This is all on a custom bridge. In terms of the multicast, this will not reach the controller because of docker nat, but it will not prevent adoption (as you noted after a factory reset) , it will also not cross a layer 3 boundary but still poses no issue. It's worth noting that unifi is.. bad, they know they're bad, it's why even they suggest a factory reset if something doesnt work stance - https://help.ui.com/hc/en-us/articles/360012622613-UniFi-Device-Adoption |
So maybe this has more to do with switching between layer 2 and 3 adoption, because Unifi devices are dumb and won't change their behaviour? |
that very well could be the situation; in any case, im not sure this is a container issue. I think continued discussion is more appropriate in discord as the discussed issue is not something linuxserver.io can resolve. |
closing since this appears to not be related to the container and an easy workaround (resetting the AP) exists |
Is there an existing issue for this?
Current Behavior
When trying to adopt an existing AP, I try to use the manual adoption method via:
After issuing the command I execute
info
and see that the URL is Rejected:When I try curl, I see that I get a HTTP Error 400:
I observe the same behavior on another computer and from within the container.
Needless to say - the AP is not discovered in the Unifi Console
Expected Behavior
The status does not show rejected and the console will allow adoption of the AP
Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs
# podman logs unifi-network-application [migrations] started [migrations] no migrations found ─────────────────────────────────────── ██╗ ███████╗██╗ ██████╗ ██║ ██╔════╝██║██╔═══██╗ ██║ ███████╗██║██║ ██║ ██║ ╚════██║██║██║ ██║ ███████╗███████║██║╚██████╔╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ Brought to you by linuxserver.io ─────────────────────────────────────── To support LSIO projects visit: https://www.linuxserver.io/donate/ ─────────────────────────────────────── GID/UID ─────────────────────────────────────── User UID: 1000 User GID: 1000 ─────────────────────────────────────── [custom-init] No custom files found, skipping... [ls.io-init] done.
The text was updated successfully, but these errors were encountered: