crawlab-team / crawlab

Distributed web crawler admin platform for spiders management regardless of languages and frameworks. 分布式爬虫管理平台,支持任何语言和框架
https://www.crawlab.cn
BSD 3-Clause "New" or "Revised" License
11.39k stars 1.8k forks source link

Nodejs搜索不到依赖 #690

Closed Caaalabash closed 4 years ago

Caaalabash commented 4 years ago

Bug 描述

master日志

2020/04/16 18:12:49 error json: cannot unmarshal object into Go value of type []entity.Dependency
[GIN] 2020/04/16 - 18:12:49 | 500 |         3m21s |       127.0.0.1 | GET      /nodes/5e98190201c66c002ac5cd3c/deps?lang=node&dep_name=request
goroutine 69615 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/debug/stack.go:24 +0x9d
runtime/debug.PrintStack()
    /usr/local/go/src/runtime/debug/stack.go:16 +0x22
crawlab/services.GetNodejsDepList(0xc00046214b, 0x18, 0xc00046217c, 0x7, 0x7, 0xc00046214b, 0x18, 0x1, 0xc000082380)
    /go/src/app/services/system.go:362 +0x398
crawlab/routes.GetDepList(0xc000436370)
    /go/src/app/routes/system.go:37 +0x1e9
github.com/gin-gonic/gin.(*Context).Next(0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 +0x3a
crawlab/middlewares.AuthorizationMiddleware.func1(0xc000436370)
    /go/src/app/middlewares/auth.go:52 +0x200
github.com/gin-gonic/gin.(*Context).Next(0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 +0x3a
crawlab/middlewares.CORSMiddleware.func1(0xc000436370)
    /go/src/app/middlewares/cors.go:17 +0x3d3
github.com/gin-gonic/gin.(*Context).Next(0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 +0x3a
github.com/gin-gonic/gin.RecoveryWithWriter.func1(0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/recovery.go:83 +0x5a
github.com/gin-gonic/gin.(*Context).Next(0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 +0x3a
github.com/gin-gonic/gin.LoggerWithConfig.func1(0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/logger.go:240 +0xe1
github.com/gin-gonic/gin.(*Context).Next(0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/context.go:124 +0x3a
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0000b5e60, 0xc000436370)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:389 +0x5b2
github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0000b5e60, 0x1184020, 0xc0002fcfc0, 0xc00363dc00)
    /go/pkg/mod/github.com/gin-gonic/gin@v1.4.0/gin.go:351 +0x134
net/http.serverHandler.ServeHTTP(0xc0003ca000, 0x1184020, 0xc0002fcfc0, 0xc00363dc00)
    /usr/local/go/src/net/http/server.go:2774 +0xa8
net/http.(*conn).serve(0xc0000af860, 0x1187c20, 0xc000273100)
    /usr/local/go/src/net/http/server.go:1878 +0x851
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:2884 +0x2f4
[GIN] 2020/04/16 - 18:12:57 | 200 |    7.917871ms |       127.0.0.1 | GET      /nodes/5e98190201c66c002ac5cd3c/langs
[GIN] 2020/04/16 - 18:12:57 | 200 |   10.424452ms |       127.0.0.1 | GET      /nodes/5e98190401c66c002ac5cd3d/langs
Caaalabash commented 4 years ago

内网出现这个问题,以及使用163_news模版时出现 DNS lookup failed: no results for hostname lookup: news.163.com.

刚才用自己的云服务器起了一套... 一切正常