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

API: Fix Docker in the develop branch for API and Admin #3199

Closed
palisadoes opened this issue Feb 11, 2025 · 15 comments
Closed

API: Fix Docker in the develop branch for API and Admin #3199

palisadoes opened this issue Feb 11, 2025 · 15 comments
Assignees
Labels
bug Something isn't working no-issue-activity No issue activity

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Feb 11, 2025

This is for the Develop Branch

Describe the bug

  1. In the develop branch we cannot get the API docker instance to communicate with the Admin instance.
  2. We need the following:
    1. The API instance must only communicate on port 4000, not 80 or 443. It must be able to respond to queries from the Admin instance on port 4000
    2. The Admin instance must only communicate on port 4321, not 80 or 443. It must communicate with the API on port 4000
  3. The queries in the develop branch for logging in seem to be malfunctioning. You may need to eventually try with code from an older PR

To Reproduce
Steps to reproduce the behavior:

  1. Run the API as a docker instance
  2. Run Admin as a docker instance
  3. There is no communication

Expected behavior

  • It works

Actual behavior

It doesn't work. These are the symptoms

  1. When the nginx configuration is removed from the API docker files, we can communicate with it easily. This query succeeds:
    curl -X POST "http://HOSTNAME:4000/graphql" \
    -H "Content-Type: application/json" \
    -d '{"query": "{organizations {name}}"}'
    
  2. You can communicate with the Admin instance on 4321 without issue from an external machine
    telnet ADMIN-HOST 4321
    
  3. You can communicate with the API instance on 4321 without issue from an external machine
    telnet API-HOST 4321
    
  4. When Admin tries to communicate with the API we get:
    1. 404 errors
    2. No traffic between the API and Admin docker containers
  5. On the API
    1. No traffic between the API and Admin docker containers
    docker logs -f talawa-api-dev
    1. TCP dump on port 4000 doesn't show traffic
    tcpdump -n -X tcp port 4000
    1. On Admin
    1. Developer tools > network, shows traffic not being routed correctly

Screenshots

  • N/A

Additional details

Please collaborate as a team on these 2 issues

  1. API: Fix Docker in the develop branch for API and Admin #3199
  2. Admin: Fix Docker in the develop branch for API and Admin talawa-admin#3583

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

@VanshikaSabharwal
Copy link

please assign

@palisadoes palisadoes removed the unapproved Unapproved for Pull Request label Feb 11, 2025
@prayanshchh
Copy link
Contributor

prayanshchh commented Feb 11, 2025

I can work on this with @VanshikaSabharwal, if u want I can unassign from my existing issues as they aren't high priority

@CHIRANTH-24
Copy link

@palisadoes I would also like to work on this with @VanshikaSabharwal and @prayanshchh .

If you could verify my other issue and unassign me

@VanshikaSabharwal
Copy link

Yes @prayanshchh @CHIRANTH-24 we can connect on slack. I am working on the issue.

@prayanshchh
Copy link
Contributor

Yes @prayanshchh @CHIRANTH-24 we can connect on slack. I am working on the issue.

i have slacked you the problems in docker for admin

@harshdev2909
Copy link

Hi @palisadoes @VanshikaSabharwal , I'd like to work on this issue and investigate further. I will start by examining the Docker networking setup and the interaction between the API and Admin instances, particularly focusing on the port configuration (4000 for the API and 4321 for Admin) and the Nginx setup. I'll also check for potential issues with the current login queries in the develop branch and look into any relevant changes from older PRs that may resolve the malfunctioning behavior.

Please assign me to this issue when possible. Thank you!

@CHIRANTH-24
Copy link

Hi @prayanshchh and @harshdev2909
Are you able to run both the containers?

@VanshikaSabharwal
Copy link

@harshdev2909 if you are successful then you will be assigned but right now i am already working on it. It's not as easy as it looks

@prayanshchh
Copy link
Contributor

Hi @prayanshchh and @harshdev2909 Are you able to run both the containers?

api is working as exepected, admin isn't

@CHIRANTH-24
Copy link

Hi @prayanshchh and @harshdev2909 Are you able to run both the containers?

api is working as exepected, admin isn't

Not able to access the admin portal at 4321?

@prayanshchh
Copy link
Contributor

Hi @prayanshchh and @harshdev2909 Are you able to run both the containers?

api is working as exepected, admin isn't

Not able to access the admin portal at 4321?

Image

this is what I get, this is what the issue is about

@CHIRANTH-24
Copy link

Hi @prayanshchh and @harshdev2909 Are you able to run both the containers?

api is working as exepected, admin isn't

Not able to access the admin portal at 4321?

Image

this is what I get, this is what the issue is about

Yes
If we clear the localstorage we will be able to see the login screen

But the api port is not able to communicate with the admin

@palisadoes
Copy link
Contributor Author

@VanshikaSabharwal There has been significant progress. This issue may have to be closed.

Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Feb 24, 2025
@palisadoes
Copy link
Contributor Author

Closing. This works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity No issue activity
Projects
None yet
Development

No branches or pull requests

5 participants