FIWARE-TMForum / Business-API-Ecosystem

The FIWARE/TMForum Business API Ecosystem allows the monetization of different kind of assets (both digital and physical) during the whole service life cycle, from offering creation to its charging, accounting and revenue settlement and sharing
https://business-api-ecosystem.rtfd.io/
GNU Affero General Public License v3.0
39 stars 23 forks source link

Elasticsearch ERROR while deploying docker-compose file #61

Open Tnxent opened 3 years ago

Tnxent commented 3 years ago

Hello, i am trying to run the latest version of docker-compose.yml file in a VM with Ubuntu 20.04.2 LTS and i have two problems:

Problem 1: charging_1 | --2021-03-11 12:14:33-- http://apis.docker:8080/DSProductInventory charging_1 | Resolving apis.docker (apis.docker)... 172.22.0.8 charging_1 | Connecting to apis.docker (apis.docker)|172.22.0.8|:8080... connected. charging_1 | HTTP request sent, awaiting response... 404 Not Found charging_1 | 2021-03-11 12:14:33 ERROR 404: Not Found. charging_1 | charging_1 | Inventory API not ready retrying in 5 seconds... proxy_1 | --2021-03-11 12:14:34-- http://apis.docker:8080/DSProductInventory proxy_1 | Resolving apis.docker (apis.docker)... 172.22.0.8 proxy_1 | Connecting to apis.docker (apis.docker)|172.22.0.8|:8080... connected. proxy_1 | HTTP request sent, awaiting response... 404 Not Found proxy_1 | 2021-03-11 12:14:34 ERROR 404: Not Found. proxy_1 | proxy_1 | Glassfish APIs not deployed yet, retrying in 5 seconds...

repeats N times until

rss_1 | Application deployed with name DSRevenueSharing. rss_1 | Command deploy executed successfully. rss_1 | RSS deployed charging_1 | --2021-03-11 12:15:03-- http://apis.docker:8080/DSProductInventory charging_1 | Resolving apis.docker (apis.docker)... 172.22.0.8 charging_1 | Connecting to apis.docker (apis.docker)|172.22.0.8|:8080... connected. charging_1 | HTTP request sent, awaiting response... 301 Moved Permanently charging_1 | Location: http://apis.docker:8080/DSProductInventory/ [following] charging_1 | --2021-03-11 12:15:03-- http://apis.docker:8080/DSProductInventory/ charging_1 | Reusing existing connection to apis.docker:8080. proxy_1 | --2021-03-11 12:15:04-- http://apis.docker:8080/DSProductInventory proxy_1 | Resolving apis.docker (apis.docker)... 172.22.0.8 proxy_1 | Connecting to apis.docker (apis.docker)|172.22.0.8|:8080... connected. proxy_1 | HTTP request sent, awaiting response... 301 Moved Permanently proxy_1 | Location: http://apis.docker:8080/DSProductInventory/ [following] proxy_1 | --2021-03-11 12:15:04-- http://apis.docker:8080/DSProductInventory/ proxy_1 | Reusing existing connection to apis.docker:8080.

Do I need to add any files or anything for the path to work?

Problem 2: proxy_1 | Elasticsearch ERROR: 2021-03-11T12:15:07Z proxy_1 | Error: Request error, retrying proxy_1 | HEAD http://elastic.docker:9200/ => getaddrinfo ENOTFOUND elastic.docker elastic.docker:9200 proxy_1 | at Log.error (/business-ecosystem-logic-proxy/node_modules/elasticsearch/src/lib/log.js:239:56) proxy_1 | at checkRespForFailure (/business-ecosystem-logic-proxy/node_modules/elasticsearch/src/lib/transport.js:298:18) proxy_1 | at HttpConnector. (/business-ecosystem-logic-proxy/node_modules/elasticsearch/src/lib/connectors/http.js:171:7) proxy_1 | at ClientRequest.wrapper (/business-ecosystem-logic-proxy/node_modules/lodash/lodash.js:4929:19) proxy_1 | at emitOne (events.js:116:13) proxy_1 | at ClientRequest.emit (events.js:211:7) proxy_1 | at Socket.socketErrorListener (_http_client.js:387:9) proxy_1 | at emitOne (events.js:116:13) proxy_1 | at Socket.emit (events.js:211:7) proxy_1 | at emitErrorNT (internal/streams/destroy.js:66:8) proxy_1 | proxy_1 | Elasticsearch WARNING: 2021-03-11T12:15:07Z proxy_1 | Unable to revive connection: http://elastic.docker:9200/ proxy_1 | proxy_1 | Elasticsearch WARNING: 2021-03-11T12:15:07Z proxy_1 | No living connections elasticsearch

Can't reach the Elasticsearch container through http://elastic.docker:9200/.

fdelavega commented 3 years ago

What docker-compose file are you using? It seems that the different images miss the network configuration to use the aliases or that the different components miss the URL configuration to use other domain names

Tnxent commented 3 years ago

https://github.com/FIWARE-TMForum/Business-API-Ecosystem/blob/master/docker/compose/docker-compose.yml I am using this version, and I have tried several times resetting the operating system but it still doesn't work. Yes, it just like the DNS service is not working properly.

ammopt commented 3 years ago

@fdelavega I was able to solve this issue with the following commit: https://github.com/ammopt/Business-API-Ecosystem/commit/06ce82c57d8e6d1dd586e402677491d9009c0637

Please do take a look, thank you.