在datastax中启用后,datastax solr不起作用

时间:2016-05-26 21:32:09

标签: solr cassandra datastax

我已经完成了datastax指令,用于启用solr(DSE搜索)并从下面的文档中逐行配置cassandra但solr仍然无法正常工作,我的意思是无法通过浏览器或curl到达http://localhost:8983

datastax docs for enabling solr (DSE search)

我尝试使用solr重新加载cassandra(命令:sudo dse cassandra -s )但是在运行命令后发生此异常:

ERROR 01:47:29,998  Error starting local jmx server: 
java.rmi.server.ExportException: Port already in use: 7199; nested exception is: 
    java.net.BindException: Address already in use
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:341) ~[na:1.8.0_91]
    at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:249) ~[na:1.8.0_91]
    at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411) ~[na:1.8.0_91]
    at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147) ~[na:1.8.0_91]
    at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:212) ~[na:1.8.0_91]
    at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:152) ~[na:1.8.0_91]
    at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:112) ~[na:1.8.0_91]
    at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:239) ~[na:1.8.0_91]
    at org.apache.cassandra.service.CassandraDaemon.maybeInitJmx(CassandraDaemon.java:100) [cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:222) [cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at com.datastax.bdp.server.DseDaemon.setup(DseDaemon.java:345) [dse-core-4.8.7.jar:4.8.7]
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:564) [cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at com.datastax.bdp.DseModule.main(DseModule.java:74) [dse-core-4.8.7.jar:4.8.7]
Caused by: java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method) ~[na:1.8.0_91]
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387) ~[na:1.8.0_91]
    at java.net.ServerSocket.bind(ServerSocket.java:375) ~[na:1.8.0_91]
    at java.net.ServerSocket.<init>(ServerSocket.java:237) ~[na:1.8.0_91]
    at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231) ~[na:1.8.0_91]
    at org.apache.cassandra.utils.RMIServerSocketFactoryImpl.createServerSocket(RMIServerSocketFactoryImpl.java:13) ~[cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666) ~[na:1.8.0_91]
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:330) ~[na:1.8.0_91]
    ... 12 common frames omitted
ERROR 01:47:30,044  Fatal exception during initialization
org.apache.cassandra.exceptions.ConfigurationException: Cannot start node if snitch's data center (Solr) differs from previous data center (Cassandra). Please fix the snitch configuration, decommission and rebootstrap this node or use the flag -Dcassandra.ignore_dc=true.
    at org.apache.cassandra.db.SystemKeyspace.checkHealth(SystemKeyspace.java:629) ~[cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:290) [cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at com.datastax.bdp.server.DseDaemon.setup(DseDaemon.java:345) [dse-core-4.8.7.jar:4.8.7]
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:564) [cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at com.datastax.bdp.DseModule.main(DseModule.java:74) [dse-core-4.8.7.jar:4.8.7]
INFO  01:47:30,045  DSE shutting down...
INFO  01:47:30,045  All plugins are stopped.
May 27, 2016 1:47:30 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-127.0.0.1-8983
ERROR 01:47:30,076  Exception in thread Thread[Daemon shutdown,5,main]
java.lang.AssertionError: null
    at org.apache.cassandra.gms.Gossiper.addLocalApplicationStateInternal(Gossiper.java:1415) ~[cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at org.apache.cassandra.gms.Gossiper.addLocalApplicationStates(Gossiper.java:1439) ~[cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at org.apache.cassandra.gms.Gossiper.addLocalApplicationState(Gossiper.java:1429) ~[cassandra-all-2.1.14.1272.jar:2.1.14.1272]
    at com.datastax.bdp.gms.DseState.setActiveStatusSync(DseState.java:252) ~[dse-core-4.8.7.jar:4.8.7]
    at com.datastax.bdp.server.DseDaemon.preStop(DseDaemon.java:437) ~[dse-core-4.8.7.jar:4.8.7]
    at com.datastax.bdp.server.DseDaemon.safeStop(DseDaemon.java:447) ~[dse-core-4.8.7.jar:4.8.7]
    at com.datastax.bdp.server.DseDaemon$1.run(DseDaemon.java:697) ~[dse-core-4.8.7.jar:4.8.7]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_91]
May 27, 2016 1:47:31 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Solr
INFO  01:47:31,057  Shutting down Solr audit logging filter
16/05/27 01:47:31 INFO audit.SolrHttpAuditLogFilter: Shutting down com.datastax.bdp.search.solr.RepeatablePOSTQueryFilter filter
May 27, 2016 1:47:31 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/solr] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
May 27, 2016 1:47:31 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/solr] appears to have started a thread named [NonPeriodicTasks:1] but has failed to stop it. This is very likely to create a memory leak.
May 27, 2016 1:47:31 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-127.0.0.1-8983

