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

[AGE-1494] [Bug] When I open the web, a Network Error occurs. #2403

Open
snip2D opened this issue Jan 3, 2025 · 6 comments
Open

[AGE-1494] [Bug] When I open the web, a Network Error occurs. #2403

snip2D opened this issue Jan 3, 2025 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation linear Created by Linear-GitHub Sync

Comments

@snip2D
Copy link

snip2D commented Jan 3, 2025

Describe the bug
When I open the web, a Network Error occurs.

docker logs :
agenta-celery_worker-1:
[2025-01-03 07:24:35,502: WARNING/MainProcess] Please run celery upgrade settings path/to/settings.py` to avoid these warnings and to allow a smoother upgrade to Celery 6.0.
[2025-01-03 07:24:35,665: WARNING/MainProcess] /usr/local/lib/python3.9/site-packages/celery/worker/consumer/consumer.py:508: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
warnings.warn(

[2025-01-03 07:24:35,668: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbitmq:5672//: [Errno 111] Connection refused.
Trying again in 2.00 seconds... (1/100)

[2025-01-03 07:24:37,670: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbitmq:5672//: [Errno 111] Connection refused.
Trying again in 4.00 seconds... (2/100)

[2025-01-03 07:24:41,676: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbitmq:5672//: [Errno 111] Connection refused.
Trying again in 6.00 seconds... (3/100)

[2025-01-03 07:24:47,686: INFO/MainProcess] Connected to amqp://guest:**@rabbitmq:5672//
[2025-01-03 07:24:47,688: WARNING/MainProcess] /usr/local/lib/python3.9/site-packages/celery/worker/consumer/consumer.py:508: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
warnings.warn(

[2025-01-03 07:24:47,691: INFO/MainProcess] mingle: searching for neighbors
[2025-01-03 07:24:48,717: INFO/MainProcess] mingle: all alone
[2025-01-03 07:24:48,740: INFO/MainProcess] celery@faf71f6d66a7 ready.`

