Question : dial tcp 127.0.0.1:80: connect: connection refused
Answered by : muhammad-ishaq
//sometimes this error caused by an active VPN extension.
//Disable any such extension and try again. it will work
Source : | Last Update : Fri, 05 Aug 22
Question : dial tcp 127.0.0.1:8080: connect: connection refused
Answered by : you
package main
import ( "fmt" "net"
)
func main() { address := "127.0.0.1:8080" conn, err := net.Dial("tcp", address) if err != nil { fmt.Printf("Dial error: %v\n", err) return } defer conn.Close() // Handle successful connection here fmt.Println("Connected successfully.")
}
Source : | Last Update : Tue, 19 Sep 23