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

Network timeout running in docker -> Caused by / in ATOMIC_SERVER_URL #566

Closed
joepio opened this issue Jan 24, 2023 · 4 comments
Closed

Comments

@joepio
Copy link
Member

joepio commented Jan 24, 2023

Using portainer.io, create a stack for joepmeneer/atomic-server using the following config:

version: '3.3'
services:
    atomic:
        container_name: atomic
        image: joepmeneer/atomic-server
        environment:
            - ATOMIC_DOMAIN=0.0.0.0
            - ATOMIC_SERVER_URL=http://0.0.0.0:9883/
            - ATOMIC_PORT_HTTPS=443
            - ATOMIC_PORT=9883
            - ATOMIC_CONFIG_DIR=/config
        ports:
            - '9883:9883'
        command: --initialize

Open http://0.0.0.0:9883, see

timeout

In the logs:

2023-01-24T08:57:56.122710Z  WARN handle_subscribe: atomic_server::commit_monitor: can't subscribe to external resource to=http://0.0.0.0:9883 agent=https://atomicdata.dev/agents/publicAgent
2023-01-24T08:57:56.149471Z  WARN handle_subscribe: atomic_server::commit_monitor: can't subscribe to external resource to=http://0.0.0.0:9883 agent=https://atomicdata.dev/agents/publicAgent
2023-01-24T08:58:26.100669Z  INFO HTTP request: atomic_server::errors: Error response: Error when fetching http://192.168.121.34:9883 : http://192.168.121.34:9883/: Connection Failed: Connect error: connection timed out http.method=GET http.route=/{tail:.*} http.flavor=1.1 http.scheme=http http.host=0.0.0.0:9883 http.client_ip=::ffff:172.21.0.1 http.user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 http.target=/ otel.name=HTTP GET /{tail:.*} otel.kind="server" request_id=9758778e-559e-484e-882c-b878443c0195
2023-01-24T08:58:26.102682Z ERROR HTTP request: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: Error when fetching http://192.168.121.34:9883 : http://192.168.121.34:9883/: Connection Failed: Connect error: connection timed out http.method=GET http.route=/{tail:.*} http.flavor=1.1 http.scheme=http http.host=0.0.0.0:9883 http.client_ip=::ffff:172.21.0.1 http.user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 http.target=/ otel.name=HTTP GET /{tail:.*} otel.kind="server" request_id=9758778e-559e-484e-882c-b878443c0195 exception.message=Error when fetching http://192.168.121.34:9883 : http://192.168.121.34:9883/: Connection Failed: Connect error: connection timed out exception.details=Error when fetching http://192.168.121.34:9883 : http://192.168.121.34:9883/: Connection Failed: Connect error: connection timed out http.status_code=500 otel.status_code="ERROR"
2023-01-24T08:58:31.830234Z  WARN handle_subscribe: atomic_server::commit_monitor: can't subscribe to external resource to=http://0.0.0.0:9883/search?q=a&include=false&limit=30&parent=http%3A%2F%2F0.0.0.0%3A9883 agent=https://atomicdata.dev/agents/publicAgent
2023-01-24T08:58:31.882741Z  WARN handle_subscribe: atomic_server::commit_monitor: can't subscribe to external resource to=http://0.0.0.0:9883/search?q=aw&include=false&limit=30&parent=http%3A%2F%2F0.0.0.0%3A9883 agent=https://atomicdata.dev/agents/publicAgent
2023-01-24T08:58:32.000529Z  WARN handle_subscribe: atomic_server::commit_monitor: can't subscribe to external resource to=http://0.0.0.0:9883/search?q=awd&include=false&limit=30&parent=http%3A%2F%2F0.0.0.0%3A9883 agent=https://atomicdata.dev/agents/publicAgent
2023-01-24T08:58:33.950433Z  INFO HTTP request: atomic_server::errors: Error response: Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response http.method=GET http.route=/{tail:.*} http.flavor=1.1 http.scheme=http http.host=0.0.0.0:9883 http.client_ip=::ffff:172.21.0.1 http.user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 http.target=/search?q=aw&include=false&limit=30&parent=http%3A%2F%2F0.0.0.0%3A9883 otel.name=HTTP GET /{tail:.*} otel.kind="server" request_id=cb95ee50-7021-42fe-9d56-4830bd6c6adc
2023-01-24T08:58:33.950438Z  INFO HTTP request: atomic_server::errors: Error response: Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response http.method=GET http.route=/{tail:.*} http.flavor=1.1 http.scheme=http http.host=0.0.0.0:9883 http.client_ip=::ffff:172.21.0.1 http.user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 http.target=/search?q=a&include=false&limit=30&parent=http%3A%2F%2F0.0.0.0%3A9883 otel.name=HTTP GET /{tail:.*} otel.kind="server" request_id=92f1072f-2d90-477c-8860-274b6a26b5a8
2023-01-24T08:58:33.950899Z ERROR HTTP request: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response http.method=GET http.route=/{tail:.*} http.flavor=1.1 http.scheme=http http.host=0.0.0.0:9883 http.client_ip=::ffff:172.21.0.1 http.user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 http.target=/search?q=aw&include=false&limit=30&parent=http%3A%2F%2F0.0.0.0%3A9883 otel.name=HTTP GET /{tail:.*} otel.kind="server" request_id=cb95ee50-7021-42fe-9d56-4830bd6c6adc exception.message=Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response exception.details=Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response http.status_code=500 otel.status_code="ERROR"
2023-01-24T08:58:33.950906Z ERROR HTTP request: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response http.method=GET http.route=/{tail:.*} http.flavor=1.1 http.scheme=http http.host=0.0.0.0:9883 http.client_ip=::ffff:172.21.0.1 http.user_agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 http.target=/search?q=a&include=false&limit=30&parent=http%3A%2F%2F0.0.0.0%3A9883 otel.name=HTTP GET /{tail:.*} otel.kind="server" request_id=92f1072f-2d90-477c-8860-274b6a26b5a8 exception.message=Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response exception.details=Error when fetching http://0.0.0.0:9883 : http://0.0.0.0:9883/: Network Error: Network Error: Error encountered in the status line: timed out reading response http.status_code=500 otel.status_code="ERROR"

So there is something going on in the background sending requests to the drive..

@joepio
Copy link
Member Author

joepio commented Jan 24, 2023

Remove the trailing slash in ATOMIC_SERVER_URL=http://0.0.0.0:9883/ and it works!

So I think I should throw an error if this value is wrong

@joepio joepio changed the title Network timeout running in docker Network timeout running in docker -> Caused by / Jan 24, 2023
@joepio joepio changed the title Network timeout running in docker -> Caused by / Network timeout running in docker -> Caused by / in ATOMIC_SERVER_URL Jan 24, 2023
@joepio
Copy link
Member Author

joepio commented Jan 24, 2023

I've added an error notice to prevent this

@joepio joepio closed this as completed Jan 24, 2023
@jonassmedegaard
Copy link

Uhm, are you sure you don't want to instead parse the URI and just not act on the path component?

It is part of the RDF for http URIs (as I recall, too lazy to look it up now, but can if needed) to include a slash in normalized form - i.e. an URI pointing to the root of a http/https host can optionally omit the path part of the URI but when the URI is serialized in its normalized form the lack of path is transformed to the path "/".

@joepio
Copy link
Member Author

joepio commented Jan 27, 2023

@jonassmedegaard indeed, parsing the URL is better. In #505 the URL is indeed parsed, so that should also take care of this bug. Hope to merge that in the next months (big PR)

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

2 participants