【问题标题】:How I can set my elasticsearh port to 9300?如何将我的弹性搜索端口设置为 9300?
【发布时间】:2016-05-09 13:44:09
【问题描述】:

我正在尝试将我的 elasticsearh 端口设置为 9300,但是当我将 http.port 设置为 9300 时,elasticsearch 不起作用。 实际上我正在使用 elasticsearch 实例开发一个 grails Web 应用程序,但是当我运行该应用程序时出现以下错误

ERROR context.GrailsContextLoaderListener  - Error initializing the application: Error creating bean with name 'searchableClassMappingConfigurator': Invocation of init method failed; nested exception is org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
Message: Error creating bean with name 'searchableClassMappingConfigurator': Invocation of init method failed; nested exception is org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []

我已阅读其他答案,但没有人解决我的问题。有任何想法吗??

我的配置文件是:

elasticSearch { client.mode = 'transport' client.hosts = [ [host:'localhost', port:9300] ] disableAutoIndex = 'true' }

现在,grails 显示以下错误:

[localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - Error initializing the application: No datastore implementation specified Message: No datastore implementation specified
 Line | Method
 ->>  135 | doCall                    in    ElasticsearchGrailsPlugin$_closure1
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 |    754 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
 |    584 | beans . . . . . . . . . . in     ''
 |    527 | invokeMethod              in     ''
 |    262 | run . . . . . . . . . . . in java.util.concurrent.FutureTask
 |   1145 | runWorker                 in java.util.concurrent.ThreadPoolExecutor
 |    615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
 ^    745 | run                       in java.lang.Thread
Error |
Forked Grails VM exited with error

真的我在网上冲浪,但我没有找到解决这个问题的方法,我需要连接到一个 ES 实例。先谢谢了。对不起我的英语。

【问题讨论】:

    标签: groovy grails-plugin elasticsearch-plugin


    【解决方案1】:

    Elasticsearch 服务器默认开放 2 个端口:9200 用于与客户端通信,9300 用于节点间通信。您必须更改其中之一。

    【讨论】:

    • 我在我的 Config.groovy 中更改了弹性搜索配置所在的端口,但错误仍然存​​在。我有一个带有节点的 elasticsearch 实例,但是我无法意识到出了什么问题。有什么想法吗??
    • 您能附上您的配置并描述您的设置吗?
    • 这是我的配置文件
    【解决方案2】:

    在我的 Cofig.groovy 文件中,我添加下一个代码:

    elasticSearch {
    client.mode = 'transport'
    client.hosts = [
            [host:'localhost', port:9300]
    ]
    disableAutoIndex = 'true'
    }
    

    并在 DefaultElasticSearch.groovy 文件中将 disableAutoIndex 更改为 true 并开始工作。谢谢。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-02
      • 1970-01-01
      • 1970-01-01
      • 2013-04-07
      • 1970-01-01
      • 2016-09-09
      相关资源
      最近更新 更多