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

internal server error on api usage #187

Open
celevra opened this issue Dec 9, 2024 · 0 comments
Open

internal server error on api usage #187

celevra opened this issue Dec 9, 2024 · 0 comments

Comments

@celevra
Copy link

celevra commented Dec 9, 2024

Hi,

thank you for that great piece of software!
we are using the api and only the endpoint /v8/messages/analyze and send a raw message, the call looks like this:

    const options = {
        url: 'http://100.64.0.80:3000/v0/messages/analyze',
        headers: {
            'Authorization': 'Bearer xxx'
        },
        method: 'POST',
        json: {
            "raw_message": msg,
            "run_active_detection_rules": true
        }
    };

often we are receiving "internal server errors"
The Docker logs look like this:

sublime_dashboard              | [2024-12-09T09:43:09.101Z] "POST" http://c899105e99b8/v0/messages/analyze - 200 {"userAgent":null,"referrer":"about:client"}
sublime_hydra                  | {"http": {"url": "http://sublime_hydra:8200/hydra/cpu/nlu?model_type=distilbert", "status_code": 200, "method": "POST", "request_id": "b2de993e7a114394ad9d5373bee66822", "version": "1.1"}, "network": {"client": {"ip": "172.18.0.12", "port": 35668}}, "duration": 7207862, "request_id": "b2de993e7a114394ad9d5373bee66822", "logger": "api.access", "level": "info", "dd.trace_id": "0", "dd.span_id": "0", "timestamp": "2024-12-09T09:43:09.193605Z", "message": "172.18.0.12:35668 - \"POST /hydra/cpu/nlu?model_type=distilbert HTTP/1.1\" 200"}
sublime_hydra                  | 172.18.0.12:35668 - "POST /hydra/cpu/nlu?model_type=distilbert HTTP/1.1" 200
sublime_screenshot_service     | info: Beginning attempt to screenshot with cluster.
sublime_screenshot_service     | info: Configured viewport & other props. Will set content (length: 16026)
sublime_screenshot_service     | info: Set page content in 49ms
sublime_hydra                  | {"http": {"url": "http://sublime_hydra:8200/hydra/cpu/url_model", "status_code": 200, "method": "POST", "request_id": "3623c42ce2f6473ca2a32d3db2507d8f", "version": "1.1"}, "network": {"client": {"ip": "172.18.0.12", "port": 35674}}, "duration": 262478477, "request_id": "3623c42ce2f6473ca2a32d3db2507d8f", "logger": "api.access", "level": "info", "dd.trace_id": "0", "dd.span_id": "0", "timestamp": "2024-12-09T09:43:09.662440Z", "message": "172.18.0.12:35674 - \"POST /hydra/cpu/url_model HTTP/1.1\" 200"}
sublime_hydra                  | 172.18.0.12:35674 - "POST /hydra/cpu/url_model HTTP/1.1" 200
sublime_screenshot_service     | info: Screenshot of size 205869 bytes took 217ms
sublime_hydra                  | {"http": {"url": "http://sublime_hydra:8200/hydra/cpu/url_model", "status_code": 200, "method": "POST", "request_id": "bbcb13cb1f5e4312b1e3bb5e85c4f8d9", "version": "1.1"}, "network": {"client": {"ip": "172.18.0.12", "port": 35668}}, "duration": 346472886, "request_id": "bbcb13cb1f5e4312b1e3bb5e85c4f8d9", "logger": "api.access", "level": "info", "dd.trace_id": "0", "dd.span_id": "0", "timestamp": "2024-12-09T09:43:09.745189Z", "message": "172.18.0.12:35668 - \"POST /hydra/cpu/url_model HTTP/1.1\" 200"}
sublime_hydra                  | 172.18.0.12:35668 - "POST /hydra/cpu/url_model HTTP/1.1" 200
sublime_hydra                  | {"http": {"url": "http://sublime_hydra:8200/hydra/cpu/url_model", "status_code": 200, "method": "POST", "request_id": "a2aa64bb9c4d4b2aa682e920b23cfb68", "version": "1.1"}, "network": {"client": {"ip": "172.18.0.12", "port": 35686}}, "duration": 348317542, "request_id": "a2aa64bb9c4d4b2aa682e920b23cfb68", "logger": "api.access", "level": "info", "dd.trace_id": "0", "dd.span_id": "0", "timestamp": "2024-12-09T09:43:09.754620Z", "message": "172.18.0.12:35686 - \"POST /hydra/cpu/url_model HTTP/1.1\" 200"}
sublime_hydra                  | 172.18.0.12:35686 - "POST /hydra/cpu/url_model HTTP/1.1" 200
sublime_mantis                 | 2024-12-09T09:43:14Z ERROR cache_util/cache_func.go:353 unexpected error for ReturnedError : runner failed: failed to expand redirect: Head "https://webmail.dgvt-muenchen.de": net/http: request canceled (Client.Timeout exceeded while awaiting headers)
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/cache_util.(*cachingState).warn
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/cache_util/cache_func.go:353
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/cache_util.CachingFunctionWithError[...]
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/cache_util/cache_func.go:277
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/org_dsl.LinkAnalysisFunction.tryFollowSingleRedirectWithHEAD
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/org_dsl/link_analysis.go:310
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/org_dsl.LinkAnalysisFunction.FullLinkAnalysisFlow
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/org_dsl/link_analysis.go:649
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/org_dsl.(*LinkAnalysisFunction).Callback.LinkAnalysisFunction.Callback.func1
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/org_dsl/link_analysis.go:594
sublime_mantis                 | reflect.Value.call
sublime_mantis                 |        reflect/value.go:596
sublime_mantis                 | reflect.Value.Call
sublime_mantis                 |        reflect/value.go:380
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/bindings.(*ffiCaller).Call
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/bindings/functions.go:44
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).callAndRecover
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/ffi.go:21
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).callExternalFunctionAsync
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/ffi.go:84
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).dispatch
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/evaluate.go:304
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).call
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/evaluate.go:79
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).callWithItem
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/evaluate.go:57
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).loopArrayParallel.func1
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/array_functions.go:149
sublime_hydra                  | {"http": {"url": "http://sublime_hydra:8200/hydra/gpu/logo_detect?is_screenshot=false&is_message_screenshot=true&is_attachment=false", "status_code": 200, "method": "POST", "request_id": "0b2df5e23a9843dd86099c3c79efc986", "version": "1.1"}, "network": {"client": {"ip": "172.18.0.12", "port": 35674}}, "duration": 7179358717, "request_id": "0b2df5e23a9843dd86099c3c79efc986", "logger": "api.access", "level": "info", "dd.trace_id": "0", "dd.span_id": "0", "timestamp": "2024-12-09T09:43:16.874106Z", "message": "172.18.0.12:35674 - \"POST /hydra/gpu/logo_detect?is_screenshot=false&is_message_screenshot=true&is_attachment=false HTTP/1.1\" 200"}
sublime_hydra                  | 172.18.0.12:35674 - "POST /hydra/gpu/logo_detect?is_screenshot=false&is_message_screenshot=true&is_attachment=false HTTP/1.1" 200
sublime_screenshot_service     | info: Timeout waiting for page setup after 15s, continuing anyway
sublime_dashboard              | Failed to proxy http://sublime_mantis:8000/v0/messages/analyze Error: socket hang up
sublime_dashboard              |     at Socket.socketCloseListener (node:_http_client:484:27)
sublime_dashboard              |     at Socket.emit (node:events:531:35)
sublime_dashboard              |     at TCP.<anonymous> (node:net:339:12)
sublime_dashboard              |     at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
sublime_dashboard              |   code: 'ECONNRESET'
sublime_dashboard              | }
sublime_dashboard              | Error: socket hang up
sublime_dashboard              |     at Socket.socketCloseListener (node:_http_client:484:27)
sublime_dashboard              |     at Socket.emit (node:events:531:35)
sublime_dashboard              |     at TCP.<anonymous> (node:net:339:12)
sublime_dashboard              |     at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
sublime_dashboard              |   code: 'ECONNRESET'
sublime_dashboard              | }
sublime_mantis                 | 2024-12-09T09:43:40Z ERROR cache_util/cache_func.go:353 unexpected error for ReturnedError : runner failed: request to LinkAnalysis returned status code 500 and body error {"error":{"type":"internal_server_error","message":"Something went wrong. If the problem persists, please contact us at email_4a02ovils6k9rtsayotoiv"}}
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/cache_util.(*cachingState).warn
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/cache_util/cache_func.go:353
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/cache_util.CachingFunctionWithError[...]
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/cache_util/cache_func.go:277
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/cache_util.CachingFunction[...]
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/cache_util/cache_func.go:213
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/org_dsl.LinkAnalysisFunction.cachedLinkAnalysisRetrieveScreenshot
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/org_dsl/link_analysis.go:218
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/org_dsl.LinkAnalysisFunction.FullLinkAnalysisFlow
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/org_dsl/link_analysis.go:661
sublime_mantis                 | github.com/sublime-security/go-mantis/internal/services/org_dsl.(*LinkAnalysisFunction).Callback.LinkAnalysisFunction.Callback.func1
sublime_mantis                 |        github.com/sublime-security/go-mantis/internal/services/org_dsl/link_analysis.go:594
sublime_mantis                 | reflect.Value.call
sublime_mantis                 |        reflect/value.go:596
sublime_mantis                 | reflect.Value.Call
sublime_mantis                 |        reflect/value.go:380
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/bindings.(*ffiCaller).Call
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/bindings/functions.go:44
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).callAndRecover
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/ffi.go:21
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).callExternalFunctionAsync
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/ffi.go:84
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).dispatch
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/evaluate.go:304
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).call
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/evaluate.go:79
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).callWithItem
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/evaluate.go:57
sublime_mantis                 | github.com/sublime-security/go-mantis/lib/dsl/internal/vm.(*evaluationContext).loopArrayParallel.func1
sublime_mantis                 |        github.com/sublime-security/go-mantis/lib/dsl/internal/vm/array_functions.go:149
sublime_strelka_backend-1      | 2024-12-09 09:44:12 - [INFO] root [strelka-backend.work]: shutdown after scanning 1 file(s), syncing 0 yara files, and 901.5188138484955 second(s)
sublime_strelka_backend-1      | 2024-12-09 09:44:13 - [INFO] root [strelka-backend.main]: using backend configuration /etc/strelka/backend.yaml
sublime_strelka_backend-1      | 2024-12-09 09:44:13 - [DEBUG] root [strelka-backend.main]: verified coordinator is up
sublime_strelka_backend-1      | 2024-12-09 09:44:13 - [INFO] root [strelka-backend.__init__]: found scanners as string /strelka/config/scanners.yaml
sublime_strelka_backend-1      | 2024-12-09 09:44:13 - [INFO] root [strelka-backend.work]: starting up
sublime_dashboard              | [2024-12-09T09:45:35.852Z] "POST" http://c899105e99b8/v0/messages/analyze - 200 {"userAgent":null,"referrer":"about:client"}

is there anything more that i can provide to dig deeper in this issue?

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