Giter Site home page Giter Site logo

output module "http" failed about gogstash HOT 4 CLOSED

tsaikd avatar tsaikd commented on August 13, 2024
output module "http" failed

from gogstash.

Comments (4)

helgeolav avatar helgeolav commented on August 13, 2024

I am not sure why this happens. I will have to try recreate this error, it seems like the config is parsed the wrong way. If you remove the line "http_status_codes", will it work then? (You are using the default values, so they are not neded.) Or you can try remove 200 from the status codes.

from gogstash.

YangTao0 avatar YangTao0 commented on August 13, 2024

I try output config like this:
image

But,the log still outputs an error message:

2022/08/23 14:55:05 output.go:99 [error] output module "http" failed: "http://xxxxxxx/web_api/log_file_report" retryable error 200
2022/08/23 14:55:35 simplequeue.go:129 [error] queue: httpsendone "http://xxxxxxx/web_api/log_file_report" retryable error 200
2022/08/23 14:56:05 simplequeue.go:129 [error] queue: httpsendone "http://xxxxxxx/web_api/log_file_report" retryable error 200
2022/08/23 14:56:35 simplequeue.go:129 [error] queue: httpsendone "http://xxxxxxx/web_api/log_file_report" retryable error 200

from gogstash.

tsaikd avatar tsaikd commented on August 13, 2024

@helgeolav There is a bug in MapFromInts()

diff --git a/output/http/outputhttp.go b/output/http/outputhttp.go
index 91899ec..8a63bc3 100644
--- a/output/http/outputhttp.go
+++ b/output/http/outputhttp.go
@@ -154,7 +154,7 @@ func (t *OutputConfig) failedDelivery(ctx context.Context, event logevent.LogEve
 // MapFromInts returns a map containing all the ints in the array
 func MapFromInts(nums []int) map[int]struct{} {
        result := make(map[int]struct{}, len(nums))
-       for x := range nums {
+       for _, x := range nums {
                result[x] = struct{}{}
        }
        return result

from gogstash.

YangTao0 avatar YangTao0 commented on August 13, 2024

func MapFromInts(nums []int) map[int]struct{} {
result := make(map[int]struct{}, len(nums))
//for x := range nums {
for _, x := range nums {
result[x] = struct{}{}
}
return result
Build this code , log error Fixed,thanks.

from gogstash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.