owasp-amass / amass

In-depth attack surface mapping and asset discovery
https://owasp.org/www-project-amass/
Other
11.51k stars 1.84k forks source link

panic: failed to connect to `host=localhost user=username database=database`: dial error (dial tcp [::1]:5432: connect: connection refused) #1022

Open iprincs opened 2 months ago

iprincs commented 2 months ago

->amass amass enum -config config.yaml panic: failed to connect to host=localhost user=username database=database: dial error (dial tcp [::1]:5432: connect: connection refused)

goroutine 1 [running]: github.com/owasp-amass/asset-db/repository.New(...) /build/amass-OqngEC/amass-4.2.0/build/pkg/mod/github.com/owasp-amass/asset-db@v0.3.3/repository/sql.go:39 github.com/owasp-amass/asset-db.New({0x131d024?, 0x4?}, {0xc004e986e0?, 0x47a658?}) /build/amass-OqngEC/amass-4.2.0/build/pkg/mod/github.com/owasp-amass/asset-db@v0.3.3/assetdb.go:20 +0xae github.com/caffix/netmap.NewGraph({0xc0004b2000?, 0x2d?}, {0xc004e986e0?, 0x5?}, {0x5?, 0xc0000b85e8?}) /build/amass-OqngEC/amass-4.2.0/build/pkg/mod/github.com/caffix/netmap@v0.2.5/graph.go:49 +0x134 github.com/owasp-amass/amass/v4/systems.(*LocalSystem).setupGraphDBs(0xc0003c0660, 0xc00049a000) /build/amass-OqngEC/amass-4.2.0/systems/local.go:227 +0x317 github.com/owasp-amass/amass/v4/systems.NewLocalSystem(0xc00049a000) /build/amass-OqngEC/amass-4.2.0/systems/local.go:86 +0x2bb main.runEnumCommand({0xc0000400a0?, 0xc000040090?, 0xc0001423c0?}) /build/amass-OqngEC/amass-4.2.0/cmd/amass/enum.go:167 +0x348 main.main() /build/amass-OqngEC/amass-4.2.0/cmd/amass/main.go:110 +0x2f2

-> amass amass -version
v4.2.0

config.yaml file --> scope: domains: # domain names to be in scope

datasourse.yaml file --> datasources:

this is the global options that will be considered. For example, minimum_ttl would be a global option used to compare

the minimum_ttl to the other datasources ttl.

global_options: minimum_ttl: 1440

navreet1425 commented 2 months ago

having same issue

naysec1 commented 1 month ago

@iprincs @navreet1425 In amass there is option to storing and analyzing attack surface discoveries using PostgreSQL, If you dont want to use that feature remove it from the config file, then amass will run smoothly