Git Product home page Git Product logo

alljoyn's Introduction

octoblu

Run your own Octobu stack in Docker Swarm.

WARNING!

This documentation is incomplete, if you run into any trouble, please create an issue or submit a pull request. Thank you!

Prerequisites

  • Docker >= 17.09.0-ce
  • Node.js >= 8.0

Installation

yarn global add octoblu

or

npm install --global octoblu

Local Development

Runing a local development stack is similar to a production cluster, however there are some special considerations to make to enable a local stack.

These instructions assume you are developing on localhost. The domain localtest.me can be used to access services locally without setting up your own DNS or hosts (e.g. meshblu-http.localtest.me) .

Bootstrap

Octoblu requires some devices to exist in Meshblu before certain services will run. Creating the bootstrap stack will help to create these devices and provide some defaults to add to your dev stack. Redis and Mongo will be started as part of this stack and will persist data using a docker volume. Removing this docker volume will erase all data and you will need to bootstrap again.

mkdir dev
cp examples/dev/defaults.env dev/defaults.env
octoblu-stack-generator --output dev --stack bootstrap-development --init --no-constraints
octoblu-stack-generator --output dev --stack bootstrap-development --no-constraints
cd dev
docker stack deploy --compose-file ./docker-compose.yml octoblu

Once services are running, you'll need to curl the bootstrap service to generate the appropriate devices.

cd dev
curl -X POST http://bootstrap.localtest.me/bootstrap >> defaults.env
cd ..
octoblu-stack-generator --output dev --stack octoblu-development --init --no-constraints
octoblu-stack-generator --output dev --stack octoblu-development --no-constraints
cd dev
docker stack deploy -c ./docker-compose.yml octoblu

Production Cluster

Prequisites

  • Mongodb >= 3.0
  • Redis >= 3.0

This step will create a small Octoblu production cluster. Setting up MongoDB and Redis is outide the scope of this document.

These instructions assume you have a domain available and will setup a wildcard DNS entry to point to your docker swarm. It also assumes you will use let's encrypt for ssl certs. The examples provided are configured for Digital Ocean as a DNS provider, for alternatives see traefik docs.

Bootstrap

Octoblu requires some devices to exist in Meshblu before certain services will run. Creating the bootstrap stack will help to create these devices and provide some defaults to add to your dev stack. Redis and Mongo will be started as part of this stack and will persist data using a docker volume. Removing this docker volume will erase all data and you will need to bootstrap again.

mkdir prod 
cp examples/prod/defaults.env prod/defaults.env
cp -r examples/prod/overrides prod/overrides
# Edit prod/overrides/stacks/traefik.yml and add your domain
# Edit prod/overrides/templates/traefik/environment.json and add your Digital Ocean credentials
octoblu-stack-generator --output prod --stack bootstrap --init --overrides
# Edit prod/defaults.env and set MONGODB_URI and REDIS_URI to the correct URLs
octoblu-stack-generator --output prod --stack bootstrap --overrides
cd prod
docker stack deploy --compose-file ./docker-compose.yml octoblu

Once services are running, you'll need to curl the bootstrap service to generate the appropriate devices.

cd prod
curl -X POST http://bootstrap.{your.domain}/bootstrap >> defaults.env
cd ..
octoblu-stack-generator --output prod --stack octoblu --init --overrides
octoblu-stack-generator --output prod --stack octoblu --overrides
cd dev
docker stack deploy --compose-file ./docker-compose.yml octoblu

Stacks

Stacks are mostly Docker Stacks with a hack using volume labels to compose multiple stacks together. A stack represents a group of services to be run in the cluster. Each service has an environment file that controls its settings.

In order to change variables in each service file, simply edit the defaults.env file in your ouput dir and run octoblu-stack-generator again with the appropriate options.

To run a subset of Octoblu, run octoblu-stack-generator --stack {stackname} and deploy the stack.

An example output dir:

.
├── defaults.env
├── docker-compose.yml
└── env.d
    ├── meshblu-core-dispatcher.env
    └── meshblu-core-worker-webhook.env

1 directory, 4 files

Available Stacks

  • octoblu-development

  • bootstrap-development

  • bootstrap

  • octoblu

  • flows

  • meshblu-core

  • meshblu-firehose-socket.io

  • meshblu-http

  • traefik

Overrides

You can override the default structure of the stack, or include additional environment variables. This allows you to keep your own custom modifications yet stay in sync with the master of this project.

