как увеличить размер дескриптора файла в linux - PullRequest
1 голос
/ 10 июля 2019

Мне нужно увеличить количество открытых файлов для эластичной работы для правильной работы, для этого я перехожу по этой ссылке здесь https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#limits.conf у меня нет пользователяasticsearch, потому что текущий пользователь запускает службуasticsearch, поэтому я сделал что-то подобное

echo "$USER"
sara

меня зовут "Сара" я открыл файл ограничений и добавил

sudo gedit /etc/security/limits.conf

sara  hard  nofile  65535

, а также сохранил и закрыл файл relogin и запустил Службу поиска но проблема остается здесь журналы

[2019-07-10T17:45:11,621][INFO ][o.e.e.NodeEnvironment    ] [sara-Inspiron-7773] using [1] data paths, mounts [[/ (/dev/sda7)]], net usable_space [88.4gb], net total_space [141.7gb], types [ext4]
[2019-07-10T17:45:11,719][INFO ][o.e.e.NodeEnvironment    ] [sara-Inspiron-7773] heap size [989.8mb], compressed ordinary object pointers [true]
[2019-07-10T17:45:11,768][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] node name [sara-Inspiron-7773], node ID [RK754dxuRiiCZYeR5NwN-Q], cluster name [elasticsearch]
[2019-07-10T17:45:11,769][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] version[7.1.0], pid[3901], build[default/tar/606a173/2019-05-16T00:43:15.323135Z], OS[Linux/4.15.0-52-generic/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_181/25.181-b13]
[2019-07-10T17:45:11,770][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] JVM home [/usr/lib/jvm/jdk1.8.0_181/jre]
[2019-07-10T17:45:11,771][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/tmp/elasticsearch-3092699380184804675, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Dio.netty.allocator.type=unpooled, -Des.path.home=/opt/ifkaar/elasticsearch-7.1.0, -Des.path.conf=/opt/ifkaar/elasticsearch-7.1.0/config, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=true]
[2019-07-10T17:45:30,639][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [aggs-matrix-stats]
[2019-07-10T17:45:30,639][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [analysis-common]
[2019-07-10T17:45:30,640][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [ingest-common]
[2019-07-10T17:45:30,640][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [ingest-geoip]
[2019-07-10T17:45:30,640][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [ingest-user-agent]
[2019-07-10T17:45:30,641][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [lang-expression]
[2019-07-10T17:45:30,641][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [lang-mustache]
[2019-07-10T17:45:30,641][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [lang-painless]
[2019-07-10T17:45:30,642][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [mapper-extras]
[2019-07-10T17:45:30,642][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [parent-join]
[2019-07-10T17:45:30,642][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [percolator]
[2019-07-10T17:45:30,643][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [rank-eval]
[2019-07-10T17:45:30,643][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [reindex]
[2019-07-10T17:45:30,643][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [repository-url]
[2019-07-10T17:45:30,644][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [transport-netty4]
[2019-07-10T17:45:30,644][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-ccr]
[2019-07-10T17:45:30,644][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-core]
[2019-07-10T17:45:30,645][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-deprecation]
[2019-07-10T17:45:30,645][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-graph]
[2019-07-10T17:45:30,645][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-ilm]
[2019-07-10T17:45:30,645][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-logstash]
[2019-07-10T17:45:30,646][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-ml]
[2019-07-10T17:45:30,646][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-monitoring]
[2019-07-10T17:45:30,646][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-rollup]
[2019-07-10T17:45:30,647][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-security]
[2019-07-10T17:45:30,647][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-sql]
[2019-07-10T17:45:30,647][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] loaded module [x-pack-watcher]
[2019-07-10T17:45:30,648][INFO ][o.e.p.PluginsService     ] [sara-Inspiron-7773] no plugins loaded
[2019-07-10T17:45:50,825][ERROR][o.e.x.s.a.f.FileUserPasswdStore] [sara-Inspiron-7773] invalid entry in users file [/opt/elasticsearch-7.1.0/config/users], line [1]. skipping...
[2019-07-10T17:45:51,226][INFO ][o.e.x.s.a.s.FileRolesStore] [sara-Inspiron-7773] parsed [0] roles from file [/opt/ifkaar/elasticsearch-7.1.0/config/roles.yml]
[2019-07-10T17:45:56,043][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [sara-Inspiron-7773] [controller/4018] [Main.cc@109] controller (64 bit): Version 7.1.0 (Build a8ee6de8087169) Copyright (c) 2019 Elasticsearch BV
[2019-07-10T17:46:03,697][DEBUG][o.e.a.ActionModule       ] [sara-Inspiron-7773] Using REST wrapper from plugin org.elasticsearch.xpack.security.Security
[2019-07-10T17:46:09,763][INFO ][o.e.d.DiscoveryModule    ] [sara-Inspiron-7773] using discovery type [zen] and seed hosts providers [settings]
[2019-07-10T17:46:11,811][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] initialized
[2019-07-10T17:46:11,812][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] starting ...
[2019-07-10T17:46:15,323][INFO ][o.e.t.TransportService   ] [sara-Inspiron-7773] publish_address {192.168.1.8:9300}, bound_addresses {[::]:9300}
[2019-07-10T17:46:15,332][INFO ][o.e.b.BootstrapChecks    ] [sara-Inspiron-7773] bound or publishing to a non-loopback address, enforcing bootstrap checks
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2019-07-10T17:46:15,373][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] stopping ...
[2019-07-10T17:46:15,423][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] stopped
[2019-07-10T17:46:15,423][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] closing ...
[2019-07-10T17:46:15,435][INFO ][o.e.n.Node               ] [sara-Inspiron-7773] closed
[2019-07-10T17:46:15,437][INFO ][o.e.x.m.p.NativeController] [sara-Inspiron-7773] Native controller process has stopped - no new native processes can be started
...