agenta-agenta-web-1:
Warning: [JSS] Rule is not linked. Missing sheet option "link: true". GET /apps 200 in 26ms Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes. at ProfileContextProvider (webpack-internal:///./src/contexts/profile.context.tsx:39:35) at MotionWrapper (webpack-internal:///./node_modules/antd/es/config-provider/MotionWrapper.js:14:13) at ProviderChildren (webpack-internal:///./node_modules/antd/es/config-provider/index.js:148:13) at ConfigProvider (webpack-internal:///./node_modules/antd/es/config-provider/index.js:370:56) at ThemeContextProvider (webpack-internal:///./src/components/Layout/ThemeContextProvider.tsx:42:33) at PostHogProvider (/app/node_modules/posthog-js/react/dist/umd/index.js:15:27) at main at App (webpack-internal:///./src/pages/_app.tsx:53:16) at StyleRegistry (/app/node_modules/styled-jsx/dist/index/index.js:449:36) at eU (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:8:20489) at eH (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:1788) at eJ (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:3091) at div at e9 (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:26:761) Warning: useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hydrated UI and the intended UI. To avoid this, useLayoutEffect should only be used in components that render exclusively on the client. See https://reactjs.org/link/uselayouteffect-ssr for common fixes. at ProfileContextProvider (webpack-internal:///./src/contexts/profile.context.tsx:39:35) at MotionWrapper (webpack-internal:///./node_modules/antd/es/config-provider/MotionWrapper.js:14:13) at ProviderChildren (webpack-internal:///./node_modules/antd/es/config-provider/index.js:148:13) at ConfigProvider (webpack-internal:///./node_modules/antd/es/config-provider/index.js:370:56) at ThemeContextProvider (webpack-internal:///./src/components/Layout/ThemeContextProvider.tsx:42:33) at PostHogProvider (/app/node_modules/posthog-js/react/dist/umd/index.js:15:27) at main at App (webpack-internal:///./src/pages/_app.tsx:53:16) at StyleRegistry (/app/node_modules/styled-jsx/dist/index/index.js:449:36) at eU (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:8:20489) at eH (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:1788) at eJ (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:17:3091) at div at e9 (/app/node_modules/next/dist/compiled/next-server/pages.runtime.dev.js:26:761) Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true". Warning: [JSS] Rule is not linked. Missing sheet option "link: true".

agenta-reverse-proxy-1:
time="2025-01-02T05:50:28Z" level=info msg="Configuration loaded from flags." time="2025-01-02T05:51:43Z" level=error msg="accept tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-02T05:51:43Z" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-02T05:51:43Z" level=error msg="close tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-02T05:51:43Z" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-02T05:59:39Z" level=info msg="Configuration loaded from flags." time="2025-01-03T03:53:43Z" level=error msg="accept tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-03T03:53:43Z" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-03T03:53:43Z" level=error msg="close tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-03T03:53:43Z" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-03T03:56:55Z" level=info msg="Configuration loaded from flags." time="2025-01-03T07:10:06Z" level=error msg="accept tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-03T07:10:06Z" level=error msg="close tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-03T07:10:06Z" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-03T07:10:06Z" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-03T07:12:13Z" level=info msg="Configuration loaded from flags." time="2025-01-03T07:23:54Z" level=error msg="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-03T07:23:54Z" level=error msg="accept tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-03T07:23:54Z" level=error msg="close tcp [::]:90: use of closed network connection" entryPointName=web time="2025-01-03T07:23:54Z" level=error msg="close tcp [::]:8080: use of closed network connection" entryPointName=traefik time="2025-01-03T07:24:30Z" level=info msg="Configuration loaded from flags."

agenta-rabbitmq-1:
2025-01-03 07:24:47.686636+00:00 [info] <0.752.0> connection <0.752.0> (172.18.0.7:55736 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/' 2025-01-03 07:24:47.689404+00:00 [info] <0.761.0> accepting AMQP connection <0.761.0> (172.18.0.7:55748 -> 172.18.0.2:5672) 2025-01-03 07:24:47.691090+00:00 [info] <0.761.0> connection <0.761.0> (172.18.0.7:55748 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/' 2025-01-03 07:24:47.695165+00:00 [warning] <0.768.0> Deprecated features: transient_nonexcl_queues: Feature transient_nonexcl_queuesis deprecated. 2025-01-03 07:24:47.695165+00:00 [warning] <0.768.0> By default, this feature can still be used for now. 2025-01-03 07:24:47.695165+00:00 [warning] <0.768.0> Its use will not be permitted by default in a future minor RabbitMQ version and the feature will be removed from a future major RabbitMQ version; actual versions to be determined. 2025-01-03 07:24:47.695165+00:00 [warning] <0.768.0> To continue using this feature when it is not permitted by default, set the following parameter in your configuration: 2025-01-03 07:24:47.695165+00:00 [warning] <0.768.0> "deprecated_features.permit.transient_nonexcl_queues = true" 2025-01-03 07:24:47.695165+00:00 [warning] <0.768.0> To test RabbitMQ as if the feature was removed, set this in your configuration: 2025-01-03 07:24:47.695165+00:00 [warning] <0.768.0> "deprecated_features.permit.transient_nonexcl_queues = false" 2025-01-03 07:24:47.702501+00:00 [info] <0.779.0> accepting AMQP connection <0.779.0> (172.18.0.7:55764 -> 172.18.0.2:5672) 2025-01-03 07:24:47.704456+00:00 [info] <0.779.0> connection <0.779.0> (172.18.0.7:55764 -> 172.18.0.2:5672): user 'guest' authenticated and granted access to vhost '/' 2025-01-03 07:24:48.728253+00:00 [warning] <0.768.0> Deprecated features:global_qos: Feature global_qos is deprecated. 2025-01-03 07:24:48.728253+00:00 [warning] <0.768.0> By default, this feature can still be used for now. 2025-01-03 07:24:48.728253+00:00 [warning] <0.768.0> Its use will not be permitted by default in a future minor RabbitMQ version and the feature will be removed from a future major RabbitMQ version; actual versions to be determined. 2025-01-03 07:24:48.728253+00:00 [warning] <0.768.0> To continue using this feature when it is not permitted by default, set the following parameter in your configuration: 2025-01-03 07:24:48.728253+00:00 [warning] <0.768.0> "deprecated_features.permit.global_qos = true" 2025-01-03 07:24:48.728253+00:00 [warning] <0.768.0> To test RabbitMQ as if the feature was removed, set this in your configuration: 2025-01-03 07:24:48.728253+00:00 [warning] <0.768.0> "deprecated_features.permit.global_qos = false" 2025-01-03 08:05:14.776414+00:00 [info] <0.964.0> accepting AMQP connection <0.964.0> (172.18.0.1:60240 -> 172.18.0.2:5672) 2025-01-03 08:05:16.968584+00:00 [error] <0.964.0> closing AMQP connection <0.964.0> (172.18.0.1:60240 -> 172.18.0.2:5672): 2025-01-03 08:05:16.968584+00:00 [error] <0.964.0> {bad_header,<<255,244,255,253,6,13,10,255>>}

Screenshots
1735893033666

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Important Context
Add context about the problem here.

  1. Network Logs in the Browser:

    • If applicable, Take a screenshot of the network logs or copy and paste any relevant log entries.
  2. Docker Containers Information:

    • If applicable, Provide a screenshot showing the list of running and stopped containers.
    • Please provide us the with a screenshot of the logs for the agenta-backend docker container.
  3. Additional Information:

    • Include any additional details, error messages, or observations that may be helpful.

Please make sure to provide all the requested information to expedite the debugging process. Thank you for helping us improve our project!


AGE-1494

Copy link

dosubot bot commented Jan 3, 2025

I found a similar closed issue related to network errors and Docker compose builds, but no solution was found in the comments [1].

Regarding the network error you're experiencing, it seems to be related to the connection issues with RabbitMQ and the use of deprecated features in Celery. Here are some steps you can take to address these issues:

  1. Celery Deprecation Warnings:

    • Run celery upgrade settings path/to/settings.py to update your settings and avoid deprecation warnings.
    • Set broker_connection_retry_on_startup to True in your Celery configuration to retain the existing behavior for retrying connections on startup.
  2. RabbitMQ Connection Issues:

    • Ensure that the RabbitMQ service is running and accessible. The error [Errno 111] Connection refused indicates that the Celery worker is unable to connect to RabbitMQ. Check the RabbitMQ logs for any errors and ensure that the service is properly configured and running.
    • Verify that the network settings in your Docker Compose file allow the Celery worker to communicate with RabbitMQ. Both services should be on the same Docker network.
  3. useLayoutEffect Warning:

    • The warning about useLayoutEffect suggests that it is being used in a server-rendered context, which is not recommended. Ensure that useLayoutEffect is only used in components that render exclusively on the client side. You can refer to the React documentation for common fixes.
  4. JSS Warnings:

    • The JSS warnings indicate that some styles are not being linked correctly. Ensure that your JSS setup includes the link: true option in the sheet configuration to resolve these warnings.

By addressing these issues, you should be able to resolve the network error and improve the stability of your Agenta platform setup.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the bug Something isn't working label Jan 3, 2025
@mmabrouk
Copy link
Member

mmabrouk commented Jan 3, 2025

Hello @snip2D

Can you please:

  • Let us know whether you use the gh docker compose or used agenta in dev mode (i.e. which command did you use to start agenta)
  • Network Logs in the Browser:If applicable, Take a screenshot of the network logs or copy and paste any relevant log entries.
  • Docker Containers Information: If applicable, Provide a screenshot showing the list of running and stopped containers.
  • Please provide us the with a screenshot of the logs for the agenta-backend docker container.

Thank you!

p.s. Please make sure that the port 90 is open in your machine, and try using 91 for instance. That might resolve the problem

@mmabrouk mmabrouk added unconfirmed bug and removed bug Something isn't working labels Jan 3, 2025
@mmabrouk mmabrouk self-assigned this Jan 3, 2025
@snip2D
Copy link
Author

snip2D commented Jan 4, 2025

Hello @mmabrouk
Thank you very much for your reply. I will list more detailed information below.

Command:
export AGENTA_PORT=90; docker compose -f "docker-compose.yml" up -d --build

Logs:
agenta-backend-1
agenta-backend-1

agenta-celery_worker-1
agenta-celery_worker-1

agenta-agenta-web-1
agenta-agenta-web-1

agenta-reverse-proxy-1
agenta-reverse-proxy-1

agenta-pgadmin-1
agenta-pgadmin-1

agenta-postgres-1
agenta-postgres-1

agenta-redis-1
agenta-redis-1

agenta-rabbitmq-1
agenta-rabbitmq-1

journalctl -u docker
journalctl_-u_docker

Docker Containers Information:
docker_ps

The port 90 is open

@snip2D
Copy link
Author

snip2D commented Jan 4, 2025

I found Access-Control-Allow-Origin error in my browser
browser

@snip2D
Copy link
Author

snip2D commented Jan 5, 2025

Hello @mmabrouk I solved this problem by set the following environment variables
export DOMAIN_NAME="http://192.168.12.5"
export BARE_DOMAIN_NAME="192.168.12.5"
Thank you for help!

@mmabrouk
Copy link
Member

mmabrouk commented Jan 5, 2025

That is great to hear @snip2D !

I will keep this issue open until I update the documentation for self-hosting to make this clear and add this problem and its solution.

@mmabrouk mmabrouk added documentation Improvements or additions to documentation linear Created by Linear-GitHub Sync and removed unconfirmed bug labels Jan 5, 2025
@mmabrouk mmabrouk changed the title [Bug] When I open the web, a Network Error occurs. [AGE-1494] [Bug] When I open the web, a Network Error occurs. Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation linear Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

2 participants