elasticsearch起動時にエラーになった(kibanaで画面が真っ白)→文字コードが原因だった

2018.01.31 Wednesday 21:07
0
    ■elasticsearch起動時にエラーになった(kibanaで画面が真っ白)
    ・原因 config/elasticsearch.yml ファイルを修正した際に sjis形式で保存したみたい。
    文字コードutf8に修正して再起動したら無事起動できた

    ・以下のエラーが発生
    C:¥¥elasticsearch-6.1.1¥bin>elasticsearch.bat
    Exception in thread "main" 2018-01-31 19:38:16,281 main ERROR No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.
    SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: YAMLException[java.io.CharConversionException: Invalid UTF-8 start byte 0x90 (at char #1802, byte #1023)
    at [Source: sun.nio.ch.ChannelInputStream@40a4337a; line: 1, column: 1]]; nested: YAMLException[java.io.CharConversionException: Invalid UTF-8 start byte 0x90 (at char #1802, byte #1023)]; nested: CharConversionException[Invalid UTF-8 start byte 0x90 (at char #1802, byte #1023)];
    at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1186)
    at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1161)
    at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:99)
    at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
    at org.elasticsearch.cli.Command.main(Command.java:90)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85)
    Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.YAMLException: java.io.CharConversionException: Invalid UTF-8 start byte 0x90 (at char #1802, byte #1023)
    at [Source: sun.nio.ch.ChannelInputStream@40a4337a; line: 1, column: 1]
    at com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.YAMLException.from(YAMLException.java:25)
    at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:346)
    at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:52)
    at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1178)
    ... 8 more
    Caused by: org.yaml.snakeyaml.error.YAMLException: java.io.CharConversionException: Invalid UTF-8 start byte 0x90 (at char #1802, byte #1023)
    at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:200)
    at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:146)
    at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:1199)
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:289)
    at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
    at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:194)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:157)
    at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:167)
    at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:340)
    ... 10 more
    Caused by: java.io.CharConversionException: Invalid UTF-8 start byte 0x90 (at char #1802, byte #1023)
    at com.fasterxml.jackson.dataformat.yaml.UTF8Reader.reportInvalidInitial(UTF8Reader.java:384)
    at com.fasterxml.jackson.dataformat.yaml.UTF8Reader.read(UTF8Reader.java:237)
    at com.fasterxml.jackson.dataformat.yaml.UTF8Reader.read(UTF8Reader.java:148)
    at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:184)
    ... 18 more

    category:elasticsearch | by:ittoocomments(0)trackbacks(0) | -

    Elasticsearchのエラー。post時にデータ登録できなかった "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported", "status" : 406

    2018.01.31 Wednesday 21:05
    0
      Elasticsearchのエラー。post時にデータ登録できなかった。 "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported", "status" : 406
      Content-Type の指定必須
      Elasticsearch への API は Transport通信を除いて、HTTP(s) リクエストによって操作します。
      Elasticsearch 5系までは自動検出していた Content-Type ヘッダだが、Elasticsearch 6系より指定が必須のよう

      ・エラー内容
      $ curl -XPOST 'localhost:9200/classmethod/employees/_bulk?pretty' --data-binary "@index-template.json"
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      100 980k 100 109 100 980k 82 738k 0:00:01 0:00:01 --:--:-- 756k{
      "error" : "Content-Type header [application/x-www-form-urlencoded] is not supported",
      "status" : 406
      }

      ・以下に修正して実行すると無事データがはいった
      オプションで、「-H "Content-Type: application/json"」を指定する
      $ curl -H "Content-Type: application/json" -XPUT 'localhost:9200/_template/classmethod' -d '@index-template.json'
      category:elasticsearch | by:ittoocomments(0)trackbacks(0) | -

      elasticsearchをvagrant環境につくったcentOSにインストール

      2017.04.08 Saturday 14:38
      0
        elasticsearchをvagrant環境につくったcentOSにインストール

        --------------------------------------------------------------------------------------------
        概要

        ▼1 # yum install java-1.8.0-openjdk
        ▼2 # java -version
        ▼3 # rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
        ▼4 # repoファイル作成
        vi /etc/yum.repos.d/elasticsearch.repo
        ▼5 # yum install elasticsearch -y
        ▼6 # elasticsearch/jvm.options のメモリサイズを変更する
        (以降の処理で足りないとエラーになる)
        ▼7 # systemctl start elasticsearch
        ▼8 # systemctl status elasticsearch
        ▼9 起動確認 curl lsof
        --------------------------------------------------------------------------------------------

        ・実際の作業履歴など
        ▼1 # yum install java-1.8.0-openjdk

        [root@localhost install]# yum install java-1.8.0-openjdk
        Loaded plugins: fastestmirror
        base | 3.6 kB 00:00:00
        extras | 3.4 kB 00:00:00
        mongodb-org-3.0 | 2.5 kB 00:00:00
        puppetlabs-pc1 | 2.5 kB 00:00:00
        remi-safe | 2.9 kB 00:00:00
        updates | 3.4 kB 00:00:00
        (1/2): puppetlabs-pc1/x86_64/primary_db | 113 kB 00:00:01
        (2/2): remi-safe/primary_db | 917 kB 00:00:04
        Loading mirror speeds from cached hostfile
        * base: ftp.jaist.ac.jp
        * epel: ftp.jaist.ac.jp
        * extras: ftp.jaist.ac.jp
        * remi-safe: repo1.sea.innoscale.net
        * updates: ftp.jaist.ac.jp
        Resolving Dependencies
        --> Running transaction check
        ---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.121-0.b13.el7_3 will be installed
        --> Processing Dependency: java-1.8.0-openjdk-headless = 1:1.8.0.121-0.b13.el7_3 for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libjvm.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libjli.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libjava.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libjvm.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libjli.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libjava.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libgif.so.4()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libawt.so()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libXtst.so.6()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libXrender.so.1()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libXi.so.6()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libXext.so.6()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: libXcomposite.so.1()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64
        --> Running transaction check
        ---> Package giflib.x86_64 0:4.1.6-9.el7 will be installed
        --> Processing Dependency: libSM.so.6()(64bit) for package: giflib-4.1.6-9.el7.x86_64
        --> Processing Dependency: libICE.so.6()(64bit) for package: giflib-4.1.6-9.el7.x86_64
        ---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.121-0.b13.el7_3 will be installed
        --> Processing Dependency: tzdata-java >= 2015d for package: 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: nss(x86-64) >= 3.21.3 for package: 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: copy-jdk-configs >= 1.1-3 for package: 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: chkconfig >= 1.7 for package: 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: chkconfig >= 1.7 for package: 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: lksctp-tools(x86-64) for package: 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64
        --> Processing Dependency: jpackage-utils for package: 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64
        ---> Package libXcomposite.x86_64 0:0.4.4-4.1.el7 will be installed
        ---> Package libXext.x86_64 0:1.3.3-3.el7 will be installed
        ---> Package libXi.x86_64 0:1.7.4-2.el7 will be installed
        ---> Package libXrender.x86_64 0:0.9.8-2.1.el7 will be installed
        ---> Package libXtst.x86_64 0:1.2.2-2.1.el7 will be installed
        ---> Package xorg-x11-fonts-Type1.noarch 0:7.5-9.el7 will be installed
        --> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
        --> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
        --> Processing Dependency: mkfontdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
        --> Processing Dependency: mkfontdir for package: xorg-x11-fonts-Type1-7.5-9.el7.noarch
        --> Running transaction check
        ---> Package chkconfig.x86_64 0:1.3.61-5.el7 will be updated
        ---> Package chkconfig.x86_64 0:1.7.2-1.el7 will be an update
        ---> Package copy-jdk-configs.noarch 0:1.2-1.el7 will be installed
        ---> Package javapackages-tools.noarch 0:3.4.1-11.el7 will be installed
        --> Processing Dependency: python-javapackages = 3.4.1-11.el7 for package: javapackages-tools-3.4.1-11.el7.noarch
        --> Processing Dependency: libxslt for package: javapackages-tools-3.4.1-11.el7.noarch
        ---> Package libICE.x86_64 0:1.0.9-2.el7 will be installed
        ---> Package libSM.x86_64 0:1.2.2-2.el7 will be installed
        ---> Package lksctp-tools.x86_64 0:1.0.17-2.el7 will be installed
        ---> Package nss.x86_64 0:3.19.1-19.el7_2 will be updated
        --> Processing Dependency: nss = 3.19.1-19.el7_2 for package: nss-sysinit-3.19.1-19.el7_2.x86_64
        --> Processing Dependency: nss(x86-64) = 3.19.1-19.el7_2 for package: nss-tools-3.19.1-19.el7_2.x86_64
        ---> Package nss.x86_64 0:3.28.2-1.6.el7_3 will be an update
        --> Processing Dependency: nss-util >= 3.28.2-1.1 for package: nss-3.28.2-1.6.el7_3.x86_64
        --> Processing Dependency: nss-softokn(x86-64) >= 3.16.2.3-14.2 for package: nss-3.28.2-1.6.el7_3.x86_64
        --> Processing Dependency: nspr >= 4.13.1 for package: nss-3.28.2-1.6.el7_3.x86_64
        --> Processing Dependency: libnssutil3.so(NSSUTIL_3.24)(64bit) for package: nss-3.28.2-1.6.el7_3.x86_64
        --> Processing Dependency: libnssutil3.so(NSSUTIL_3.21)(64bit) for package: nss-3.28.2-1.6.el7_3.x86_64
        ---> Package ttmkfdir.x86_64 0:3.0.9-42.el7 will be installed
        ---> Package tzdata-java.noarch 0:2017b-1.el7 will be installed
        ---> Package xorg-x11-font-utils.x86_64 1:7.5-20.el7 will be installed
        --> Processing Dependency: libfontenc.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.5-20.el7.x86_64
        --> Processing Dependency: libXfont.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.5-20.el7.x86_64
        --> Running transaction check
        ---> Package libXfont.x86_64 0:1.5.1-2.el7 will be installed
        ---> Package libfontenc.x86_64 0:1.1.2-3.el7 will be installed
        ---> Package libxslt.x86_64 0:1.1.28-5.el7 will be installed
        ---> Package nspr.x86_64 0:4.10.8-2.el7_1 will be updated
        ---> Package nspr.x86_64 0:4.13.1-1.0.el7_3 will be an update
        ---> Package nss-softokn.x86_64 0:3.16.2.3-13.el7_1 will be updated
        ---> Package nss-softokn.x86_64 0:3.16.2.3-14.4.el7 will be an update
        --> Processing Dependency: nss-softokn-freebl(x86-64) >= 3.16.2.3-14.4.el7 for package: nss-softokn-3.16.2.3-14.4.el7.x86_64
        ---> Package nss-sysinit.x86_64 0:3.19.1-19.el7_2 will be updated
        ---> Package nss-sysinit.x86_64 0:3.28.2-1.6.el7_3 will be an update
        ---> Package nss-tools.x86_64 0:3.19.1-19.el7_2 will be updated
        ---> Package nss-tools.x86_64 0:3.28.2-1.6.el7_3 will be an update
        ---> Package nss-util.x86_64 0:3.19.1-4.el7_1 will be updated
        ---> Package nss-util.x86_64 0:3.28.2-1.1.el7_3 will be an update
        ---> Package python-javapackages.noarch 0:3.4.1-11.el7 will be installed
        --> Processing Dependency: python-lxml for package: python-javapackages-3.4.1-11.el7.noarch
        --> Running transaction check
        ---> Package nss-softokn-freebl.x86_64 0:3.16.2.3-13.el7_1 will be updated
        ---> Package nss-softokn-freebl.x86_64 0:3.16.2.3-14.4.el7 will be an update
        ---> Package python-lxml.x86_64 0:3.2.1-4.el7 will be installed
        --> Finished Dependency Resolution

        Dependencies Resolved

        ===========================================================================================================
        Package Arch Version Repository Size
        ===========================================================================================================
        Installing:
        java-1.8.0-openjdk x86_64 1:1.8.0.121-0.b13.el7_3 updates 232 k
        Installing for dependencies:
        copy-jdk-configs noarch 1.2-1.el7 base 14 k
        giflib x86_64 4.1.6-9.el7 base 40 k
        java-1.8.0-openjdk-headless x86_64 1:1.8.0.121-0.b13.el7_3 updates 31 M
        javapackages-tools noarch 3.4.1-11.el7 base 73 k
        libICE x86_64 1.0.9-2.el7 base 65 k
        libSM x86_64 1.2.2-2.el7 base 39 k
        libXcomposite x86_64 0.4.4-4.1.el7 base 22 k
        libXext x86_64 1.3.3-3.el7 base 39 k
        libXfont x86_64 1.5.1-2.el7 base 150 k
        libXi x86_64 1.7.4-2.el7 base 40 k
        libXrender x86_64 0.9.8-2.1.el7 base 25 k
        libXtst x86_64 1.2.2-2.1.el7 base 20 k
        libfontenc x86_64 1.1.2-3.el7 base 30 k
        libxslt x86_64 1.1.28-5.el7 base 242 k
        lksctp-tools x86_64 1.0.17-2.el7 base 88 k
        python-javapackages noarch 3.4.1-11.el7 base 31 k
        python-lxml x86_64 3.2.1-4.el7 base 758 k
        ttmkfdir x86_64 3.0.9-42.el7 base 48 k
        tzdata-java noarch 2017b-1.el7 updates 183 k
        xorg-x11-font-utils x86_64 1:7.5-20.el7 base 87 k
        xorg-x11-fonts-Type1 noarch 7.5-9.el7 base 521 k
        Updating for dependencies:
        chkconfig x86_64 1.7.2-1.el7 base 175 k
        nspr x86_64 4.13.1-1.0.el7_3 updates 126 k
        nss x86_64 3.28.2-1.6.el7_3 updates 873 k
        nss-softokn x86_64 3.16.2.3-14.4.el7 base 306 k
        nss-softokn-freebl x86_64 3.16.2.3-14.4.el7 base 204 k
        nss-sysinit x86_64 3.28.2-1.6.el7_3 updates 58 k
        nss-tools x86_64 3.28.2-1.6.el7_3 updates 496 k
        nss-util x86_64 3.28.2-1.1.el7_3 updates 73 k

        Transaction Summary
        ===========================================================================================================
        Install 1 Package (+21 Dependent packages)
        Upgrade ( 8 Dependent packages)

        Total download size: 36 M
        Is this ok [y/d/N]: y
        Downloading packages:
        Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
        (1/30): copy-jdk-configs-1.2-1.el7.noarch.rpm | 14 kB 00:00:00
        (2/30): giflib-4.1.6-9.el7.x86_64.rpm | 40 kB 00:00:00
        (3/30): chkconfig-1.7.2-1.el7.x86_64.rpm | 175 kB 00:00:00
        (4/30): javapackages-tools-3.4.1-11.el7.noarch.rpm | 73 kB 00:00:00
        (5/30): libICE-1.0.9-2.el7.x86_64.rpm | 65 kB 00:00:00
        (6/30): libSM-1.2.2-2.el7.x86_64.rpm | 39 kB 00:00:00
        (7/30): libXcomposite-0.4.4-4.1.el7.x86_64.rpm | 22 kB 00:00:00
        (8/30): libXext-1.3.3-3.el7.x86_64.rpm | 39 kB 00:00:00
        (9/30): libXfont-1.5.1-2.el7.x86_64.rpm | 150 kB 00:00:00
        (10/30): libXi-1.7.4-2.el7.x86_64.rpm | 40 kB 00:00:00
        (11/30): libXrender-0.9.8-2.1.el7.x86_64.rpm | 25 kB 00:00:00
        (12/30): libXtst-1.2.2-2.1.el7.x86_64.rpm | 20 kB 00:00:00
        (13/30): libfontenc-1.1.2-3.el7.x86_64.rpm | 30 kB 00:00:00
        (14/30): lksctp-tools-1.0.17-2.el7.x86_64.rpm | 88 kB 00:00:00
        (15/30): libxslt-1.1.28-5.el7.x86_64.rpm | 242 kB 00:00:00
        (16/30): java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64.rpm | 232 kB 00:00:01
        (17/30): nspr-4.13.1-1.0.el7_3.x86_64.rpm | 126 kB 00:00:00
        (18/30): nss-3.28.2-1.6.el7_3.x86_64.rpm | 873 kB 00:00:01
        (19/30): nss-sysinit-3.28.2-1.6.el7_3.x86_64.rpm | 58 kB 00:00:00
        (20/30): nss-softokn-freebl-3.16.2.3-14.4.el7.x86_64.rpm | 204 kB 00:00:01
        (21/30): nss-softokn-3.16.2.3-14.4.el7.x86_64.rpm | 306 kB 00:00:02
        (22/30): nss-tools-3.28.2-1.6.el7_3.x86_64.rpm | 496 kB 00:00:00
        (23/30): nss-util-3.28.2-1.1.el7_3.x86_64.rpm | 73 kB 00:00:00
        (24/30): python-javapackages-3.4.1-11.el7.noarch.rpm | 31 kB 00:00:00
        (25/30): ttmkfdir-3.0.9-42.el7.x86_64.rpm | 48 kB 00:00:00
        (26/30): xorg-x11-font-utils-7.5-20.el7.x86_64.rpm | 87 kB 00:00:00
        (27/30): python-lxml-3.2.1-4.el7.x86_64.rpm | 758 kB 00:00:01
        (28/30): tzdata-java-2017b-1.el7.noarch.rpm | 183 kB 00:00:01
        (29/30): xorg-x11-fonts-Type1-7.5-9.el7.noarch.rpm | 521 kB 00:00:01
        (30/30): java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64.rpm | 31 MB 00:00:09
        -----------------------------------------------------------------------------------------------------------
        Total 3.3 MB/s | 36 MB 00:00:11
        Running transaction check
        Running transaction test
        Transaction test succeeded
        Running transaction
        Updating : nspr-4.13.1-1.0.el7_3.x86_64 1/38
        Updating : nss-util-3.28.2-1.1.el7_3.x86_64 2/38
        Installing : libXext-1.3.3-3.el7.x86_64 3/38
        Installing : libXi-1.7.4-2.el7.x86_64 4/38
        Installing : libfontenc-1.1.2-3.el7.x86_64 5/38
        Installing : libICE-1.0.9-2.el7.x86_64 6/38
        Updating : nss-softokn-freebl-3.16.2.3-14.4.el7.x86_64 7/38
        Updating : nss-softokn-3.16.2.3-14.4.el7.x86_64 8/38
        Installing : libxslt-1.1.28-5.el7.x86_64 9/38
        Updating : chkconfig-1.7.2-1.el7.x86_64 10/38
        Updating : nss-sysinit-3.28.2-1.6.el7_3.x86_64 11/38
        Updating : nss-3.28.2-1.6.el7_3.x86_64 12/38
        Installing : python-lxml-3.2.1-4.el7.x86_64 13/38
        Installing : python-javapackages-3.4.1-11.el7.noarch 14/38
        Installing : javapackages-tools-3.4.1-11.el7.noarch 15/38
        Installing : libSM-1.2.2-2.el7.x86_64 16/38
        Installing : giflib-4.1.6-9.el7.x86_64 17/38
        Installing : libXfont-1.5.1-2.el7.x86_64 18/38
        Installing : 1:xorg-x11-font-utils-7.5-20.el7.x86_64 19/38
        Installing : libXtst-1.2.2-2.1.el7.x86_64 20/38
        Installing : tzdata-java-2017b-1.el7.noarch 21/38
        Installing : copy-jdk-configs-1.2-1.el7.noarch 22/38
        Installing : lksctp-tools-1.0.17-2.el7.x86_64 23/38
        Installing : 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64 24/38
        Installing : libXrender-0.9.8-2.1.el7.x86_64 25/38
        Installing : libXcomposite-0.4.4-4.1.el7.x86_64 26/38
        Installing : ttmkfdir-3.0.9-42.el7.x86_64 27/38
        Installing : xorg-x11-fonts-Type1-7.5-9.el7.noarch 28/38
        Installing : 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64 29/38
        Updating : nss-tools-3.28.2-1.6.el7_3.x86_64 30/38
        Cleanup : nss-tools-3.19.1-19.el7_2.x86_64 31/38
        Cleanup : nss-sysinit-3.19.1-19.el7_2.x86_64 32/38
        Cleanup : nss-3.19.1-19.el7_2.x86_64 33/38
        Cleanup : nss-softokn-3.16.2.3-13.el7_1.x86_64 34/38
        Cleanup : nss-util-3.19.1-4.el7_1.x86_64 35/38
        Cleanup : nspr-4.10.8-2.el7_1.x86_64 36/38
        Cleanup : nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 37/38
        Cleanup : chkconfig-1.3.61-5.el7.x86_64 38/38
        Verifying : libXext-1.3.3-3.el7.x86_64 1/38
        Verifying : nspr-4.13.1-1.0.el7_3.x86_64 2/38
        Verifying : giflib-4.1.6-9.el7.x86_64 3/38
        Verifying : nss-tools-3.28.2-1.6.el7_3.x86_64 4/38
        Verifying : libXtst-1.2.2-2.1.el7.x86_64 5/38
        Verifying : python-lxml-3.2.1-4.el7.x86_64 6/38
        Verifying : nss-softokn-3.16.2.3-14.4.el7.x86_64 7/38
        Verifying : nss-sysinit-3.28.2-1.6.el7_3.x86_64 8/38
        Verifying : 1:java-1.8.0-openjdk-headless-1.8.0.121-0.b13.el7_3.x86_64 9/38
        Verifying : nss-util-3.28.2-1.1.el7_3.x86_64 10/38
        Verifying : ttmkfdir-3.0.9-42.el7.x86_64 11/38
        Verifying : chkconfig-1.7.2-1.el7.x86_64 12/38
        Verifying : python-javapackages-3.4.1-11.el7.noarch 13/38
        Verifying : libXcomposite-0.4.4-4.1.el7.x86_64 14/38
        Verifying : nss-3.28.2-1.6.el7_3.x86_64 15/38
        Verifying : libXrender-0.9.8-2.1.el7.x86_64 16/38
        Verifying : lksctp-tools-1.0.17-2.el7.x86_64 17/38
        Verifying : copy-jdk-configs-1.2-1.el7.noarch 18/38
        Verifying : xorg-x11-fonts-Type1-7.5-9.el7.noarch 19/38
        Verifying : libxslt-1.1.28-5.el7.x86_64 20/38
        Verifying : tzdata-java-2017b-1.el7.noarch 21/38
        Verifying : nss-softokn-freebl-3.16.2.3-14.4.el7.x86_64 22/38
        Verifying : libICE-1.0.9-2.el7.x86_64 23/38
        Verifying : libXfont-1.5.1-2.el7.x86_64 24/38
        Verifying : javapackages-tools-3.4.1-11.el7.noarch 25/38
        Verifying : libXi-1.7.4-2.el7.x86_64 26/38
        Verifying : libSM-1.2.2-2.el7.x86_64 27/38
        Verifying : libfontenc-1.1.2-3.el7.x86_64 28/38
        Verifying : 1:java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64 29/38
        Verifying : 1:xorg-x11-font-utils-7.5-20.el7.x86_64 30/38
        Verifying : nss-softokn-3.16.2.3-13.el7_1.x86_64 31/38
        Verifying : nss-sysinit-3.19.1-19.el7_2.x86_64 32/38
        Verifying : nss-3.19.1-19.el7_2.x86_64 33/38
        Verifying : nss-tools-3.19.1-19.el7_2.x86_64 34/38
        Verifying : chkconfig-1.3.61-5.el7.x86_64 35/38
        Verifying : nss-softokn-freebl-3.16.2.3-13.el7_1.x86_64 36/38
        Verifying : nspr-4.10.8-2.el7_1.x86_64 37/38
        Verifying : nss-util-3.19.1-4.el7_1.x86_64 38/38

        Installed:
        java-1.8.0-openjdk.x86_64 1:1.8.0.121-0.b13.el7_3

        Dependency Installed:
        copy-jdk-configs.noarch 0:1.2-1.el7 giflib.x86_64 0:4.1.6-9.el7
        java-1.8.0-openjdk-headless.x86_64 1:1.8.0.121-0.b13.el7_3 javapackages-tools.noarch 0:3.4.1-11.el7
        libICE.x86_64 0:1.0.9-2.el7 libSM.x86_64 0:1.2.2-2.el7
        libXcomposite.x86_64 0:0.4.4-4.1.el7 libXext.x86_64 0:1.3.3-3.el7
        libXfont.x86_64 0:1.5.1-2.el7 libXi.x86_64 0:1.7.4-2.el7
        libXrender.x86_64 0:0.9.8-2.1.el7 libXtst.x86_64 0:1.2.2-2.1.el7
        libfontenc.x86_64 0:1.1.2-3.el7 libxslt.x86_64 0:1.1.28-5.el7
        lksctp-tools.x86_64 0:1.0.17-2.el7 python-javapackages.noarch 0:3.4.1-11.el7
        python-lxml.x86_64 0:3.2.1-4.el7 ttmkfdir.x86_64 0:3.0.9-42.el7
        tzdata-java.noarch 0:2017b-1.el7 xorg-x11-font-utils.x86_64 1:7.5-20.el7
        xorg-x11-fonts-Type1.noarch 0:7.5-9.el7

        Dependency Updated:
        chkconfig.x86_64 0:1.7.2-1.el7 nspr.x86_64 0:4.13.1-1.0.el7_3
        nss.x86_64 0:3.28.2-1.6.el7_3 nss-softokn.x86_64 0:3.16.2.3-14.4.el7
        nss-softokn-freebl.x86_64 0:3.16.2.3-14.4.el7 nss-sysinit.x86_64 0:3.28.2-1.6.el7_3
        nss-tools.x86_64 0:3.28.2-1.6.el7_3 nss-util.x86_64 0:3.28.2-1.1.el7_3

        Complete!
        [root@localhost install]#



        ▼2 # java -version

        [root@localhost install]# java -version
        openjdk version "1.8.0_121"
        OpenJDK Runtime Environment (build 1.8.0_121-b13)
        OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
        [root@localhost install]#


        ▼3 # rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
        [root@localhost install]# rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch



        ▼4 # repoファイル作成
        vi /etc/yum.repos.d/elasticsearch.repo

        [elasticsearch-5.x]
        name=Elasticsearch repository for 5.x packages
        baseurl=https://artifacts.elastic.co/packages/5.x/yum
        gpgcheck=1
        gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
        enabled=1
        autorefresh=1
        type=rpm-md

        ▼5 # yum install elasticsearch -y

        [root@localhost install]# vi /etc/yum.repos.d/elasticsearch.repo


        [root@localhost install]# yum install elasticsearch -y
        Loaded plugins: fastestmirror
        elasticsearch-5.x | 1.3 kB 00:00:00
        elasticsearch-5.x/primary | 40 kB 00:00:01
        Loading mirror speeds from cached hostfile
        * base: ftp.jaist.ac.jp
        * epel: ftp.jaist.ac.jp
        * extras: ftp.jaist.ac.jp
        * remi-safe: mirrors.thzhost.com
        * updates: ftp.jaist.ac.jp
        elasticsearch-5.x 98/98
        Resolving Dependencies
        --> Running transaction check
        ---> Package elasticsearch.noarch 0:5.3.0-1 will be installed
        --> Finished Dependency Resolution

        Dependencies Resolved

        ===========================================================================================================
        Package Arch Version Repository Size
        ===========================================================================================================
        Installing:
        elasticsearch noarch 5.3.0-1 elasticsearch-5.x 32 M

        Transaction Summary
        ===========================================================================================================
        Install 1 Package

        Total download size: 32 M
        Installed size: 36 M
        Downloading packages:
        elasticsearch-5.3.0.rpm | 32 MB 00:00:10
        Running transaction check
        Running transaction test
        Transaction test succeeded
        Running transaction
        Creating elasticsearch group... OK
        Creating elasticsearch user... OK
        Installing : elasticsearch-5.3.0-1.noarch 1/1
        ### NOT starting on installation, please execute the following statements to configure elasticsearch servic
        e to start automatically using systemd
        sudo systemctl daemon-reload
        sudo systemctl enable elasticsearch.service
        ### You can start elasticsearch service by executing
        sudo systemctl start elasticsearch.service
        Verifying : elasticsearch-5.3.0-1.noarch 1/1

        Installed:
        elasticsearch.noarch 0:5.3.0-1

        Complete!
        [root@localhost install]#
        [root@localhost install]#


        ▼6 # elasticsearch/jvm.options のメモリサイズを変更する
        (以降の処理で足りないとエラーになる)

        # vi /etc/elasticsearch/jvm.options
        #-Xms2g
        #-Xmx2g
        -Xms1g
        -Xmx1g

        [root@localhost install]# systemctl daemon-reload
        [root@localhost install]# systemctl start elasticsearch
        [root@localhost install]# systemctl status elasticsearch
        ● elasticsearch.service - Elasticsearch
        Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
        Active: failed (Result: exit-code) since Fri 2017-04-07 20:18:38 BST; 11s ago
        Docs: http://www.elastic.co
        Process: 13109 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
        Process: 13106 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
        Main PID: 13109 (code=exited, status=1/FAILURE)

        Apr 07 20:18:37 localhost.localdomain systemd[1]: Started Elasticsearch.
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000008a660000, 19730268...rno=12)
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: #
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # There is insufficient memory for the Java Runtime Environment to continue.
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # Native memory allocation (mmap) failed to map 1973026816 bytes for committing reserved memory.
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # An error report file with more information is saved as:
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # /tmp/hs_err_pid13109.log
        Apr 07 20:18:38 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
        Apr 07 20:18:38 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
        Apr 07 20:18:38 localhost.localdomain systemd[1]: elasticsearch.service failed.
        Hint: Some lines were ellipsized, use -l to show in full.


        エラーがでた
        メモリーが足りないというエラーらしい


        [root@localhost install]# systemctl status elasticsearch
        ● elasticsearch.service - Elasticsearch
        Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
        Active: failed (Result: exit-code) since Fri 2017-04-07 20:18:38 BST; 58min ago
        Docs: http://www.elastic.co
        Process: 13109 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
        Process: 13106 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
        Main PID: 13109 (code=exited, status=1/FAILURE)

        Apr 07 20:18:37 localhost.localdomain systemd[1]: Started Elasticsearch.
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000008a660000, 19730268...rno=12)
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: #
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # There is insufficient memory for the Java Runtime Environment to continue.
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # Native memory allocation (mmap) failed to map 1973026816 bytes for committing reserved memory.
        ## the heap to 4 GB, set:
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # An error report file with more information is saved as:
        Apr 07 20:18:38 localhost.localdomain elasticsearch[13109]: # /tmp/hs_err_pid13109.log
        Apr 07 20:18:38 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
        Apr 07 20:18:38 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
        Apr 07 20:18:38 localhost.localdomain systemd[1]: elasticsearch.service failed.
        Hint: Some lines were ellipsized, use -l to show in full.
        [root@localhost install]#


        [root@localhost install]# systemctl start elasticsearch
        [root@localhost install]#
        [root@localhost install]# vi /etc/elasticsearch/jvm.options
        [root@localhost install]#
        [root@localhost install]# systemctl start elasticsearch
        [root@localhost install]#
        [root@localhost install]#


        ▼7 # systemctl start elasticsearch
        ▼8 # systemctl status elasticsearch



        ▼9 起動確認
        [root@localhost install]# ps -ef | grepelasticsearch
        -bash: grepelasticsearch: command not found
        [root@localhost install]# ps -ef | grep elasticsearch
        elastic+ 13414 1 97 04:47 ? 00:00:53 /bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/elasticsearch-5.3.0.jar:/usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -p /var/run/elasticsearch/elasticsearch.pid --quiet -Edefault.path.logs=/var/log/elasticsearch -Edefault.path.data=/var/lib/elasticsearch -Edefault.path.conf=/etc/elasticsearch
        root 13460 12568 0 04:48 pts/1 00:00:00 grep --color=auto elasticsearch
        [root@localhost install]#


        [root@localhost install]# lsof -i:9200
        COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
        java 13414 elasticsearch 129u IPv6 146075 0t0 TCP localhost:wap-wsp (LISTEN)
        java 13414 elasticsearch 130u IPv6 146076 0t0 TCP localhost:wap-wsp (LISTEN)
        [root@localhost install]#
        [root@localhost install]#
        [root@localhost install]# curl localhost:9200
        {
        "name" : "uO1KpJW",
        "cluster_name" : "elasticsearch",
        "cluster_uuid" : "SM8-AG97QamXTz5nxOiidQ",
        "version" : {
        "number" : "5.3.0",
        "build_hash" : "3adb13b",
        "build_date" : "2017-03-23T03:31:50.652Z",
        "build_snapshot" : false,
        "lucene_version" : "6.4.1"
        },
        "tagline" : "You Know, for Search"
        }
        [root@localhost install]#
        category:elasticsearch | by:ittoocomments(0)trackbacks(0) | -

        ad
        Calender
            123
        45678910
        11121314151617
        18192021222324
        25262728   
        << February 2018 >>
        Selected entry
        PR
        Category
        Archives
        Recent comment
        • 円マークが自動変換されてる
          aaaaaa
        • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
          66hills
        • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
          ssd
        • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
          max
        • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
          DOM
        • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
          DOM
        • コンピュータ業界の根本的な変化
          cloud
        • コンピュータ業界の根本的な変化
          Dellの仮想化
        • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
          えちごや
        • マクドナルドでYahoo BBモバイルポイント 公衆無線LANサービスがつながらない
          touch
        Recent trackback
        • スマートフォンの法人活用例
          無線LANネットのブログ
        • Yahoo!オークションからのアフィリエイト収入が一気に70%減になってしまい涙目になってる話
          特選情報
        Recommend
        Link
        Profile
        Search
        Others
        Mobile
        qrcode
        Powered
        無料ブログ作成サービス JUGEM