# Cs-nginx-bouncer not communicating with LAPI

**URL:** <https://discourse.crowdsec.net/t/cs-nginx-bouncer-not-communicating-with-lapi/597>\
**Category:** crowdsec\
**Created:** [January 29, 2022, 12:54pm UTC](https://discourse.crowdsec.net/t/cs-nginx-bouncer-not-communicating-with-lapi/597 "2022-01-29T12:54:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![P1NN3N](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/p1nn3n/32/281_2.png) [@P1NN3N](https://discourse.crowdsec.net/u/P1NN3N)\
**Post date:** [January 29, 2022, 12:54pm UTC](https://discourse.crowdsec.net/t/cs-nginx-bouncer-not-communicating-with-lapi/597/1 "2022-01-29T12:54:24Z")

</div>

**nginx-1642508064 v0.0.7** on Ubuntu Server 20.04.3, `apt` installation with dashboard setup.

`tail -f /var/log/crowdsec_lua_bouncer.log` repeatedly shows  
`ERROR Http error timeout while talking to LAPI (http://127.0.0.1:8080/v1/decisions?ip=10.0.0.1)`

`10.0.0.1` is my router in my `10.0.0.1/24` LAN space. Where is the bouncer pulling that address from, and could that be the problem? No manual decisions from LAPI are enforced, only CAPI.

update:  
`DEBUG '10.0.0.1' is in cache`

---

<div class="post-metadata">

**Author:** ![alteredCoder](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/alteredcoder/32/44_2.png) [@alteredCoder](https://discourse.crowdsec.net/u/alteredCoder)\
**Post date:** [February 2, 2022, 1:07pm UTC](https://discourse.crowdsec.net/t/cs-nginx-bouncer-not-communicating-with-lapi/597/2 "2022-02-02T13:07:56Z")

</div>

Hello,

Is the CrowdSec local API installed on the same machine than the nginx bouncer ?

---

<div class="post-metadata">

**Author:** ![P1NN3N](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/p1nn3n/32/281_2.png) [@P1NN3N](https://discourse.crowdsec.net/u/P1NN3N)\
**Post date:** [February 2, 2022, 8:57pm UTC](https://discourse.crowdsec.net/t/cs-nginx-bouncer-not-communicating-with-lapi/597/3 "2022-02-02T20:57:35Z")

</div>

Thanks for responding.  
Yes it is on the same machine. I deleted both machine and bouncer and added them back (with `machines validate`), but still no go. A weird thing though: nginx-bouncer got the wrong api key in the conf which first lead to 403, but after changing to the correct one and reloading it again repeatedly times out. I can call the lapi from localhost manually with curl and nginx-bouncer key and get valid returns.

`sudo cscli lapi status` gives:

```auto
INFO[02-02-2022 09:53:23 PM] Loaded credentials from /etc/crowdsec/local_api_credentials.yaml  
INFO[02-02-2022 09:53:23 PM] Trying to authenticate with username [redacted] on http://127.0.0.1:8080/  
INFO[02-02-2022 09:53:23 PM] You can successfully interact with Local API (LAPI)

```

`sudo netstat -tulpn | grep :8080` gives:  
`tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 3703/crowdsec`

---

<div class="post-metadata">

**Author:** ![alteredCoder](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/alteredcoder/32/44_2.png) [@alteredCoder](https://discourse.crowdsec.net/u/alteredCoder)\
**Post date:** [February 3, 2022, 9:16am UTC](https://discourse.crowdsec.net/t/cs-nginx-bouncer-not-communicating-with-lapi/597/4 "2022-02-03T09:16:00Z")

</div>

Hello,

To answer your first question:  
`10.0.0.1 is my router in my 10.0.0.1/24 LAN space. Where is the bouncer pulling that address from, and could that be the problem?`  
The NGINX bouncer ask to the local API for this IP because this IP made a HTTP request to your nginx webserver.

Can you please paste the content of `/var/log/crowdsec_api.log` ?