Create an overrides directory in your outputDirectory. You can create overrides/stacks or overrides/templates/serviceName.

This is especially useful for adding HTTP and Let's Encrypt support to traefik using your own domain.

Example Traefik Override

overrides/stacks/traefik.yml

services:
  traefik:
    command: >
      traefik
        --docker
        --docker.swarmmode
        --docker.watch
        --web
        --entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
        --entryPoints='Name:https Address::443 TLS'
        --defaultEntryPoints=http,https
        --acme
        --acme.onhostrule=true
        --acme.ondemand=true
        --acme.dnsprovider=digitalocean --acme.domains='your-domain.io'
        --acme.entrypoint=https
        --acme.acmelogging
        --acme.storage=/acme/acme.json --acme.email="[email protected]"

# Add this if you want to test lets encrypt without violating rate limits
# remove it to go back to production
#--acme.caServer="https://acme-staging.api.letsencrypt.org/directory"

overrides/templates/traefik/environment.json

{
  "DO_ACCESS_TOKEN" : "my-digital-ocean-access-token"
}

alljoyn's People

Contributors

2fast2fourier avatar chrismatthieu avatar gcampax avatar monteslu avatar nkcfan avatar peterdemartini avatar phated avatar sqrtofsaturn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alljoyn's Issues

what are constraints porting this to windows?

i tried to install this on windows and it failed, i understand by looking at the .gyp file that it currently support only mac and Linux, before i start making the necessary changes, i just wanted to understand what are the constraints you foresee or aware of in making this work on windows.

Missing ProxyBusObject?

Am I right in thinking some features are missing?

For instance, using the C++ API after finding a service I'd create a ProxyBusObject to retrieve the Introspection XML and use the ProxyBusObject MethodCall() function to call remote functions.

Is this not possible with the current nodejs implementation of alljoyn?

Thanks

OS X 10.12 npm installation problem

Hi,

I have also issues with installation on OS X 10.12 with node.js version 6.9.4. Errors during npm installation are below.

Thanks in advance!

In file included from ../src/BusConnection.cc:1:
../../nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^
../../nan/nan.h:319:17: note: previous definition is here
  v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                ^
../../nan/nan.h:344:27: error: redefinition of 'NanEnsureLocal'
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                          ^
../../nan/nan.h:334:27: note: previous definition is here
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                          ^
../../nan/nan.h:374:39: warning: 'IdleNotification' is deprecated [-Wdeprecated-declarations]
    return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
                                      ^
/Users/username/.node-gyp/6.9.4/include/node/v8.h:6114:22: note: 'IdleNotification' has been explicitly marked deprecated here
                bool IdleNotification(int idle_time_in_ms));
                     ^
In file included from ../src/BusConnection.cc:1:
../../nan/nan.h:560:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:566:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:571:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../../nan/nan.h:577:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
../../nan/nan.h:757:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../../nan/nan.h:768:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~
/Users/username/.node-gyp/6.9.4/include/node/node_buffer.h:46:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/username/.node-gyp/6.9.4/include/node/node_buffer.h:34:40: note: candidate function not viable: no known conversion from 'const char *' to 'v8::Local<v8::String>' for
      2nd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/username/.node-gyp/6.9.4/include/node/node_buffer.h:31:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/username/.node-gyp/6.9.4/include/node/node_buffer.h:39:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../src/BusConnection.cc:1:
../../nan/nan.h:772:12: error: no viable conversion from returned value of type 'v8::MaybeLocal<v8::Object>' to function return type 'v8::Local<v8::Object>'
    return node::Buffer::New(v8::Isolate::GetCurrent(), size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/.node-gyp/6.9.4/include/node/v8.h:218:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from
      'v8::MaybeLocal<v8::Object>' to 'const v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
/Users/username/.node-gyp/6.9.4/include/node/v8.h:218:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from
      'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&' for 1st argument
/Users/username/.node-gyp/6.9.4/include/node/v8.h:222:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
In file included from ../src/BusConnection.cc:1:
../../nan/nan.h:779:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
           ~~~~~~~~~~~~~~^
../../nan/nan.h:806:32: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
                               ^
/Users/username/.node-gyp/6.9.4/include/node/v8.h:1354:21: note: 'Compile' has been explicitly marked deprecated here
      Local<Script> Compile(Isolate* isolate, Source* source,
                    ^
In file included from ../src/BusConnection.cc:1:
../../nan/nan.h:813:32: warning: 'Compile' is deprecated [-Wdeprecated-declarations]
    return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
                               ^
/Users/username/.node-gyp/6.9.4/include/node/v8.h:1354:21: note: 'Compile' has been explicitly marked deprecated here
      Local<Script> Compile(Isolate* isolate, Source* source,
                    ^
../src/BusConnection.cc:25:31: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
    obj = con->GetFunction()->NewInstance(1, argv);
                              ^
/Users/username/.node-gyp/6.9.4/include/node/v8.h:3270:31: note: 'NewInstance' has been explicitly marked deprecated here
                Local<Object> NewInstance(int argc, Local<Value> argv[]) const);
                              ^
../src/BusConnection.cc:43:41: error: no matching function for call to 'New'
  v8::Local<v8::FunctionTemplate> tpl = v8::FunctionTemplate::New(BusConnection::New);
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/.node-gyp/6.9.4/include/node/v8.h:4483:34: note: candidate function not viable: no known conversion from 'void (const v8::FunctionCallbackInfo<v8::Value> &)'
      to 'v8::Isolate *' for 1st argument
  static Local<FunctionTemplate> New(
                                 ^
/Users/username/.node-gyp/6.9.4/include/node/v8.h:4487:34: note: candidate function not viable: requires 6 arguments, but 1 was provided
  static Local<FunctionTemplate> New(
                                 ^
/Users/username/.node-gyp/6.9.4/include/node/v8.h:229:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/username/.node-gyp/6.9.4/include/node/v8.h:188:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:501:12: note: in instantiation of function template specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../src/BusConnection.cc:1:
In file included from ../../nan/nan.h:24:
In file included from /Users/username/.node-gyp/6.9.4/include/node/node.h:42:
/Users/username/.node-gyp/6.9.4/include/node/v8.h:229:5: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/username/.node-gyp/6.9.4/include/node/v8.h:188:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:511:12: note: in instantiation of function template specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../src/BusConnection.cc:1:
In file included from ../../nan/nan.h:24:
In file included from /Users/username/.node-gyp/6.9.4/include/node/node.h:42:
/Users/username/.node-gyp/6.9.4/include/node/v8.h:229:5: error: assigning to 'v8::Function *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/username/.node-gyp/6.9.4/include/node/v8.h:188:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1645:12: note: in instantiation of function template specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../src/BusConnection.cc:1:
In file included from ../../nan/nan.h:24:
In file included from /Users/username/.node-gyp/6.9.4/include/node/node.h:42:
/Users/username/.node-gyp/6.9.4/include/node/v8.h:229:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/username/.node-gyp/6.9.4/include/node/v8.h:188:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../../nan/nan.h:1776:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
    return NanEscapeScope(
           ^
../../nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
13 warnings and 15 errors generated.
make: *** [Release/obj.target/node-alljoyn/src/BusConnection.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/username/node_modules/alljoyn
gyp ERR! node -v v6.9.4
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/Users/username/package.json'
npm WARN username No description
npm WARN username No repository field.
npm WARN username No README data
npm WARN username No license field.
npm ERR! Darwin 16.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "alljoyn"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the alljoyn package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs alljoyn
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls alljoyn
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/username/npm-debug.log

npm install fails on OSX 10.10

ran npm install alljoyn and received this error that says 'This is most likely a problem with alljoyn package, not npm itself. Tell the author that this fails on your system: node-gyp rebuild'

make: *** [Release/obj.target/node-alljoyn/src/BusConnection.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.1.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/chris/node_modules/alljoyn
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "alljoyn"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the alljoyn package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls alljoyn
npm ERR! There is likely additional logging output above.

npm install alljoyn failed in ubuntu 14.04.2

I am getting the following errors during installing octoblu/alljoyn.

$ npm install alljoyn
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz
npm http 200 https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/nan/-/nan-1.7.0.tgz
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-1.7.0.tgz

[email protected] install /home/sesa288124/octoblu/node_modules/alljoyn
node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.16.0-30-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/sesa288124/octoblu/node_modules/alljoyn
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1
npm ERR! not ok code 0

Ubuntu 16.04 error when installing using npm

I am having difficulties with alljoyn installation threw npm for node.js. Errors are below. I am using node.js 4.2.6. Any help would be appreaciated!

Thanks in advance!

  LINK(target) Release/allchat
  CXX(target) Release/obj.target/node-alljoyn/src/bindings.o
In file included from ../src/bindings.cc:2:0:
../../nan/nan.h:324:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                           ^
../../nan/nan.h:319:17: note: ‘template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)’ previously declared here
   v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                 ^
../../nan/nan.h:344:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)’
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                           ^
../../nan/nan.h:334:27: note: ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)’ previously declared here
   NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                           ^
../../nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../../nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:761:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../../nan/nan.h:761:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:768:67: error: no matching function for call to ‘New(v8::Isolate*, const char*&, uint32_t&)’
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../../nan/nan.h:25:0,
                 from ../src/bindings.cc:2:
/usr/include/nodejs/src/node_buffer.h:31:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/usr/include/nodejs/src/node_buffer.h:31:40: note:   conversion of argument 3 would be ill-formed:
In file included from ../src/bindings.cc:2:0:
../../nan/nan.h:768:67: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
In file included from ../../nan/nan.h:25:0,
                 from ../src/bindings.cc:2:
/usr/include/nodejs/src/node_buffer.h:43:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/usr/include/nodejs/src/node_buffer.h:43:40: note:   conversion of argument 2 would be ill-formed:
In file included from ../src/bindings.cc:2:0:
../../nan/nan.h:768:67: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:772:29: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                             ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../src/bindings.cc: In function ‘void init(v8::Handle<v8::Object>)’:
../src/bindings.cc:21:71: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfo<v8::Value>&))’
   Local<Function> busWrap = FunctionTemplate::New(BusAttachmentWrapper)->GetFunction();
                                                                       ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/bindings.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note:   no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfo<v8::Value>&)’ to ‘v8::Isolate*’
../src/bindings.cc:23:84: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfo<v8::Value>&))’
   Local<Function> interfaceWrap = FunctionTemplate::New(InterfaceDescriptionWrapper)->GetFunction();
                                                                                    ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/bindings.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note:   no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfo<v8::Value>&)’ to ‘v8::Isolate*’
../src/bindings.cc:25:85: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfo<v8::Value>&))’
   Local<Function> listenerConstructor = FunctionTemplate::New(BusListenerConstructor)->GetFunction();
                                                                                     ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/bindings.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note:   no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfo<v8::Value>&)’ to ‘v8::Isolate*’
../src/bindings.cc:27:81: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfo<v8::Value>&))’
   Local<Function> objectConstructor = FunctionTemplate::New(BusObjectConstructor)->GetFunction();
                                                                                 ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/bindings.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note:   no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfo<v8::Value>&)’ to ‘v8::Isolate*’
../src/bindings.cc:29:104: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfo<v8::Value>&))’
   Local<Function> sessionPortListenerConstructor = FunctionTemplate::New(SessionPortListenerConstructor)->GetFunction();
                                                                                                        ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/bindings.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note:   no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfo<v8::Value>&)’ to ‘v8::Isolate*’
../src/bindings.cc:31:90: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfo<v8::Value>&))’
   Local<Function> notificationConstructor = FunctionTemplate::New(NotificationConstructor)->GetFunction();
                                                                                          ^
In file included from /usr/include/nodejs/src/node.h:42:0,
                 from ../src/bindings.cc:1:
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int)
   static Local<FunctionTemplate> New(
                                  ^
/usr/include/nodejs/deps/v8/include/v8.h:4349:34: note:   no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfo<v8::Value>&)’ to ‘v8::Isolate*’
node-alljoyn.target.mk:229: recipe for target 'Release/obj.target/node-alljoyn/src/bindings.o' failed
make: *** [Release/obj.target/node-alljoyn/src/bindings.o] Error 1
make: Leaving directory '/home/username/node_modules/alljoyn/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-31-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/username/node_modules/alljoyn
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/home/username/package.json'
npm WARN username No description
npm WARN username No repository field.
npm WARN username No README data
npm WARN username No license field.
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "alljoyn"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the alljoyn package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs alljoyn
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls alljoyn
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/username/npm-debug.log

Octoblu/alljoyn installation failing in Ubuntu 14.04 and Raspberry

In Linux, install command

$ npm install alljoyn

got end with these error messages

