Skip to content

Failure of database connection #17

@LeonardoBohnhoff

Description

@LeonardoBohnhoff

Hi

I compiled the application and started the container. The problem is that the application cannot connect to the databases.

For example, the command

curl http://127.0.0.1/customer/loader/load?numCustomers=10000

produces the error

Error 404: java.io.FileNotFoundException: SRVE0190E: File not found: /customer/loader/load

and applying the JMeter load produces errors of the following kind

1684509744060,2,QueryFlight,Non HTTP response code: org.apache.http.conn.HttpHostConnectException,Non HTTP response message: Connect to 127.0.0.1:80 [/127.0.0.1] failed: Connection refused,Thread Group 1-1,text,false,,2544,0,1,1,http://127.0.0.1//rest/api/flights/queryflights,0,0,1

As I am running the application on a remote server, I cannot load the database via a browser.

Thank you and regards


Additional information:

To make the compilation work with Java 19 , I had to add the following element to pom.xml.

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-war-plugin</artifactId>
   <version>3.3.2</version>
</plugin>

To be able to launch the container, I am using the following docker-compose.yml script.

version: '3'
services:
  acmeair-db:
    container_name: acmeair-db
    image: mongo
    networks:
      - my-net

  acmeair-monolithic-java:
    container_name: acmeair-monolithic-java
    networks:
      - my-net
    build: .
    ports:
      - "80:9080"
    environment:
      - MONGO_HOST=acmeair-db
    volumes_from:
      - acmeair-db
    mem_limit: 1024m

networks:
  my-net:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions