Logstash only listens on IPv6 port

Hi for All,
I installed the Elastic Stack in Debian 8.5 by repositories.The Logstash do not listen on udp port setting in the conf file (port => 9878) for IPv4, but IPv6 only.
I found the solution to fix the problem (_JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true). However I did not understand where this change should be carried out so that the port is listening to IPv4.
Cold anyone tell me?
Thanks.

Hi!
I found the answer to question.
The _JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true is a variable and must be inserted entered /etc/environment or into /etc/profile.d/new_file.sh so it available to all users.
However the solution do no fix the problem! Logstash continues listening on the setting port only to IPv6.
When I verify the logstash.conf with the configtest -f command, the result is "Configuration OK" and the Java global variable is identified.

root@elk~:# invoke-rc.d logstash configtest -f logstash-to-netflow.conf
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Configuration OK

But the 9878/UDP port does not listen to IPv4.

root@elk:~# lsof -nPi :9878
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 1508 logstash 17u IPv6 89766 0t0 UDP *:9878

Any idea or suggestion?

Thanks.