Login attempt or request with invalid authentication from 127.0.0.1 on docker

I’m running hassio in docker on Ubuntu Server on an Intel NUC and I keep getting these:

Login attempt or request with invalid authentication from 127.0.0.1

Super annoying when these show up multiple times a day in the notifications.

Does anyone know how to fix this?

1 Like

Set use_x_forward_for and trusted_proxies

thanks! but how would that look in YAML?

Other than the exact yaml on that page?

I’m just asking how to write it in YAML. Will it be:

http:
  use_x_forwarded_for: true
  trusted_proxies: 127.0.0.1

?

And what does this actually do?

This

Allows showing true requesters IP or if misconfigure make request look like it’s local not WAN

Honestly, I don’t post details for these items as it has serious security implications and I believe any person using should take time to read and understand for themselves.

If still not understand after checking yourself please ask again for better understanding. If you have “googled” this already my apologies.

Honestly this is confusing topic but well worth reading

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1
    - 192.168.124.112

I tried this, but I still get failed login attempts. Any suggestions?

check your scripts/automations.
Any of these trying to login with no good password/auth token?

Are you using NMAP?
If you’re seeing authentication failures from 127.0.0.1 and you’re using the nmap device tracker, you should [exclude the Home Assistant IP](https://www.home-assistant.io/components/device_tracker.nmap_tracker/#exclude) from being scanned.

Are you using Appdeamon?

Are you using reverse proxy like NGINX? You need to add similar there as well if you are using but I think it more likely from HA.

Docker actually don’t normally show up as localhost when authentication fail from external source, usually shows as 17x.xxx.xxx.xxx. Your issue may be actual local service like automation or something configured and coming from HA itself.

I don’t use nmap or nginx, but doesn’t appdeamon come standard with hassio? I’m unsure what it is and what it does, but I read somewhere that maybe you need to update it, but shouldn’t hassio updates do that? Because I’m not using any automations with webhooks or anything.

No

It’s a way of writing automations in python.

No.

then I’m definitely not using that, any other reasons I get these notifications?

Is this caused by a configuration issue or is it a bug? With Home Assistant moving toward Version 1, we shouldn’t need to hack it to stop errors like this.
I have two clean installs of Version 0.100 and both throw these notifications about login errors. Everytime I access the interface, there is a notification of the failed login that corresponds with the time that I actually logged in.
Sometimes the failed login are from the localhost loopback (127.0.0.1) others from the IP of the device that successfully logged in.
Note: Issue happens even from a fresh install for me, before any device trackers are setup.

2 Likes

Appdeamon is an add-on. If you don’t know what it is, you likely haven’t installed it and that won’t be the cause of your issues :slight_smile:

I agree, this should be fixed as we are moving to 1.0

2 Likes

I found a lot of different threads regarding the topic “Login attempt or request with invalid authentication from 127.0.0.1”. It seems to me that this problem comes regularly to different people. Beside some special hints regarding e.g. Appdaemon, NMAP there is often no solution in the threads. Is there realy no way to get rid of these notification?

I would also be fine with a possibility to ignore this notification. But also for this problem I find no possibility…

5 Likes

Good afternoon … Any news about this problem?

2 Likes

I think it’s an issue with the latest android app, or the latest core update. I haven’t had any issues with this beforehand, and now I’m getting invalid logins from each of my two android phones, one of which is only running the Hassio app and nothing else.

1 Like

No neither. I have been getting this randomly for years

1 Like

I’m still getting these login error notifications, which are pretty annoying. I’m trying to check all the logs across all my add-ons and integrations, but my Home Assistant setup is getting pretty complicated, so I have no idea how to figure where these are coming from. I don’t really care about the notifications since nothing appears to be broken, so it would be nice if I could ignore these entirely so they don’t show up.

Same is happening to me also the weird thing that I can login to Home Assistant via ipadOS app with no problem, the problem just on my android phone.

Edit: I’m using home assistant connecting through wifi to my network which is not ideal, after I went to “configuration” then “add-ons, backups & supervisor” then “system” there click on “change” next to ip address under wlan0 click on “wifi” scan for your wifi and enter the password and save. That solved my problem. Hope it helps you too.