1. Start a local cluster:
|
./samples/local/bin/start-sample-cluster.sh
|
java version "1.8.0_45"
|
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
|
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
|
CLUSTERDIR=/opt/couchbase/cbas-install/samples/local
|
INSTALLDIR=/opt/couchbase/cbas-install
|
Waiting for cluster to start..done
|
|
See output in /opt/couchbase/cbas-install/samples/local/logs/
|
|
2. Issue curl command:
|
curl -s --data pretty=true --data format=CLEAN_JSON --data-urlencode statement@file.txt http://localhost:8095/analytics/service
|
|
Error received:
|
{
|
"requestID": "79492951-d037-4717-b9cd-69b6cbc860f3",
|
"signature": "*",
|
"errors": [{
|
"code": "1",
|
"msg": " Asterix Cluster is in UNUSABLE state.\n One or more Node Controllers have left or haven't joined yet.\n"
|
}],
|
"status": "fatal",
|
"metrics": {
|
"elapsedTime": "60.008365743s",
|
"executionTime": "60.007577309s",
|
"resultCount": "0",
|
"resultSize": "0"
|
}
|
}
|
|
Error reported in cc.log:
|
java.net.BindException: Address already in use
|
at sun.nio.ch.Net.bind0(Native Method)
|
at sun.nio.ch.Net.bind(Net.java:437)
|
at sun.nio.ch.Net.bind(Net.java:429)
|
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
|
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
|
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
|
at org.apache.hyracks.ipc.impl.IPCConnectionManager.<init>(IPCConnectionManager.java:72)
|
at org.apache.hyracks.ipc.impl.IPCSystem.<init>(IPCSystem.java:44)
|
at org.apache.hyracks.control.cc.ClusterControllerService.<init>(ClusterControllerService.java:169)
|
at org.apache.hyracks.control.cc.CCDriver.main(CCDriver.java:39)
|
|
3. Result of jps:
|
jps
|
7233 NCService
|
7234 NCService
|
7310 Jps
|
|
4. netstat -anp | grep -i "8095"
|
tcp 0 0 :::8095 :::* LISTEN 32736/java
|
|
5.ps -aef | grep -i 32736
|
root 7448 6179 0 11:50 pts/0 00:00:00 grep -i 32736
|
root 32736 1 0 Aug11 ? 00:07:26 /usr/java/jdk1.8.0_45//bin/java -Djava.rmi.server.hostname=localhost -classpath :/root/cbas-yingyi/etc:/root/cbas-yingyi/repo/* -Dapp.name=cbascc -Dapp.pid=32736 -Dapp.repo=/root/cbas-yingyi/repo -Dapp.home=/root/cbas-yingyi -Dbasedir=/root/cbas-yingyi org.apache.hyracks.control.cc.CCDriver -app-cc-main-class com.couchbase.analytics.bootstrap.CCApplicationEntryPoint -config-file /root/cbas-yingyi/samples/local/conf/cc.conf
|
|
6. Basically above process was using the port, killed the process and curl command worked fine.
|
|
7. Running the startup script should have thrown some kind of connection error.
|
|
|