-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run cocaine on a local machine #30
Comments
Hi, |
Hi,
|
First of all cocaine-tools < 12 doesn't work with cocaine > 12 :) you could install it directly from master branch github.com/cocaine/cocaine-tools. When it comes to cocaine-runtime do you build it from source? |
Oh, thank you, I will try :). |
Now, it seems works, at least I have tried to follow the docs, step-by-step, but it doesn't work correctly.
From Uploading package - looks good:
Uploading profile:
Starting app:
|
Hello again! "services": {
"node": {
"type": "node::v2",
"args": {
"runlist": "default"
}
}, |
Hi, I have reinstalled What it could be? The cocaine-runtime instantly finishes:
The configuration file:
If remove
Thanks! |
Could you provide me logs from syslog about cocaine-runtime, please? |
Here is:
|
As we can see plugin for service node is not available. Did you install it? If you just buit from source and ran |
Hi, now, it works, I can see that the app is executing on the node. But, the last thing (I hope), how to send the request to this app and get the response?
But, it produce error:
I have checked the sources of Service, and found out that, probably the way of communication described in the docs is a bit obsoleted. Could you advise, what I do wrong? |
There're some changes from v0.11 to v0.12. You installed cocaine-framework-python for 0.12, right? #!/usr/bin/env python
from tornado import gen
from tornado.ioloop import IOLoop
from cocaine.services import Service
io = IOLoop.current()
import os
@gen.coroutine
def f():
# create service
service = Service("Echo")
# create new output stream to app with enqueue method
channel = yield service.enqueue("doIt")
# send one chunk of data to the app
yield channel.tx.write("SomeMessage")
# get one chunk from the app
res = yield channel.rx.get()
print res
channel.tx.close()
io.run_sync(f, timeout=10) |
Now it works! Thank you! 👍 I have tried on another machine, seems it works, but it can't communicate with the client app,
|
I guess a wrong version of framework is installed on the machine, for example.
I'm not sure if your syslog is tuned to not to filter debug messages out. If no messages with [D] appear in syslog after that, we can try to log to a file or stderr:
So first of all, check the version of python-framework on the server (astor-034-p5j). |
Hi! Thank you! I have managed to install and run it on the another machine, the libs and other stuff were in a mess. To summarize the steps of installation:
|
I think, we should fix the guide. Thanks! |
I think installation on OpenSuse is also related to the issue. So, here is a small guide if someone looking. Installation Cocaine on OpenSuse from sourcesCocaine CoreInstall required libraries: sudo zypper in devscripts autoconf automake libtool
sudo zypper in mhash-devel libuuid-devel uuid-devel libcgroup-devel libarchive-devel Download latest binutils and build it as shared: wget http://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.gz
tar -xf binutils-2.25.tar.gz
cd binutils-2.25
./configure --enable-shared
make && sudo make install Install msgpack (v0.5 is compatible): git clone -b cpp-0.5 https://github.com/msgpack/msgpack-c.git
cd msgpack-c
./bootstrap
./configure
make && sudo make install Download and install cmake (if absent) sudo zypper in cmake cmake-gui Clone and build cocaine-core git clone --recursive https://github.com/3Hren/cocaine-core.git
cd cocaine-core
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr/local ..
make -j$(grep -c 'processor' /proc/cpuinfo)
sudo make install Cocaine Python frameworkOptional: Install Anaconda (makes your life easy): Install required packages: pip install msgpack-python tornado toro Clone and install cocaine-framework-python: git clone https://github.com/cocaine/cocaine-framework-python.git
cd cocaine-framework-python
python setup.py install Cocaine PluginsInstall required libraries: sudo zypper in libcurl-devel libnl3-devel Build and install zookeeper: wget http://artfiles.org/apache.org/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
tar -xf zookeeper-3.4.6.tar.gz
cd zookeeper-3.4.6/src/c
./configure
make && sudo make install Install cocaine-plugins (w/o IPVS, ELASTICSEARCH and URLFETCH): git clone https://github.com/cocaine/cocaine-plugins.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr/local ..
ccmake ..
### Turn off IPVS, ELASTICSEARCH and URLFETCH ###
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr/local ..
make && sudo make install Cocaine ToolsInstall required packages: pip install opster tornado msgpack-python Install cocaine-tools: git clone https://github.com/cocaine/cocaine-tools.git
cd cocaine-tools
python setup.py install FinishIn my case, I also was required to prepare directories and get permission sudo mkdir -p /var/run/cocaine
sudo mkdir -p /var/lib/cocaine
sudo mkdir -p /var/spool/cocaine
sudo chown -R USERNAME:GROUP /var/run/cocaine
sudo chown -R USERNAME:GROUP /var/lib/cocaine
sudo chown -R USERNAME:GROUP /var/spool/cocaine |
I have installed
cocaine
andcocaine-tools
, and tried to install the example ( https://github.com/cocaine/cocaine-framework-python/wiki/Echo-application-example ). When I runcocaine-runtime
as non-daemon with the following configuration file ( other sections are the same as in /cocaine-core/debian/cocaine-runtime.conf ):It seems that it works:
On the other session, I run cocaine-tools and try to upload example app as it is proposed in docs, and after execution of cocaine-tool profile upload, it stucks, to execute next command I need terminate current cocaine-tools process. Moreover, no feedback from
cocaine-runtime
.Could you please advise what I do wrong, and how to configure it properly?
Thanks!
The text was updated successfully, but these errors were encountered: