Sean-Der / fail2rest

REST server for fail2ban
107 stars 24 forks source link

calling fail2web.localhost shows error #34

Open kyisoethin opened 5 years ago

kyisoethin commented 5 years ago

I have installed fail2rest as shown in http://siobud.com/blog/installing-fail2web . When I called fail2web, it ask for basic autherntication and show the page with an error as follow screenshot from 2019-03-01 22-29-45

Can you help me?

alexandreMesle commented 4 years ago

It seems @Sean-Der can't help you....

piaverous commented 4 years ago

Got the same issue, with the following error log on fail2rest side:

2020/09/06 21:30:27 http: panic serving 127.0.0.1:60526: interface conversion: interface {} is ogórek.Call, not string
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:2851 +0x290
Sep 06 21:30:27 raspberrypi fail2rest[6486]: created by net/http.(*Server).Serve
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:1847 +0x58c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.(*conn).serve(0xd0c600, 0x46ab70, 0xd14040)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:2741 +0x74
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.serverHandler.ServeHTTP(0xcc0200, 0x46a930, 0xd34360, 0xd20380)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:2361 +0x108
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.(*ServeMux).ServeHTTP(0x6a65d0, 0x46a930, 0xd34360, 0xd20380)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/gorilla/mux/mux.go:210 +0x94
Sep 06 21:30:27 raspberrypi fail2rest[6486]: github.com/gorilla/mux.(*Router).ServeHTTP(0xca23c0, 0x46a930, 0xd34360, 0xd20380)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:1964 +0x34
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.HandlerFunc.ServeHTTP(0xc76c78, 0x46a930, 0xd34360, 0xd20480)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2rest/jail.go:255 +0x34
Sep 06 21:30:27 raspberrypi fail2rest[6486]: main.jailHandler.func10(0x46a930, 0xd34360, 0xd20480)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2rest/jail.go:16 +0x5c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: main.jailGetHandler(0x46a930, 0xd34360, 0xd20480, 0xc76700)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2go/jail.go:24 +0x32c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: github.com/Sean-Der/fail2go.(*Conn).JailStatus(0xc76700, 0xd2a0ea, 0x4, 0x4, 0xd34a68, 0x2c06a0, 0x3, 0xc642bf, 0x2, 0x2, ..
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2go/utils.go:5 +0x124
Sep 06 21:30:27 raspberrypi fail2rest[6486]: github.com/Sean-Der/fail2go.interfaceSliceToStringSlice(0xd1e400, 0x2, 0x2, 0xd16238, 0x1, 0x1)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/runtime/panic.go:513 +0x194
Sep 06 21:30:27 raspberrypi fail2rest[6486]: panic(0x3cb3f0, 0xd14480)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:1746 +0x9c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.(*conn).serve.func1(0xd0c600)

Any idea about this ? @Sean-Der

Manuel1948 commented 2 years ago

Got the same issue, with the following error log on fail2rest side:

2020/09/06 21:30:27 http: panic serving 127.0.0.1:60526: interface conversion: interface {} is ogórek.Call, not string
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:2851 +0x290
Sep 06 21:30:27 raspberrypi fail2rest[6486]: created by net/http.(*Server).Serve
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:1847 +0x58c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.(*conn).serve(0xd0c600, 0x46ab70, 0xd14040)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:2741 +0x74
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.serverHandler.ServeHTTP(0xcc0200, 0x46a930, 0xd34360, 0xd20380)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:2361 +0x108
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.(*ServeMux).ServeHTTP(0x6a65d0, 0x46a930, 0xd34360, 0xd20380)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/gorilla/mux/mux.go:210 +0x94
Sep 06 21:30:27 raspberrypi fail2rest[6486]: github.com/gorilla/mux.(*Router).ServeHTTP(0xca23c0, 0x46a930, 0xd34360, 0xd20380)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:1964 +0x34
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.HandlerFunc.ServeHTTP(0xc76c78, 0x46a930, 0xd34360, 0xd20480)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2rest/jail.go:255 +0x34
Sep 06 21:30:27 raspberrypi fail2rest[6486]: main.jailHandler.func10(0x46a930, 0xd34360, 0xd20480)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2rest/jail.go:16 +0x5c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: main.jailGetHandler(0x46a930, 0xd34360, 0xd20480, 0xc76700)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2go/jail.go:24 +0x32c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: github.com/Sean-Der/fail2go.(*Conn).JailStatus(0xc76700, 0xd2a0ea, 0x4, 0x4, 0xd34a68, 0x2c06a0, 0x3, 0xc642bf, 0x2, 0x2, ..
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /home/pi/go/src/github.com/Sean-Der/fail2go/utils.go:5 +0x124
Sep 06 21:30:27 raspberrypi fail2rest[6486]: github.com/Sean-Der/fail2go.interfaceSliceToStringSlice(0xd1e400, 0x2, 0x2, 0xd16238, 0x1, 0x1)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/runtime/panic.go:513 +0x194
Sep 06 21:30:27 raspberrypi fail2rest[6486]: panic(0x3cb3f0, 0xd14480)
Sep 06 21:30:27 raspberrypi fail2rest[6486]:         /usr/lib/go-1.11/src/net/http/server.go:1746 +0x9c
Sep 06 21:30:27 raspberrypi fail2rest[6486]: net/http.(*conn).serve.func1(0xd0c600)

Any idea about this ? @Sean-Der

I also have the same problem...