FAQ
Here is the info I have about this error.

I am using Windows Server 2008 R2 in VMware ESXi.

here is the main code part.

const listenAddr = "0.0.0.0:80 <http://0.0.0.0/>"
...
http.HandleFunc("/", logPanics(handler))

err := http.ListenAndServe(listenAddr, nil)
if err != nil {
log.Printf("ListenAndServe: %s", err)
panic(err)
}

func logPanics(function HandleFnc) HandleFnc {
return func(writer http.ResponseWriter, request *http.Request) {
defer func() {
if x := recover(); x != nil {
log.Printf("[%v] caught panic: %v", request.RemoteAddr, x)
}
}()
function(writer, request)
}
}

but got this message:
//2012/12/07 08:06:39 ListenAndServe: AcceptEx tcp 0.0.0.0:80<http://0.0.0.0/>
: The specified network name is no longer available.
2012/12/09 22:35:20 ListenAndServe: AcceptEx tcp 0.0.0.0:80<http://0.0.0.0/>:
The specified netwo
rk name is no longer available.
panic: AcceptEx tcp 0.0.0.0:80 <http://0.0.0.0/>: The specified network
name is no longer availabl
e.

goroutine 1 [running]:
main.main()
c:/GoApp/webServer.go:243 +0x84b

goroutine 2 [syscall]:
created by runtime.main

C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/runti
me/proc.c:221

goroutine 7 [select]:
net.(*ioSrv).ProcessRemoteIO(0xf840068970, 0x0)

C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/net/f
d_windows.go:138 +0x1b5
created by net.startServer

C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/net/f
d_windows.go:216 +0x1ab

goroutine 6 [syscall]:
syscall.Syscall6(0x76fda4d0, 0x5, 0xa0, 0xf8400bf440, 0xf84006f328, ...)

C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/runti
me/zsyscall_windows_amd64.c:97 +0x55
syscall.GetQueuedCompletionStatus(0xa0, 0xf8400bf440, 0xf84006f328,
0xf84006f320
, 0xffffffff, ...)

C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/sysca
ll/zsyscall_windows_amd64.go:500 +0x9e
net.(*resultSrv).Run(0xf84006f240, 0x0)

C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/net/f
d_windows.go:107 +0x97
created by net.startServer

C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/net/f
d_windows.go:211 +0x12b
On Thursday, January 3, 2013 10:11:35 AM UTC-8, Daniel Theophanes wrote:

I run network servers on both Linux and Windows (on Windows Server 2008
VM) and they both work fine. If you are on 1.0.3, I might suggest compiling
from tip as there has been some Windows network improvements. More then
anything, you shouldn't panic or die on errors, just log them. Does your
entire http server stop accepting incoming connections?

-Daniel

On Thursday, January 3, 2013 8:19:40 AM UTC-8, Constantine Vasil wrote:

I am using Go as a web server. Tested for a month
under Windows Server 2008 Virtual Machine but it runs for a day
and then stops with a message: "The specified network name
is no longer available".

There are other consideration to not use Windows Server too.

This leads to decision to use Linux. What Linux distribution
is recommended for Golang web server?
--

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2022 Grokbase