Good Morning,
I'm currently unable to get any of the listeners working to display data in the Hygieia dashboard. Right now I'm just trying to get sonar results displayed. The sonar instance is up and running at localhost:9000 with scan results.
My compose file looks like the following:
mongodb:
image: mongo:latest
container_name: mongodb
command: mongod --smallfiles
ports:
- "27017:27017"
volumes:
- ./mongo:/var/lib/mongo/:rw
volume_driver: local
hygieia-api:
image: hygieia-api:latest
container_name: hygieia-api
ports:
- "8080:8080"
volumes:
- ./logs:/hygieia/logs
links:
- mongodb:mongo
hygieia-ui:
image: hygieia-ui:latest
container_name: hygieia-ui
ports:
- "8088:80"
links:
- hygieia-api
hygieia-sonar-codequality-collector:
image: hygieia-sonar-codequality-collector:latest
container_name: hygieia-sonar-codequality
volumes:
- ./logs:/hygieia/logs
links:
- mongodb:mongo
- hygieia-api
My override file:
hygieia-sonar-codequality-collector:
environment:
- SONAR_CRON=*/1 * * * *
- SONAR_URL=http://localhost:9000
- SONAR_API=http://localhost:9000/api/projects/index/
My application.properties file:
dbname=dashboard
dbhost=localhost
dbport=27017
dbusername=dashboarduser
dbpassword=dbpassword
sonar.cron=0 0/5 * * * *
sonar.servers[0]=http://localhost:9000
sonar.metrics=ncloc,line_coverage,violations,critical_violations,major_violations,blocker_violations,sqale_index,test_success_density,test_failrues,test_errors,tests
I've had the same issue with JIRA and Jenkins as well and have not been able to get any test results into the dashboard. Thank you for any help.
EDIT:
2017-03-08 17:34:32,007 ERROR c.c.d.collector.DefaultSonarClient - org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://0.0.0.0:9000/api/resources?format=json":Connect to 0.0.0.0:9000 [/0.0.0.0] failed: Connection refused (Connection refused); nested exception is org.apache.http.conn.HttpHostConnectException: Connect to 0.0.0.0:9000 [/0.0.0.0] failed: Connection refused (Connection refused)
This seems to be my issue, however I am able to connect to the above url successfully..
Fixed my issue by pointing to the ip address of the container instead of localhost.
Related
I am trying to get the ORION-Broker running with IoTA-LoRa. Unfortunately I get an Error-Message while trying to add a device to the Agent.
I use the following HowTo to use TheThingsNetwork: https://fiware-lorawan.readthedocs.io/en/latest/users_manual/index.html#the-things-network-ttn
Does anyone got it running? I always get the error:
Cannot read property 'findOne' of undefined.
Any Ideas of solving it?
Payload and Error-Message
Unfortunately a restart of IoTA does not work.
This is my Docker-compose file:
Unfortunately it is not working for me. Following I Post my Docker-compose file:
version: "3.1
services:
mongodb:
image: mongo:latest
hostname: mongo-db
container_name: db-mongo
ports:
- "27017:27017"
volumes:
- /mnt/docker/mongodb:/data
orion:
image: fiware/orion
hostname: orion
container_name: fiware-orion
depends_on:
- mongodb
expose:
- "1026"
ports:
- "1026:1026"
command: -dbhost mongodb
iot-agent:
image: ioeari/iotagent-lora
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongodb
expose:
- "4041"
ports:
- "4041:4041"
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4041"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongo-db"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-lorawan"
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
I try to add a Device like it is described in the FIWARE-HowTo in the above link.
The IoTA in general is running. The call: http://myhost:4041/iot/about works fine. But operating devices with it always fails.
And here is the full error message:
HTTP/1.1 500 Internal Server Error
X-Powered-By: Express
Fiware-Correlator: c430da57-9b39-4ef1-a7e7-f27f2e6b2113
Content-Type: application/json; charset=utf-8
Content-Length: 76
ETag: W/"4c-Mk5iR3/t76SWs53TC2DG+2Oquj0"
Date: Tue, 17 Sep 2019 08:14:03 GMT
Connection: close
{"name":"TypeError","message":"Cannot read property 'findOne' of undefined"}
The error message indicates a Mongo-DB problem, but I think this maybe Docker related, specifically an image versioning issue.
mongodb:
image: mongo:latest
orion:
image: fiware/orion
iot-agent:
image: ioeari/iotagent-lora
In each case you are explicitly or implicitly using the bleeding-edge latest Docker image, for example in the case of mongo-db this is currently mongo:4.2.0, maybe it was something else yesterday, maybe there is a breaking change since the LoRaWAN IoT Agent was last updated.
It would be better to fix to using the common set of builds used at the time of the FIWARE_7.7.1 release:
fiware/orion:2.2.0
mongo:3.6
fiware/iotagent-lorawan:1.2.3
And try again to see Mongo-DB is better behaved.
Note: It looks like version tags are missing on ioeari/iotagent-lora, but latest corresponds to bff2c15d which was release 1.2.1 which has not yet been duplicated in the FIWARE account. For certainty, it could be better to build your own from sources.
Second point - your "IOTA_MONGO_HOST=mongo-db" and Orion connection command command: -dbhost mongodb do not match try the following:
version: "3.1"
services:
iot-agent:
image: fiware/iotagent-lorawan:1.2.2
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongo-db
expose:
- "4041"
ports:
- "4041:4041"
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4041"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongo-db"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-lorawan"
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
mongo-db:
image: mongo:3.6
hostname: mongo-db
container_name: db-mongo
expose:
- "27017"
ports:
- "27017:27017"
command: --bind_ip_all --smallfiles
volumes:
- mongo-db:/data
orion:
image: fiware/orion
hostname: orion
container_name: fiware-orion
depends_on:
- mongo-db
expose:
- "1026"
ports:
- "1026:1026"
command: -dbhost mongo-db
volumes:
mongo-db: ~
One or other of your mongo-db connections is failing, this will cause mongoose to have a null pointer.
The error Cannot read property 'findOne' of undefined generally in FIWARE environment setup arises because of synchronization problem between IoT Agent and MongoDB.
In our case we also had this problem multiple times, the idea is to start the MongoDB first and then start IoT Agent, and if MongoDB is restarted, sometimes we have to restart the IoT Agent again after MongoDB.
I have 2 working containers for Hadoop HDFS (I have built a Dockerfile for them starting from the one here) and need to add a HIVE instance to the set.
I cannot find a good working image to use (it would be nice to have version 2.3.4).
Is there anything you suggest, easy to add, that I could use?
Thank you!
Edit:
Here is a try I did:
hive-server:
container_name: hive-server
image: bde2020/hive:2.3.2-postgresql-metastore
depends_on:
- hadoop-namenode
env_file:
- ./hive_build/hadoop-hive.env
environment:
HIVE_CORE_CONF_javax_jdo_option_ConnectionURL: "jdbc:postgresql://hive-metastore/metastore"
SERVICE_PRECONDITION: "hive-metastore:9083"
ports:
- "10000:10000"
restart: unless-stopped
hive-metastore:
container_name: hive-metastore
image: bde2020/hive:2.3.2-postgresql-metastore
depends_on:
- hive-server
- hive-metastore-postgresql
env_file:
- ./hive_build/hadoop-hive.env
command: /opt/hive/bin/hive --service metastore
environment:
SERVICE_PRECONDITION: "hadoop-namenode:50070 hadoop-datanode1:50075 hive-metastore-postgresql:5432"
ports:
- "9083:9083"
restart: unless-stopped
hive-metastore-postgresql:
container_name: hive-metastore-postgresql
image: bde2020/hive-metastore-postgresql:2.3.0
ports:
- "5433:5432"
restart: unless-stopped
but when I enter it and try to connect I get an error:
docker exec -it hive-server bash
/opt/hive/bin/beeline -u jdbc:hive2://localhost:10000
error:
19/05/03 09:13:46 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
I am using eureka container but unfortunately it is not working properly.
Docker-compose.yaml
configserver:
image: 1.2.3.4:1234/configserver
container_name: configserver
ports:
- 8888:8888
volumes:
- /tmp/logs:/tmp/logs
env_file:
- ./docker.env
eureka:
container_name: eureka
ports:
- 8761:8080
volumes:
- /tmp/logs:/tmp/logs
env_file:
- ./docker.env
image: netflixoss/eureka:1.3.1
restart: always
depends_on:
- configserver
Logs of Container-
WARN com.netflix.discovery.DiscoveryClient:1570 [localhost-startStop-1]
[makeRemoteCall] Can't get a response from localhost:8080/eureka/v2/apps
ERROR com.netflix.discovery.DiscoveryClient:1432 [localhost-startStop-1] [makeRemoteCall] Can't contact any eureka nodes - possibly a security group issue?
ERROR com.netflix.discovery.DiscoveryClient:1033 [localhost-startStop-1] [fetchRegistry] DiscoveryClient_EUREKA/4ae83dcdde1a - was unable to refresh its cache! status = java.net.SocketTimeoutException: Read timed out
I used different image. Instead of netflixoss/eureka:1.3.1 I use eureka. It works for me.
i have a simple spring cloud project,and it contains 4 services:
config:8888
registry(eureka):8761
gateway(zuul):8080
service-1:9527
enter image description here
the project has no problem if deployed in localhost,
i can successfully fetch service-1's api by zuul without docker:
http://localhost:8080/service-1/test
but when i deployed with docker,
it throws error: Caused by: java.lang.RuntimeException: org.apache.http.conn.HttpHostConnectException: Connect to registry:9527 [registry/172.21.0.4] failed: Connection refused (Connection refused)
i can only fetch with service-1's api
http://localhost:9527/test
PS: the two services(gateway,service-1) has been success registry to eureka
here is my docker-compose yml :
version: '3'
services:
config:
build: ./config
ports:
- "8888:8888"
registry:
build: ./registry
ports:
- "8761:8761"
depends_on:
- config
environment:
- SPRING_PROFILES_ACTIVE=prd
gateway:
build: ./gateway
depends_on:
- config
links:
- registry
- service-1
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=prd
service-1:
build: ./service-1
ports:
- "9527:9527"
depends_on:
- config
links:
- registry
environment:
- SPRING_PROFILES_ACTIVE=prd
can anyone help me?
i have solved this issue , i forgot add #EnableDiscoveryClient on gateway main class,and cover the eureka instance hostname
I am having error like on screenshot below:
I was searching a bit but suggestions are mainly about this solution here:
https://neo4j.com/developer/kb/explanation-of-error-websocket-connection-failure/
which doesnt work for me.
I am running this in docker and service definition is just this:
db:
container_name: neo4j
image: neo4j:3.2
ports:
- "7474:7474"
The web console error says just that "cannot establish connection to server ws://localhost:7474" .
The docker logs says that bolt has been enabled.
Any ideas how to fix that?
You need to map the bolt port 7687 as well
db:
container_name: neo4j
image: neo4j:3.2
ports:
- "7474:7474"
- "7687:7687"