Conversation
supportDefault crowdsec install with nginx and wordpress. Installed wordpress plugin and tested the “test bouncing”. on the debug log I have this error: 2023-04-25T18:27:32.839316+00:00|100|Cache result|{“type”:”LAPI_REM_CACHED_DECISIONS”,”ip”:”mypublicIP”,”result”:”miss”} 2023-04-25T18:27:32.839352+00:00|100|Now processing a bouncer request|{“type”:”BOUNCER_CLIENT_REQUEST”,”method”:”GET”,”endpoint”:”/v1/decisions”,”parameters”:{“ip”:”mypublicIP”}} 2023-04-25T18:27:32.839675+00:00|400||{“type”:”WP_EXCEPTION_WHILE_TESTING_CONNECTION”,”message”:”Unexpected HTTP call failure.”,”code”:500,”file”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/vendor/crowdsec/bouncer/src/AbstractBouncer.php”,”line”:173} Note that my website does not respond to HTTP and only t HTTPS so I am not sure if that is the reason for the “Unexpected HTTP call failure”
this is the complete debug.log file tail debug.log 2023-04-25T18:27:32.832623+00:00|100|Instantiate client|{“type”:”CLIENT_INIT”,”configs”:{“api_key”:”***”,”auth_type”:”api_key”,”tls_cert_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../tls/”,”tls_key_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../tls/”,”tls_verify_peer”:false,”tls_ca_cert_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../tls/”,”api_url”:””,”api_timeout”:120,”user_agent_suffix”:”WordPress”,”user_agent_version”:”v2.3.1″}} 2023-04-25T18:27:32.835998+00:00|100|Instantiate cache|{“type”:”CACHE_INIT”,”configs”:{“fs_cache_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../.cache”,”use_cache_tags”:false},”adapter”:”Symfony\Component\Cache\Adapter\PhpFilesAdapter”} 2023-04-25T18:27:32.837319+00:00|100|Instantiate remediation engine|{“type”:”REM_INIT”,”configs”:{“fallback_remediation”:”captcha”,”stream_mode”:false,”clean_ip_cache_duration”:60,”bad_ip_cache_duration”:120,”geolocation”:{“enabled”:false,”type”:”maxmind”,”cache_duration”:86400,”maxmind”:{“database_type”:”country”,”database_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../geolocation/”}},”ordered_remediations”:[“ban”,”captcha”,”bypass”]},”cache”:”CrowdSec\RemediationEngine\CacheStorage\PhpFiles”} 2023-04-25T18:27:32.837822+00:00|100|Instantiate bouncer|{“type”:”BOUNCER_INIT”,”logger”:”CrowdSec\Common\Logger\FileLog”,”remediation”:”CrowdSec\RemediationEngine\LapiRemediation”,”configs”:{“use_curl”:false,”debug_mode”:true,”disable_prod_log”:false,”log_directory_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../logs/”,”forced_test_ip”:””,”forced_test_forwarded_ip”:””,”display_errors”:false,”bouncing_level”:”bouncing_disabled”,”trust_ip_forward_array”:[],”cache_system”:”phpfs”,”captcha_cache_duration”:86400,”hide_mentions”:true,”custom_css”:””,”excluded_uris”:[]}} 2023-04-25T18:27:32.839316+00:00|100|Cache result|{“type”:”LAPI_REM_CACHED_DECISIONS”,”ip”:”myexternalIP”,”result”:”miss”} 2023-04-25T18:27:32.839352+00:00|100|Now processing a bouncer request|{“type”:”BOUNCER_CLIENT_REQUEST”,”method”:”GET”,”endpoint”:”/v1/decisions”,”parameters”:{“ip”:”myexternalIP”}} 2023-04-25T18:27:32.839675+00:00|400||{“type”:”WP_EXCEPTION_WHILE_TESTING_CONNECTION”,”message”:”Unexpected HTTP call failure.”,”code”:500,”file”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/vendor/crowdsec/bouncer/src/AbstractBouncer.php”,”line”:173}
Thanks for your message. It seems that your “api_url” setting is empty as your log shows ”api_url”:”” Can you set http://localhost:8080 in your Local API URL setting and try again ? Thanks This reply was modified 3 years, 1 month ago by CrowdSec - lightweight and collaborative security engine .
Hi, I’m closing this issue. Happy to continue the conversation here or elsewhere.
this is the complete debug.log file tail debug.log 2023-04-25T18:27:32.832623+00:00|100|Instantiate client|{“type”:”CLIENT_INIT”,”configs”:{“api_key”:”***”,”auth_type”:”api_key”,”tls_cert_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../tls/”,”tls_key_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../tls/”,”tls_verify_peer”:false,”tls_ca_cert_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../tls/”,”api_url”:””,”api_timeout”:120,”user_agent_suffix”:”WordPress”,”user_agent_version”:”v2.3.1″}} 2023-04-25T18:27:32.835998+00:00|100|Instantiate cache|{“type”:”CACHE_INIT”,”configs”:{“fs_cache_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../.cache”,”use_cache_tags”:false},”adapter”:”Symfony\Component\Cache\Adapter\PhpFilesAdapter”} 2023-04-25T18:27:32.837319+00:00|100|Instantiate remediation engine|{“type”:”REM_INIT”,”configs”:{“fallback_remediation”:”captcha”,”stream_mode”:false,”clean_ip_cache_duration”:60,”bad_ip_cache_duration”:120,”geolocation”:{“enabled”:false,”type”:”maxmind”,”cache_duration”:86400,”maxmind”:{“database_type”:”country”,”database_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../geolocation/”}},”ordered_remediations”:[“ban”,”captcha”,”bypass”]},”cache”:”CrowdSec\RemediationEngine\CacheStorage\PhpFiles”} 2023-04-25T18:27:32.837822+00:00|100|Instantiate bouncer|{“type”:”BOUNCER_INIT”,”logger”:”CrowdSec\Common\Logger\FileLog”,”remediation”:”CrowdSec\RemediationEngine\LapiRemediation”,”configs”:{“use_curl”:false,”debug_mode”:true,”disable_prod_log”:false,”log_directory_path”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/inc/../logs/”,”forced_test_ip”:””,”forced_test_forwarded_ip”:””,”display_errors”:false,”bouncing_level”:”bouncing_disabled”,”trust_ip_forward_array”:[],”cache_system”:”phpfs”,”captcha_cache_duration”:86400,”hide_mentions”:true,”custom_css”:””,”excluded_uris”:[]}} 2023-04-25T18:27:32.839316+00:00|100|Cache result|{“type”:”LAPI_REM_CACHED_DECISIONS”,”ip”:”myexternalIP”,”result”:”miss”} 2023-04-25T18:27:32.839352+00:00|100|Now processing a bouncer request|{“type”:”BOUNCER_CLIENT_REQUEST”,”method”:”GET”,”endpoint”:”/v1/decisions”,”parameters”:{“ip”:”myexternalIP”}} 2023-04-25T18:27:32.839675+00:00|400||{“type”:”WP_EXCEPTION_WHILE_TESTING_CONNECTION”,”message”:”Unexpected HTTP call failure.”,”code”:500,”file”:”/var/www/mywebsite/html/wp-content/plugins/crowdsec/vendor/crowdsec/bouncer/src/AbstractBouncer.php”,”line”:173}
Thanks for your message. It seems that your “api_url” setting is empty as your log shows ”api_url”:”” Can you set http://localhost:8080 in your Local API URL setting and try again ? Thanks This reply was modified 3 years, 1 month ago by CrowdSec - lightweight and collaborative security engine .
Hi, I’m closing this issue. Happy to continue the conversation here or elsewhere.