ps aux | grep cassandra输出:

nasser   14515  0.0  0.0  19772  2720 pts/14   S+   02:45   0:00 grep --color=auto cassandra
root     32456  1.0 29.3 5242616 3553776 pts/14 SLl 00:39   1:17 /usr/bin/java -Ddse.system_memory_in_mb=11829 -Dcassandra.config.loader=com.datastax.bdp.config.DseConfigurationLoader -ea -javaagent:/usr/share/dse/cassandra/lib/jamm-0.3.0.jar -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms2957M -Xmx2957M -XX:+HeapDumpOnOutOfMemoryError -Xss256k -XX:+AlwaysPreTouch -XX:-UseBiasedLocking -XX:StringTableSize=1000003 -XX:+UseTLAB -XX:+ResizeTLAB -XX:CompileCommandFile=/etc/dse/cassandra/hotspot_compiler -XX:+UseG1GC -XX:G1RSetUpdatingPauseTimePercent=5 -XX:MaxGCPauseMillis=500 -Djava.net.preferIPv4Stack=true -Dcassandra.jmx.local.port=7199 -XX:+DisableExplicitGC -Dlogback.configurationFile=logback.xml -Dcassandra.logdir=/var/log/cassandra -Dcassandra.storagedir= -cp :/usr/share/dse/dse-core-4.8.7.jar:/usr/share/dse/dse-hadoop-4.8.7.jar:/usr/share/dse/dse-hive-4.8.7.jar:/usr/share/dse/dse-search-4.8.7.jar:/usr/share/dse/dse-spark-4.8.7.jar:/usr/share/dse/dse-sqoop-4.8.7.jar:/usr/share/dse/common/antlr-2.7.7.jar:/usr/share/dse/common/antlr-3.2.jar:/usr/share/dse/common/antlr-runtime-3.2.jar:/usr/share/dse/common/aopalliance-1.0.jar:/usr/share/dse/common/api-asn1-api-1.0.0-M24.jar:/usr/share/dse/common/api-asn1-ber-1.0.0-M24.jar:/usr/share/dse/common/api-i18n-1.0.0-M24.jar:/usr/share/dse/common/api-ldap-client-api-1.0.0-M24.jar:/usr/share/dse/common/api-ldap-codec-core-1.0.0-M24.jar:/usr/share/dse/common/api-ldap-codec-standalone-1.0.0-M24.jar:/usr/share/dse/common/api-ldap-extras-codec-1.0.0-M24.jar:/usr/share/dse/common/api-ldap-extras-codec-api-1.0.0-M24.jar:/usr/share/dse/common/api-ldap-model-1.0.0-M24.jar:/usr/share/dse/common/api-ldap-net-mina-1.0.0-M24.jar:/usr/share/dse/common/api-util-1.0.0-M24.jar:/usr/share/dse/common/asm-5.0.3.jar:/usr/share/dse/common/commons-beanutils-1.7.0.jar:/usr/share/dse/common/commons-beanutils-core-1.8.0.jar:/usr/share/dse/common/commons-codec-1.9.jar:/usr/share/dse/common/commons-collections-3.2.2.jar:/usr/share/dse/common/commons-compiler-2.6.1.jar:/usr/share/dse/common/commons-configuration-1.6.jar:/usr/share/dse/common/commons-digester-1.8.jar:/usr/share/dse/common/commons-io-2.4.jar:/usr/share/dse/common/commons-lang-2.6.jar:/usr/share/dse/common/commons-logging-1.1.1.jar:/usr/share/dse/common/commons-pool-1.6.jar:/usr/share/dse/common/guava-16.0.1.jar:/usr/share/dse/common/guice-3.0.jar:/usr/share/dse/common/guice-multibindings-3.0.jar:/usr/share/dse/common/HdrHistogram-1.2.1.1.jar:/usr/share/dse/common/jackson-annotations-2.2.2.jar:/usr/share/dse/common/jackson-core-2.2.2.jar:/usr/share/dse/common/jackson-databind-2.2.2.jar:/usr/share/dse/common/janino-2.6.1.jar:/usr/share/dse/common/javassist-3.18.2-GA.jar:/usr/share/dse/common/java-uuid-generator-3.1.3.jar:/usr/share/dse/common/javax.inject-1.jar:/usr/share/dse/common/jbcrypt-0.4d.jar:/usr/share/dse/common/jcl-over-slf4j-1.7.10.jar:/usr/share/dse/common/jline-1.0.jar:/usr/share/dse/common/journalio-1.4.2.jar:/usr/share/dse/common/jsr305-2.0.1.jar:/usr/share/dse/common/kmip-1.7.1e.jar:/usr/share/dse/common/log4j-1.2.13.jar:/usr/share/dse/common/mina-core-2.0.7.jar:/usr/share/dse/common/reflections-0.9.10.jar:/usr/share/dse/common/slf4j-api-1.7.10.jar:/usr/share/dse/common/stringtemplate-3.2.jar:/usr/share/dse/common/validation-api-1.1.0.Final.jar:/etc/dse:/etc/dse/cassandra:/usr/share/dse/cassandra/tools/lib/stress.jar:/usr/share/dse/cassandra/lib/antlr-3.5.2.jar:/usr/share/dse/cassandra/lib/antlr-runtime-3.5.2.jar:/usr/share/dse/cassandra/lib/cassandra-all-2.1.14.1272.jar:/usr/share/dse/cassandra/lib/cassandra-clientutil-2.1.14.1272.jar:/usr/share/dse/cassandra/lib/cassandra-thrift-2.1.14.1272.jar:/usr/share/dse/cassandra/lib/commons-cli-1.1.jar:/usr/share/dse/cassandra/lib/commons-codec-1.9.jar:/usr/share/dse/cassandra/lib/commons-lang-2.6.jar:/usr/share/dse/cassandra/lib/commons-lang3-3.1.jar:/usr/share/dse/cassandra/lib/commons-logging-1.2.jar:/usr/share/dse/cassandra/lib/commons-math3-3.2.jar:/usr/share/dse/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/dse/cassandra/lib/concurrentlinkedhashmap-lru-1.3.jar:/usr/share/dse/cassandra/lib/disruptor-3.0.1.jar:/usr/share/dse/cassandra/

2 个答案:

答案 0 :(得分:3)

看起来你没有停止已经运行的进程。你能检查一下你是否有另一个cassandra进程正在运行(在你的情况下是dse)吗?

答案 1 :(得分:0)

此问题与DSE搜索中的搜索功能无关。 Cassandra想要出现但是有些东西与jmx端口7199绑定。

您可以使用&#39; netstat -a |找出绑定到该端口的内容grep 7199&#39;。但是,很可能您已经有一个现有的dse实例。

sudo pkill -f dse

将杀死dse进程。然后你可以尝试再次启动它。