cocaine/cocaine-core

does elasticsearch plugin required to start cocaine-runtime

cybernetlab opened this issue · 3 comments

Hello! Strange behavior of cocaine-runtime (master branch). Here is my config (this is the default config):

$ cat /etc/cocaine/cocaine-default.conf 
{
    "version": 2,
    "paths": {
        "plugins": "/usr/lib/cocaine",
        "runtime": "/var/run/cocaine"
    },
    "services": {
        "logging": {
            "type": "logging"
        },
        "storage": {
            "type": "storage",
            "args": {
                "backend": "core"
            }
        },
        "node": {
            "type": "node",
            "args": {
                "runlist": "default"
            }
        }
    },
    "storages": {
        "core": {
            "type": "files",
            "args": {
                "path": "/var/lib/cocaine"
            }
        },
        "cache": {
            "type": "files",
            "args": {
                "path": "/var/cache/cocaine"
            }
        }
    },
    "logging": {
        "core" : {
            "verbosity": "info",
            "timestamp": "%Y-%m-%d %H:%M:%S.%f",
            "loggers": [
                {
                    "formatter": {
                        "type": "string",
                        "pattern": "[%(timestamp)s] [%(severity)s]: %(message)s [%(...LG)s]"
                    },
                    "sink": {
                        "type": "syslog",
                        "identity": "cocaine"
                    }
                }
            ]
        }
    }
}

When I try to run cocaine-runtime it gives me following:

$ sudo cocaine-runtime -c /etc/cocaine/cocaine-default.conf
ERROR: unable to initialize the context - unable to load '/usr/lib/cocaine/elasticsearch.cocaine-plugin' - file not found.

But there are no elasticsearch service in config. Looks like it's hardcoded somewere? I'll make and install this plugin as workaround.

It looks like elasticsearch plugin library is in your runtime plugin dir. So this library was loaded, although this service isn't in config. Could your check it? Show ldd output (i.e ldd your_plugin_path/elasticsearch.cocaine-plugin)

That means the ES plugin couldn't be even dlopen()-ed because some of its
ld dependencies are missing. Try ldd on it and then either fix the deps
or delete the plugin. Obviously we don't know whether we need the plugin or
not until we load it and read its metainfo, so we load everything.

On Saturday, June 7, 2014, Alexey Ovchinnikov notifications@github.com
wrote:

Hello! Strange behavior of cocaine-runtime (master branch). Here is my
config (this is the default config):

$ cat /etc/cocaine/cocaine-default.conf {
"version": 2,
"paths": {
"plugins": "/usr/lib/cocaine",
"runtime": "/var/run/cocaine"
},
"services": {
"logging": {
"type": "logging"
},
"storage": {
"type": "storage",
"args": {
"backend": "core"
}
},
"node": {
"type": "node",
"args": {
"runlist": "default"
}
}
},
"storages": {
"core": {
"type": "files",
"args": {
"path": "/var/lib/cocaine"
}
},
"cache": {
"type": "files",
"args": {
"path": "/var/cache/cocaine"
}
}
},
"logging": {
"core" : {
"verbosity": "info",
"timestamp": "%Y-%m-%d %H:%M:%S.%f",
"loggers": [
{
"formatter": {
"type": "string",
"pattern": "[%(timestamp)s] [%(severity)s]: %(message)s [%(...LG)s]"
},
"sink": {
"type": "syslog",
"identity": "cocaine"
}
}
]
}
}}

When I try to run cocaine-runtime it gives me following:

$ sudo cocaine-runtime -c /etc/cocaine/cocaine-default.conf
ERROR: unable to initialize the context - unable to load '/usr/lib/cocaine/elasticsearch.cocaine-plugin' - file not found.

But there are no elasticsearch service in config. Looks like it's
hardcoded somewere? I'll make and install this plugin as workaround.


Reply to this email directly or view it on GitHub
#101.

Oh, sorry - yes, elasticsearch.cocaine-plugin remained in /usr/lib/cocaine from previous v0.11 installation. Solved by removing it