cloudant-labs / clouseau

Expose Lucene features as an erlang-like node
Apache License 2.0
58 stars 32 forks source link

Handshake issue (cookie is correct) #66

Open finalclass opened 1 year ago

finalclass commented 1 year ago

I have a problem connecting clouseau with couchdb. I'm sure the cookie is correctly set because I can connect and ping the couchdb from a different erl process with net_adm:ping('couchdb@127.0.0.1') but starting clouseau and refrashing a page in fauxton I have this:

023-02-07 10:37:16,161 org.apache.commons.configuration.ConfigurationUtils [DEBUG] ConfigurationUtils.locate(): base is null, name is /home/sel/Documents/clouseau/clouseau-2.17.0/clouseau.ini
2023-02-07 10:37:16,162 org.apache.commons.configuration.DefaultFileSystem [DEBUG] Could not locate file /home/sel/Documents/clouseau/clouseau-2.17.0/clouseau.ini at null: no protocol: /home/sel/Documents/clouseau/clouseau-2.17.0/clouseau.ini
2023-02-07 10:37:16,162 org.apache.commons.configuration.ConfigurationUtils [DEBUG] Loading configuration from the absolute path /home/sel/Documents/clouseau/clouseau-2.17.0/clouseau.ini
2023-02-07 10:37:16,302 org.jboss.netty.channel.socket.nio.NioProviderMetadata [DEBUG] Using the autodetected NIO constraint level: 0
2023-02-07 10:37:16,355 clouseau.main [INFO] Clouseau running as clouseau@127.0.0.1
2023-02-07 10:37:16,360 scalang.ErlangNode [DEBUG] deliverMonitor Pid('clouseau@127.0.0.1,2,1,1) -> Pid('clouseau@127.0.0.1,3,1,1) (Reference('clouseau@127.0.0.1,WrappedArray(0, 0, 0),1))
2023-02-07 10:37:16,362 scalang.ErlangNode [DEBUG] deliverMonitor Pid('clouseau@127.0.0.1,2,1,1) -> Pid('clouseau@127.0.0.1,4,1,1) (Reference('clouseau@127.0.0.1,WrappedArray(1, 0, 0),1))
2023-02-07 10:37:16,363 scalang.ErlangNode [DEBUG] deliverMonitor Pid('clouseau@127.0.0.1,2,1,1) -> Pid('clouseau@127.0.0.1,5,1,1) (Reference('clouseau@127.0.0.1,WrappedArray(2, 0, 0),1))
2023-02-07 10:37:19,224 scalang.node.ServerHandshakeHandler [ERROR] Exception caught during erlang handshake: 
scalang.util.StateMachine$UnexpectedEventException: State 'connected does not have a transition for event BigEndianHeapChannelBuffer(ridx=0, widx=32, cap=32)
    at scalang.util.StateMachine$State.event(StateMachine.scala:37)
    at scalang.util.StateMachine$class.event(StateMachine.scala:22)
    at scalang.node.HandshakeHandler.event(HandshakeHandler.scala:28)
    at scalang.node.HandshakeHandler.messageReceived(HandshakeHandler.scala:49)
    at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:74)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:321)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216)
    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
    at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
    at overlock.threadpool.ErrorLoggedThread.run(NamedThreadFactory.scala:40)

this is the content of the clouseau.ini file:

~/Documents/clouseau/clouseau-2.17.0 (master)$ pwd
/home/sel/Documents/clouseau/clouseau-2.17.0
~/Documents/clouseau/clouseau-2.17.0 (master)$ cat clouseau.ini 
[clouseau]

; the name of the Erlang node created by the service, leave this unchanged
name=clouseau@127.0.0.1

; set this to the same distributed Erlang cookie used by the CouchDB nodes
cookie=monster222

; the path where you would like to store the search index files
dir=/home/sel/Documents/clouseau/clouseau-2.17.0/data

; the number of search indexes that can be open simultaneously

and log4j:

~/Documents/clouseau/clouseau-2.17.0 (master)$ cat log4j.properties 
log4j.rootLogger=debug, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %c [%p] %m%n
~/Documents/clouseau/clouseau-2.17.0 (master)$ curl localhost:5984 | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   247  100   247    0     0   195k      0 --:--:-- --:--:-- --:--:--  241k
{
  "couchdb": "Welcome",
  "version": "3.2.2",
  "git_sha": "d5b746b7c",
  "uuid": "d168c554d2f4842a30dffba34eaf12ff",
  "features": [
    "access-ready",
    "partitioned",
    "pluggable-storage-engines",
    "reshard",
    "scheduler"
  ],
  "vendor": {
    "name": "The Apache Software Foundation"
  }
}