CXX(target) Release/obj.target/node-alljoyn/src/bindings.o
../src/bindings.cc: In function ‘void init(v8::Handlev8::Object)’:
../src/bindings.cc:21:71: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfov8::Value&))’
Local busWrap = FunctionTemplate::New(BusAttachmentWrapper)->GetFunction();
^
../src/bindings.cc:21:71: note: candidate is:
In file included from /home/user/.node-gyp/0.12.2/src/node.h:61:0,
from ../src/bindings.cc:1:
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
static Local New(
^
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfov8::Value&)’ to ‘v8::Isolate_’
../src/bindings.cc:23:84: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfov8::Value&))’
Local interfaceWrap = FunctionTemplate::New(InterfaceDescriptionWrapper)->GetFunction();
^
../src/bindings.cc:23:84: note: candidate is:
In file included from /home/user/.node-gyp/0.12.2/src/node.h:61:0,
from ../src/bindings.cc:1:
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
static Local New(
^
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfov8::Value&)’ to ‘v8::Isolate_’
../src/bindings.cc:25:85: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfov8::Value&))’
Local listenerConstructor = FunctionTemplate::New(BusListenerConstructor)->GetFunction();
^
../src/bindings.cc:25:85: note: candidate is:
In file included from /home/user/.node-gyp/0.12.2/src/node.h:61:0,
from ../src/bindings.cc:1:
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
static Local New(
^
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfov8::Value&)’ to ‘v8::Isolate_’
../src/bindings.cc:27:81: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfov8::Value&))’
Local objectConstructor = FunctionTemplate::New(BusObjectConstructor)->GetFunction();
^
../src/bindings.cc:27:81: note: candidate is:
In file included from /home/user/.node-gyp/0.12.2/src/node.h:61:0,
from ../src/bindings.cc:1:
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
static Local New(
^
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfov8::Value&)’ to ‘v8::Isolate_’
../src/bindings.cc:29:104: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfov8::Value&))’
Local sessionPortListenerConstructor = FunctionTemplate::New(SessionPortListenerConstructor)->GetFunction();
^
../src/bindings.cc:29:104: note: candidate is:
In file included from /home/user/.node-gyp/0.12.2/src/node.h:61:0,
from ../src/bindings.cc:1:
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
static Local New(
^
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfov8::Value&)’ to ‘v8::Isolate_’
../src/bindings.cc:31:90: error: no matching function for call to ‘v8::FunctionTemplate::New(void (&)(const v8::FunctionCallbackInfov8::Value&))’
Local notificationConstructor = FunctionTemplate::New(NotificationConstructor)->GetFunction();
^
../src/bindings.cc:31:90: note: candidate is:
In file included from /home/user/.node-gyp/0.12.2/src/node.h:61:0,
from ../src/bindings.cc:1:
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: static v8::Localv8::FunctionTemplate v8::FunctionTemplate::New(v8::Isolate_, v8::FunctionCallback, v8::Handlev8::Value, v8::Handlev8::Signature, int)
static Local New(
^
/home/user/.node-gyp/0.12.2/deps/v8/include/v8.h:3455:34: note: no known conversion for argument 1 from ‘void(const v8::FunctionCallbackInfov8::Value&)’ to ‘v8::Isolate_’
make: *** [Release/obj.target/node-alljoyn/src/bindings.o] Error 1
make: Leaving directory /home/user/nodejs/node_modules/alljoyn/build' gyp ERR! build error gyp ERR! stack Error:make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.13.0-40-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/nodejs/node_modules/alljoyn
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Linux 3.13.0-40-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "alljoyn"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the alljoyn package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls alljoyn
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/user/nodejs/npm-debug.log

Can anyone help me to install alljoyn successfully.?

Thanks

npm install failed on Windows 10 Enterprise (node.js 0.12.7)

  • Open the nodejs admin command prompt
  • Run "npm install alljoyn"
  • npm reported installation failure on node-gyp rebuild

-- log
C:\Windows\System32>npm install alljoyn
\

[email protected] install C:\Windows\System32\node_modules\alljoyn
node-gyp rebuild

C:\Windows\System32\node_modules\alljoyn>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
gyp: binding.gyp not found (cwd: C:\Windows\System32\node_modules\alljoyn) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Windows\System32\node_modules\alljoyn
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "alljoyn"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the alljoyn package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls alljoyn
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\System32\npm-debug.log

C:\Windows\System32>npm owner ls alljoyn
chrismatthieu [email protected]
phated [email protected]
monteslu [email protected]
octoblu [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.