Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure of database connection #17

Open
LeonardoBohnhoff opened this issue May 22, 2023 · 0 comments
Open

Failure of database connection #17

LeonardoBohnhoff opened this issue May 22, 2023 · 0 comments

Comments

@LeonardoBohnhoff
Copy link

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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant