Discussions
MQTT in docker
I performed the steps outlined for docker-compose and it looks like MQTT container is running on port 1883. I was trying to use MQTT.fx client just to test if I can connect but it fails to connect. Is this normal? Do I need to have the access token just to connect to the server?
Posted by Philip about 4 years ago
Alexa on rpi...
Well I like the idea, but I could not even get the commands in the article to work on my pi. In particular,
"sudo snap install --devmode pulseaudio" and
"sudo snap install --channel beta alexa" did not work.
The " --" was not recognised.
I played with many combinations but nothing worked. So the core of the project turned out to be impossible.
Nonetheless, I like the approach so I am hoping we have a version problem or something similar. Can anyone advise how I can get this project working?
Posted by George Brooke over 4 years ago
Devicehive locally configuration issue :
I am trying to set up device hive locally through docker-compose .
Steps that i have followed are:
1. Docker & docker-compose both installed
2. git clone done for the official device hive .
3. have made changes in
docker-compose.yml -
admin_panel:
build: ./devicehive-admin-console/Docker
ports:
- "9000:8080"
1. have downloaded the admin-console and made changes in the docker file(devicehive-admin-console --> docker folder)
FROM nginx:alpine
MAINTAINER devicehive
#installing devicehive admin console
RUN apk add --no-cache curl \
&& mkdir -p /opt/devicehive/admin \
&& cd /opt/devicehive/admin \
&& curl -L "https://github.com/devicehive/devicehive-admin-console/archive/stable.tar.gz" | tar -xzf - --strip-components=1 \
&& sed -i -e 's/authRestEndpoint.*/authRestEndpoint: location.origin + \"\/auth\/rest\"\,/' /opt/devicehive/admin/scripts/config.js \
&& sed -i -e 's/restEndpoint.*/restEndpoint: location.origin + \"\/api\/rest\"\,/' /opt/devicehive/admin/scripts/config.js \
&& apk del curl
COPY admin-start.sh /opt/devicehive/
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /opt/devicehive/
EXPOSE 8080
ENTRYPOINT ["/bin/sh"]
CMD ["./admin-start.sh"]
2. my nginx.conf file looks like
error_log /dev/stdout info;
events { worker_connections 60000; }
http {
access_log /dev/stdout;
tcp_nodelay on;
tcp_nopush on;
include /etc/nginx/mime.types;
default_type application/octet-stream;
gzip on;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 500;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript
application/x-javascript
application/atom+xml;
server {
listen 8080;
port_in_redirect off;
location /admin {
sendfile on;
root /opt/devicehive;
index index.html;
}
location /api/rest/token {
proxy_redirect off;
proxy_pass http://localhost:80/api/rest/token;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
}
location /api/ {
proxy_redirect off;
proxy_pass http://localhost:80/api/;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
}
location /auth/ {
proxy_redirect off;
proxy_pass http://localhost:80/api/;
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
}
}
}
Note :
The admin-console is opening in http://localhost:9000/admin/
but not able to log in with the following credentials ,
user name : dhadmin
password:dhadmin_#911
Many Thanks
Subhro
Posted by Subhro about 4 years ago
devicehive-plugin-cassandra-node
i and run cassandra and it havesome wrong. way it can not connect to cassandra server , i run cassandra already.
[email protected] devicehive-plugin-cassandra-node]# netstat -anopt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Timer
tcp 0 0 127.0.0.1:7199 0.0.0.0:* LISTEN 23144/java off (0.00/0/0)
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 794/rpcbind off (0.00/0/0)
tcp 0 0 127.0.0.1:42513 0.0.0.0:* LISTEN 23144/java off (0.00/0/0)
tcp 0 0 127.0.0.1:9042 0.0.0.0:* LISTEN 23144/java off (0.00/0/0)
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 1981/dnsmasq off (0.00/0/0)
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1371/sshd off (0.00/0/0)
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1375/cupsd off (0.00/0/0)
tcp 0 0 127.0.0.1:7000 0.0.0.0:* LISTEN 23144/java off (0.00/0/0)
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1703/master off (0.00/0/0)
tcp6 0 0 :::1883 :::* LISTEN 25664/docker-proxy- off (0.00/0/0)
tcp6 0 0 :::9092 :::* LISTEN 23854/docker-proxy- off (0.00/0/0)
tcp6 0 0 :::2181 :::* LISTEN 23580/docker-proxy- off (0.00/0/0)
tcp6 0 0 :::5701 :::* LISTEN 23506/docker-proxy- off (0.00/0/0)
tcp6 0 0 :::8110 :::* LISTEN 25385/docker-proxy- off (0.00/0/0)
tcp6 0 0 :::111 :::* LISTEN 794/rpcbind off (0.00/0/0)
tcp6 0 0 :::80 :::* LISTEN 25689/docker-proxy- off (0.00/0/0)
tcp6 0 0 :::8080 :::* LISTEN 25078/docker-proxy- off (0.00/0/0)
tcp6 0 0 :::22 :::* LISTEN 1371/sshd off (0.00/0/0)
tcp6 0 0 ::1:631 :::* LISTEN 1375/cupsd off (0.00/0/0)
tcp6 0 0 :::5432 :::* LISTEN 23492/docker-proxy- off (0.00/0/0)
tcp6 0 0 ::1:25 :::* LISTEN 1703/master off (0.00/0/0)
tcp6 0 0 :::8090 :::* LISTEN 24876/docker-proxy- off (0.00/0/0)
ENVSEPARATOR=_
DEBUG=cassandrastoragemodule
plugin_user_login="dhadmin"
plugin_user_password="dhadmin_#911"
plugin_plugin_topic="plugin_topic_e4bda297-d399-45de-9824-1fb5cd6c04e0"
plugin_device_hive_plugin_ws_endpoint=ws://192.168.8.203/plugin/proxy
plugin_device_hive_auth_service_api_url=http://192.168.8.203/plugin/rest
#plugin_subscription_group=cassandra_plugin
plugin_subscription_group=devicehive_plugin
cassandra_connection_keyspace=devicehive
cassandra_connection_username=devicehive_user
cassandra_connection_password=devicehive_pwd
cassandra_connection_contactPoints=192.168.8.203
[email protected] devicehive-plugin-cassandra-node]# docker-compose up
Starting devicehive-plugin-cassandra-node_schema_1 ... done
Starting devicehive-plugin-cassandra-node_plugin_1 ... done
Attaching to devicehive-plugin-cassandra-node_schema_1, devicehive-plugin-cassandra-node_plugin_1
schema_1 |
schema_1 | > [email protected] schema /usr/src/app
schema_1 | > node ./plugin/cassandraSchema/index.js
schema_1 |
plugin_1 |
plugin_1 | > [email protected] start /usr/src/app
plugin_1 | > node ./plugin/index.js
plugin_1 |
schema_1 | CASSANDRA SCHEMAS HAVEN'T BEEN CREATED
schema_1 | { NoHostAvailableError: All host(s) tried for query failed. First host tried, 192.168.8.203:9042: Error: connect ECONNREFUSED 192.168.8.203:9042. See innerErrors.
schema_1 | at whilstEnded (/usr/src/app/node_modules/cassandra-driver/lib/control-connection.js:231:25)
schema_1 | at next (/usr/src/app/node_modules/cassandra-driver/lib/utils.js:842:14)
schema_1 | at /usr/src/app/node_modules/cassandra-driver/lib/utils.js:851:9
schema_1 | at borrowConnectionCallback (/usr/src/app/node_modules/cassandra-driver/lib/control-connection.js:226:9)
schema_1 | at HostConnectionPool.create.err (/usr/src/app/node_modules/cassandra-driver/lib/host-connection-pool.js:71:16)
schema_1 | at Object.onceWrapper (events.js:255:19)
schema_1 | at HostConnectionPool.emit (events.js:160:13)
schema_1 | at whilstEnded (/usr/src/app/node_modules/cassandra-driver/lib/host-connection-pool.js:173:23)
schema_1 | at next (/usr/src/app/node_modules/cassandra-driver/lib/utils.js:839:14)
schema_1 | at HostConnectionPool.<anonymous> (/usr/src/app/node_modules/cassandra-driver/lib/utils.js:851:9)
schema_1 | name: 'NoHostAvailableError',
schema_1 | info: 'Represents an error when a query cannot be performed because no host is available or could be reached by the driver.',
schema_1 | message: 'All host(s) tried for query failed. First host tried, 192.168.8.203:9042: Error: connect ECONNREFUSED 192.168.8.203:9042. See innerErrors.',
schema_1 | innerErrors:
schema_1 | { '192.168.8.203:9042':
schema_1 | { Error: connect ECONNREFUSED 192.168.8.203:9042
schema_1 | at Object._errnoException (util.js:1003:13)
schema_1 | at _exceptionWithHostPort (util.js:1024:20)
schema_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1194:14)
schema_1 | errno: 'ECONNREFUSED',
schema_1 | code: 'ECONNREFUSED',
schema_1 | syscall: 'connect',
schema_1 | address: '192.168.8.203',
schema_1 | port: 9042 } } }
schema_1 | npm ERR! code ELIFECYCLE
schema_1 | npm ERR! errno 1
schema_1 | npm ERR! [email protected] schema: `node ./plugin/cassandraSchema/index.js`
schema_1 | npm ERR! Exit status 1
schema_1 | npm ERR!
schema_1 | npm ERR! Failed at the [email protected] schema script.
schema_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
schema_1 |
schema_1 | npm ERR! A complete log of this run can be found in:
schema_1 | npm ERR! /root/.npm/_logs/2018-06-15T06_35_22_635Z-debug.log
devicehive-plugin-cassandra-node_schema_1 exited with code 1
plugin_1 | Plugin is starting
plugin_1 | PLUGIN ERROR: HTTP 404 Not Found
Posted by shenlan almost 4 years ago
Setup problem with docker-compose
Hi,
I setup Devicehive on a Ubuntu 16.04 VM using docker-compose. All containers seem to be up and running.
However, when accessing my-devicehive-host-url/admin url I get a "Oops! Something went wrong on server!".
Looking into the error in more detail I noticed:
Uncaught TypeError: app.parseJwt is not a function
at G.d.initialize (JwtToken.js:29)
jQuery.Deferred exception: app.Models.OAuthConfig is not a constructor TypeError: app.Models.OAuthConfig is not a constructor
Uncaught TypeError: app.Models.OAuthConfig is not a constructor
at r.Application.<anonymous> (application.js:115)
Is there something that I m doing wrong?
FYI, I had a previous version (docker standalone) up and running without problems. I now wanted to move the new version of the DeviceHive platform.
Thanks,
Yannis
Posted by Yannis Oikonomidis over 4 years ago
Plugin cassandra
Hello ,
docker-compose does not want to run any solution please ?
[email protected] start /usr/src/app
plugin_1 | > node ./plugin/index.js
plugin_1 |
plugin_1 | Plugin is starting
plugin_1 | /usr/src/app/node_modules/devicehive-plugin-core/src/PluginCore.js:21
plugin_1 | request(options, (err, response, body) => err || body.error ? reject(err || body.message) : resolve(body));
plugin_1 | ^
plugin_1 |
plugin_1 | TypeError: Cannot read property 'error' of undefined
Posted by Redha about 4 years ago
The first run of the project encountered such problems
Members [1] {
Member [172.17.0.1]:5701 - 38d527b9-eaca-42f6-a8d9-b76de7af17fa
}
2018-06-22 09:46:28.694 [main] INFO com.hazelcast.core.LifecycleService - hz.client_1 [dev] [3.8.1] HazelcastClient 3.8.1 (20170411 - f1e9264) is CLIENT_CONNECTED
2018-06-22 09:46:28.991 [main] INFO org.xnio - XNIO version 3.3.8.Final
2018-06-22 09:46:29.023 [main] INFO org.xnio.nio - XNIO NIO Implementation Version 3.3.8.Final
2018-06-22 09:46:29.158 [main] INFO io.undertow.websockets.jsr - UT026004: Adding annotated client endpoint class com.devicehive.proxy.client.WebSocketKafkaProxyClient
2018-06-22 09:46:29.240 [main] ERROR c.d.p.c.WebSocketKafkaProxyClient - Error during establishing connection:
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_131]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_131]
at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:321) ~[xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]
at org.xnio.nio.WorkerThread.run(WorkerThread.java:561) ~[xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]
2018-06-22 09:46:29.241 [main] WARN o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandUpdateHandler': Unsatisfied dependency expressed through method 'setEventBus' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterRegistry' defined in class path resource [com/devicehive/proxy/config/BackendProxyClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.devicehive.model.eventbus.FilterRegistry]: Factory method 'filterRegistry' threw exception; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
2018-06-22 09:46:29.242 [main] INFO com.hazelcast.core.LifecycleService - hz.client_1 [dev] [3.8.1] HazelcastClient 3.8.1 (20170411 - f1e9264) is SHUTTING_DOWN
2018-06-22 09:46:29.246 [main] INFO c.h.c.c.ClientConnectionManager - hz.client_1 [dev] [3.8.1] Removed connection to endpoint: [172.17.0.1]:5701, connection: ClientConnection{alive=false, connectionId=1, socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[closed]}, remoteEndpoint=[172.17.0.1]:5701, lastReadTime=2018-06-22 09:46:28.751, lastWriteTime=2018-06-22 09:46:29.246, closedTime=2018-06-22 09:46:29.242, lastHeartbeatRequested=never, lastHeartbeatReceived=never, connected server version=3.8.1}
2018-06-22 09:46:29.259 [main] INFO com.hazelcast.core.LifecycleService - hz.client_1 [dev] [3.8.1] HazelcastClient 3.8.1 (20170411 - f1e9264) is SHUTDOWN
2018-06-22 09:46:29.266 [main] INFO o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
2018-06-22 09:46:29.266 [main] INFO c.h.h.HazelcastLocalCacheRegionFactory - Shutting down HazelcastLocalCacheRegionFactory
2018-06-22 09:46:29.266 [main] INFO com.hazelcast.core.LifecycleService - hz.client_0 [dev] [3.8.1] HazelcastClient 3.8.1 (20170411 - f1e9264) is SHUTTING_DOWN
2018-06-22 09:46:29.274 [main] INFO c.h.c.c.ClientConnectionManager - hz.client_0 [dev] [3.8.1] Removed connection to endpoint: [172.17.0.1]:5701, connection: ClientConnection{alive=false, connectionId=1, socketChannel=DefaultSocketChannelWrapper{socketChannel=java.nio.channels.SocketChannel[closed]}, remoteEndpoint=[172.17.0.1]:5701, lastReadTime=2018-06-22 09:46:27.751, lastWriteTime=2018-06-22 09:46:29.274, closedTime=2018-06-22 09:46:29.266, lastHeartbeatRequested=never, lastHeartbeatReceived=never, connected server version=3.8.1}
2018-06-22 09:46:29.302 [main] INFO com.hazelcast.core.LifecycleService - hz.client_0 [dev] [3.8.1] HazelcastClient 3.8.1 (20170411 - f1e9264) is SHUTDOWN
2018-06-22 09:46:29.333 [main] INFO o.s.b.a.l.AutoConfigurationReportLoggingInitializer -
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-06-22 09:46:29.343 [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'commandUpdateHandler': Unsatisfied dependency expressed through method 'setEventBus' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterRegistry' defined in class path resource [com/devicehive/proxy/config/BackendProxyClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.devicehive.model.eventbus.FilterRegistry]: Factory method 'filterRegistry' threw exception; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:667) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) ~[spring-boot-1.5.7.RELEASE.jar!/:1.5.7.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) ~[spring-boot-1.5.7.RELEASE.jar!/:1.5.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-1.5.7.RELEASE.jar!/:1.5.7.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) [spring-boot-1.5.7.RELEASE.jar!/:1.5.7.RELEASE]
at com.devicehive.application.DeviceHiveBackendApplication.main(DeviceHiveBackendApplication.java:37) [classes!/:3.5.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [devicehive-backend-3.5.0-boot.jar:3.5.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [devicehive-backend-3.5.0-boot.jar:3.5.0]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [devicehive-backend-3.5.0-boot.jar:3.5.0]
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:587) [devicehive-backend-3.5.0-boot.jar:3.5.0]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterRegistry' defined in class path resource [com/devicehive/proxy/config/BackendProxyClientConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.devicehive.model.eventbus.FilterRegistry]: Factory method 'filterRegistry' threw exception; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:659) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
... 25 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.devicehive.model.eventbus.FilterRegistry]: Factory method 'filterRegistry' threw exception; nested exception is java.lang.RuntimeException: java.net.ConnectException: Connection refused
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
... 39 common frames omitted
Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused
at com.devicehive.proxy.client.WebSocketKafkaProxyClient.start(WebSocketKafkaProxyClient.java:68) ~[devicehive-proxy-ws-kafka-impl-3.5.0.jar!/:3.5.0]
at com.devicehive.proxy.eventbus.DistributedProxyFilterRegistry.<init>(DistributedProxyFilterRegistry.java:52) ~[devicehive-proxy-ws-kafka-impl-3.5.0.jar!/:3.5.0]
at com.devicehive.proxy.config.BackendProxyClientConfig.filterRegistry(BackendProxyClientConfig.java:102) ~[devicehive-proxy-ws-kafka-impl-3.5.0.jar!/:3.5.0]
at com.devicehive.proxy.config.BackendProxyClientConfig$$EnhancerBySpringCGLIB$$4b57b3d3.CGLIB$filterRegistry$0(<generated>) ~[devicehive-proxy-ws-kafka-impl-3.5.0.jar!/:3.5.0]
at com.devicehive.proxy.config.BackendProxyClientConfig$$EnhancerBySpringCGLIB$$4b57b3d3$$FastClassBySpringCGLIB$$f860df71.invoke(<generated>) ~[devicehive-proxy-ws-kafka-impl-3.5.0.jar!/:3.5.0]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
at com.devicehive.proxy.config.BackendProxyClientConfig$$EnhancerBySpringCGLIB$$4b57b3d3.filterRegistry(<generated>) ~[devicehive-proxy-ws-kafka-impl-3.5.0.jar!/:3.5.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.11.RELEASE.jar!/:4.3.11.RELEASE]
... 40 common frames omitted
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_131]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_131]
at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:321) ~[xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]
at org.xnio.nio.WorkerThread.run(WorkerThread.java:561) ~[xnio-nio-3.3.8.Final.jar!/:3.3.8.Final]
Posted by yan almost 4 years ago
run devicehive-plugin-cassandra-node error
i run the cassandra errr,how can i do to solve it ?
[[email protected] devicehive-plugin-cassandra-node]# docker-compose up
Creating network "devicehive-plugin-cassandra-node_default" with the default driver
Building schema
Step 1/10 : FROM node:9.4.0-alpine
Trying to pull repository docker.io/library/node ...
9.4.0-alpine: Pulling from docker.io/library/node
605ce1bd3f31: Already exists
fe58b30348fe: Already exists
46ef8987ccbd: Already exists
Digest: sha256:9cd67a00ed111285460a83847720132204185e9321ec35dacec0d8b9bf674adf
Status: Downloaded newer image for docker.io/node:9.4.0-alpine
---> b5f94997f35f
Step 2/10 : MAINTAINER devicehive
---> Running in 766617bbd8d2
---> 48ca000a0367
Removing intermediate container 766617bbd8d2
Step 3/10 : LABEL org.label-schema.url "https://devicehive.com" org.label-schema.vendor "DeviceHive" org.label-schema.vcs-url "https://github.com/devicehive/devicehive-plugin-cassandra-node" org.label-schema.name "devicehive-plugin-cassandra-node" org.label-schema.version "development"
---> Running in 911af2daed52
---> efb17940d3f1
Removing intermediate container 911af2daed52
Step 4/10 : ENV WORK_DIR /usr/src/app/
---> Running in f0aa7dd92156
---> 2722ea9e8910
Removing intermediate container f0aa7dd92156
Step 5/10 : RUN mkdir -p ${WORK_DIR}
---> Running in a48846ab1224
---> d3fb98a5eb80
Removing intermediate container a48846ab1224
Step 6/10 : WORKDIR ${WORK_DIR}
---> 0c24f5b7640d
Removing intermediate container 39100a079a2e
Step 7/10 : COPY . .
---> 4a08d10af6ab
Removing intermediate container 58f6da657a24
Step 8/10 : RUN apk update && apk add --no-cache --virtual .gyp python make g++ && npm install && npm cache clean --force && apk del .gyp
---> Running in 6de429ea3f66
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
v3.6.2-334-g0b8633cb19 [http://dl-cdn.alpinelinux.org/alpine/v3.6/main]
v3.6.2-341-gbb0c9d2d24 [http://dl-cdn.alpinelinux.org/alpine/v3.6/community]
OK: 8441 distinct packages available
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/25) Installing libbz2 (1.0.6-r5)
(2/25) Installing expat (2.2.0-r1)
(3/25) Installing libffi (3.2.1-r3)
(4/25) Installing gdbm (1.12-r0)
(5/25) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(6/25) Installing ncurses-terminfo (6.0_p20171125-r0)
(7/25) Installing ncurses-libs (6.0_p20171125-r0)
(8/25) Installing readline (6.3.008-r5)
(9/25) Installing sqlite-libs (3.20.1-r2)
(10/25) Installing python2 (2.7.14-r0)
(11/25) Installing make (4.2.1-r0)
(12/25) Installing binutils-libs (2.30-r1)
(13/25) Installing binutils (2.30-r1)
(14/25) Installing gmp (6.1.2-r0)
(15/25) Installing isl (0.17.1-r0)
(16/25) Installing libgomp (6.3.0-r4)
(17/25) Installing libatomic (6.3.0-r4)
(18/25) Installing pkgconf (1.3.7-r0)
(19/25) Installing mpfr3 (3.1.5-r0)
(20/25) Installing mpc1 (1.0.3-r0)
(21/25) Installing gcc (6.3.0-r4)
(22/25) Installing musl-dev (1.1.16-r14)
(23/25) Installing libc-dev (0.7.1-r0)
(24/25) Installing g++ (6.3.0-r4)
(25/25) Installing .gyp (0)
Executing busybox-1.26.2-r9.trigger
OK: 207 MiB in 38 packages
npm WARN notice [SECURITY] stringstream has the following vulnerability: 1 moderate. Go here for more details: https://nodesecurity.io/advisories?search=stringstream&version=0.0.5 - Run `npm i [email protected] -g` to upgrade your npm version, and then `npm audit` to get more info.
> [email protected] postinstall /usr/src/app/node_modules/sinon
> node -e "console.log('\u001b[32mLove sinon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/sinon/donate\u001b[0m\n')" || exit 0
Love sinon? You can now support the project via the open collective:
> https://opencollective.com/sinon/donate
added 458 packages in 9.209s
npm WARN using --force I sure hope you know what you are doing.
(1/25) Purging .gyp (0)
(2/25) Purging make (4.2.1-r0)
(3/25) Purging g++ (6.3.0-r4)
(4/25) Purging gcc (6.3.0-r4)
(5/25) Purging binutils (2.30-r1)
(6/25) Purging libatomic (6.3.0-r4)
(7/25) Purging libgomp (6.3.0-r4)
(8/25) Purging libc-dev (0.7.1-r0)
(9/25) Purging musl-dev (1.1.16-r14)
(10/25) Purging python2 (2.7.14-r0)
(11/25) Purging libbz2 (1.0.6-r5)
(12/25) Purging expat (2.2.0-r1)
(13/25) Purging libffi (3.2.1-r3)
(14/25) Purging gdbm (1.12-r0)
(15/25) Purging readline (6.3.008-r5)
(16/25) Purging ncurses-libs (6.0_p20171125-r0)
(17/25) Purging ncurses-terminfo (6.0_p20171125-r0)
(18/25) Purging ncurses-terminfo-base (6.0_p20171125-r0)
(19/25) Purging sqlite-libs (3.20.1-r2)
(20/25) Purging binutils-libs (2.30-r1)
(21/25) Purging mpc1 (1.0.3-r0)
(22/25) Purging mpfr3 (3.1.5-r0)
(23/25) Purging isl (0.17.1-r0)
(24/25) Purging gmp (6.1.2-r0)
(25/25) Purging pkgconf (1.3.7-r0)
Executing busybox-1.26.2-r9.trigger
OK: 5 MiB in 13 packages
---> 581c9c238c57
Removing intermediate container 6de429ea3f66
Step 9/10 : VOLUME /usr/src/app/cassandraSchemas /usr/src/app/cassandraConfig
---> Running in e4d420076001
---> 7050003c378e
Removing intermediate container e4d420076001
Step 10/10 : CMD npm run schema
---> Running in c040d09434ab
---> 89c34b680993
Removing intermediate container c040d09434ab
Successfully built 89c34b680993
WARNING: Image for service schema was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Building plugin
Step 1/10 : FROM node:9.4.0-alpine
---> b5f94997f35f
Step 2/10 : MAINTAINER devicehive
---> Using cache
---> 48ca000a0367
Step 3/10 : LABEL org.label-schema.url "https://devicehive.com" org.label-schema.vendor "DeviceHive" org.label-schema.vcs-url "https://github.com/devicehive/devicehive-plugin-cassandra-node" org.label-schema.name "devicehive-plugin-cassandra-node" org.label-schema.version "development"
---> Using cache
---> efb17940d3f1
Step 4/10 : ENV WORK_DIR /usr/src/app/
---> Using cache
---> 2722ea9e8910
Step 5/10 : RUN mkdir -p ${WORK_DIR}
---> Using cache
---> d3fb98a5eb80
Step 6/10 : WORKDIR ${WORK_DIR}
---> Using cache
---> 0c24f5b7640d
Step 7/10 : COPY . .
---> Using cache
---> 4a08d10af6ab
Step 8/10 : RUN apk update && apk add --no-cache --virtual .gyp python make g++ && npm install && npm cache clean --force && apk del .gyp
---> Using cache
---> 581c9c238c57
Step 9/10 : VOLUME /usr/src/app/cassandraSchemas /usr/src/app/cassandraConfig
---> Using cache
---> 7050003c378e
Step 10/10 : CMD npm start
---> Running in ab4972772a99
---> ba31f537852c
Removing intermediate container ab4972772a99
Successfully built ba31f537852c
WARNING: Image for service plugin was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating devicehive-plugin-cassandra-node_schema_1 ... done
Creating devicehive-plugin-cassandra-node_plugin_1 ... done
Attaching to devicehive-plugin-cassandra-node_schema_1, devicehive-plugin-cassandra-node_plugin_1
schema_1 |
schema_1 | > [email protected] schema /usr/src/app
schema_1 | > node ./plugin/cassandraSchema/index.js
schema_1 |
schema_1 | module.js:557
schema_1 | throw err;
schema_1 | ^
schema_1 |
schema_1 | Error: Cannot find module '../cassandraSchemas/cassandra-tables'
schema_1 | at Function.Module._resolveFilename (module.js:555:15)
schema_1 | at Function.Module._load (module.js:482:25)
schema_1 | at Module.require (module.js:604:17)
schema_1 | at require (internal/module.js:11:18)
schema_1 | at Object.<anonymous> (/usr/src/app/plugin/config.js:4:25)
schema_1 | at Module._compile (module.js:660:30)
schema_1 | at Object.Module._extensions..js (module.js:671:10)
schema_1 | at Module.load (module.js:573:32)
schema_1 | at tryModuleLoad (module.js:513:12)
schema_1 | at Function.Module._load (module.js:505:3)
schema_1 | npm ERR! code ELIFECYCLE
schema_1 | npm ERR! errno 1
schema_1 | npm ERR! [email protected] schema: `node ./plugin/cassandraSchema/index.js`
schema_1 | npm ERR! Exit status 1
schema_1 | npm ERR!
schema_1 | npm ERR! Failed at the [email protected] schema script.
schema_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
schema_1 |
schema_1 | npm ERR! A complete log of this run can be found in:
schema_1 | npm ERR! /root/.npm/_logs/2018-06-14T03_57_40_083Z-debug.log
devicehive-plugin-cassandra-node_schema_1 exited with code 1
plugin_1 |
plugin_1 | > [email protected] start /usr/src/app
plugin_1 | > node ./plugin/index.js
plugin_1 |
plugin_1 | module.js:557
plugin_1 | throw err;
plugin_1 | ^
plugin_1 |
plugin_1 | Error: Cannot find module '../cassandraSchemas/cassandra-tables'
plugin_1 | at Function.Module._resolveFilename (module.js:555:15)
plugin_1 | at Function.Module._load (module.js:482:25)
plugin_1 | at Module.require (module.js:604:17)
plugin_1 | at require (internal/module.js:11:18)
plugin_1 | at Object.<anonymous> (/usr/src/app/plugin/config.js:4:25)
plugin_1 | at Module._compile (module.js:660:30)
plugin_1 | at Object.Module._extensions..js (module.js:671:10)
plugin_1 | at Module.load (module.js:573:32)
plugin_1 | at tryModuleLoad (module.js:513:12)
plugin_1 | at Function.Module._load (module.js:505:3)
plugin_1 | npm ERR! code ELIFECYCLE
plugin_1 | npm ERR! errno 1
plugin_1 | npm ERR! [email protected] start: `node ./plugin/index.js`
plugin_1 | npm ERR! Exit status 1
plugin_1 | npm ERR!
plugin_1 | npm ERR! Failed at the [email protected] start script.
plugin_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
plugin_1 |
plugin_1 | npm ERR! A complete log of this run can be found in:
plugin_1 | npm ERR! /root/.npm/_logs/2018-06-14T03_57_40_527Z-debug.log
devicehive-plugin-cassandra-node_plugin_1 exited with code 1
Posted by shenlan almost 4 years ago
用户名和密码不对怎么办
用户名和密码不对怎么办
Posted by smzy over 2 years ago
Device MQTT connection
Dear all,
In chapter Three Steps To IoT section 2 - Connect, i saw this quote "Connect any device via REST API, WebSockets or MQTT" but after the installation of standalone platform i can't see default mqtt port open (usually 1883) and in documentation i cannot find any tips on how to publish values gathered on the field through MQTT.
Can you please explain me how to fulfill this requirement?
Best regards
Stefano
Posted by Stefano Biscaldi over 4 years ago