Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 11-03-2020 at 15:03
Please, ANSWER this question AT https://stackoverflow.com/questions/60638545/cant-have-multiple-fiware-orion-ld-docker-images-on-the-same-server
Question:
Can't have multiple fiware/orion-ld docker images on the same server
Description:
I am successfully running a fiware/orion-ld docker image on my server using this docker-compose.yml file:
version: "3.5"
services:
orion:
image: fiware/orion-ld
hostname: orion
container_name: fiware-orion
depends_on:
- mongo-db
expose: - "1026"
ports: - "1026:1026"
command: -dbhost mongo-db -logLevel DEBUG
healthcheck:
test: curl --fail -s http://orion:1026/version || exit 1
mongo-db:
image: mongo:3.6
hostname: mongo-db
container_name: db-mongo
expose:
- "27017"
ports: - "27017:27017"
command: --nojournal
volumes: - mongo-db:/data
volumes:
mongo-db: ~
On another directory I have created a second docker-compose.yml file in order to start a second fiware/orion-ld server in order to check if I can have multiple docker orion-ld images on the same server. This is my secondary docker-compose.yml file:
version: "3.5"
services:
orion:
image: fiware/orion-ld
hostname: orion-test
container_name: fiware-orion-test
depends_on:
- mongo-db
expose: - "1021"
ports: - "1021:1021"
command: -dbhost mongo-db -logLevel DEBUG
healthcheck:
test: curl --fail -s http://orion-test:1021/version || exit 1
mongo-db:
image: mongo:3.6
hostname: mongo-db
container_name: db-mongo-test
expose:
- "27011"
ports: - "27011:27011"
command: --nojournal
volumes: - mongo-db:/data
volumes:
mongo-db: ~
Although it starts, in the end I get this:
fiware-orion-test | time=Wednesday 11 Mar 14:34:09 2020.119Z | lvl=INFO | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionld.cpp[1108]:main | msg=Startup completed
fiware-orion-test | time=Wednesday 11 Mar 14:34:09 2020.119Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionld.cpp[1114]:main | msg=Initialization ready - accepting requests on port 1026
It seems that I can't have a second copy of fiware/orion-ld image running on another port (other than 1026). Is that so? Am I doing something wrong?
(using centOS 7)
2020-03-11 18:06|CREATED monitor | # answers= 0, accepted answer= False