Logstash installation error on ELK - Could not find logstash.yml

hi
i'm a total newbie regarding to ELK.
i have setup a new debian system and installed the ELK Services with the official Documentation from here:
https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html

So elastic search is working, kibana is working and also my windows beats service is pusing logs into elastic search wihtout any problems.
The only problem that i have is, to get logstash running.

i have installed logstash with the APT Method. The Service was installed and all the config files are there. but if i test the logstash installation withe following command:

bin/logstash -e 'input { stdin { } } output { stdout {} }'

I get the WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash.
I've checked it twice and the logstash.yml file is inside the /etc/logstash folder.

any ideas?

also i cannot reach the logstash port 5043 or 5044.

Ignore that, it's because you are calling the logstash binary directly.

To add to that, when you execute directly like that the user that is running the binary likely doesn't have access to the /etc/logstash/*.yml files.

When you start it as a service, it should find it just fine. You can validate by putting a small config in the folder with the appropriate permissions, starting the service, and then validating the log files are reporting properly.

As @warkolm says, this is expected behavior for what you're doing.