panic #15
Owner
```
INFO[2021-03-22 16:22:41] Downstream request
Version number: 2.0 Operation Id: GetJobs Request Id: 7
OperationAttributes
attributes-charset:utf-8 (charsetValueTag)
attributes-natural-language:en (naturalLanguagageValueTag)
printer-uri:ipp://brn30055cb5e3ae.local:631/ipp/print (uriValueTag)
requesting-user-name:chronos (nameWithoutLanguagageValueTag)
requested-attributes : job-id job-impressions-completed job-media-sheets-completed job-name job-originating-user-name job-state job-state-reasons (keywordValueTag)
PrinterAttributes
JobAttributes
Unsupported
Post "http://brn30055cb5e3ae.local:631/ipp/print": dial tcp: lookup brn30055cb5e3ae.local: no such hostPost "http://brn30055cb5e3ae.local:631/ipp/print": dial tcp: lookup brn30055cb5e3ae.local: no such host2021/03/22 16:22:46 http: panic serving 192.168.0.109:45712: runtime error: invalid memory address or nil pointer dereference
goroutine 72 [running]:
net/http.(*conn).serve.func1(0xc0000ab180)
/usr/local/go/src/net/http/server.go:1824 +0x153
panic(0x6ed7a0, 0x938150)
/usr/local/go/src/runtime/panic.go:971 +0x499
main.handleGetJobs(0xc0001b87a0, 0x7f3500000007, 0x74a38d)
/local/home/henrik/work/ippserver/proxy/handlegetjobs.go:33 +0x45a
main.handle(0x7ae280, 0xc00008eee0, 0xc0001aa900)
/local/home/henrik/work/ippserver/proxy/main.go:55 +0x390
net/http.HandlerFunc.ServeHTTP(0x75eaa0, 0x7ae280, 0xc00008eee0, 0xc0001aa900)
/usr/local/go/src/net/http/server.go:2069 +0x44
net/http.(*ServeMux).ServeHTTP(0x945260, 0x7ae280, 0xc00008eee0, 0xc0001aa900)
/usr/local/go/src/net/http/server.go:2448 +0x1ad
net/http.serverHandler.ServeHTTP(0xc000150000, 0x7ae280, 0xc00008eee0, 0xc0001aa900)
/usr/local/go/src/net/http/server.go:2887 +0xa3
net/http.(*conn).serve(0xc0000ab180, 0x7ae7c0, 0xc000091940)
/usr/local/go/src/net/http/server.go:1952 +0x8cd
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:3013 +0x39b
2021/03/22 16:22:46 http: panic serving 192.168.0.109:45710: runtime error: invalid memory address or nil pointer dereference
goroutine 66 [running]:
net/http.(*conn).serve.func1(0xc0000aafa0)
/usr/local/go/src/net/http/server.go:1824 +0x153
panic(0x6ed7a0, 0x938150)
/usr/local/go/src/runtime/panic.go:971 +0x499
main.handlePrintJob(0xc0001b82b0, 0x7f358286e898, 0xc0000d0b40, 0x7f3500000005, 0xc0000d0b40)
/local/home/henrik/work/ippserver/proxy/handleprintjob.go:45 +0x73d
main.handle(0x7ae280, 0xc00008ee00, 0xc0001aa400)
/local/home/henrik/work/ippserver/proxy/main.go:53 +0x348
net/http.HandlerFunc.ServeHTTP(0x75eaa0, 0x7ae280, 0xc00008ee00, 0xc0001aa400)
/usr/local/go/src/net/http/server.go:2069 +0x44
net/http.(*ServeMux).ServeHTTP(0x945260, 0x7ae280, 0xc00008ee00, 0xc0001aa400)
/usr/local/go/src/net/http/server.go:2448 +0x1ad
net/http.serverHandler.ServeHTTP(0xc000150000, 0x7ae280, 0xc00008ee00, 0xc0001aa400)
/usr/local/go/src/net/http/server.go:2887 +0xa3
net/http.(*conn).serve(0xc0000aafa0, 0x7ae7c0, 0xc000091240)
/usr/local/go/src/net/http/server.go:1952 +0x8cd
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:3013 +0x39b
INFO[2021-03-22 16:22:47] Upstream Request:
Version number: 2.0 Operation Id: GetPrinterAttributes Request Id: 6
OperationAttributes
attributes-charset:utf-8 (charsetValueTag)
attributes-natural-language:en-us (naturalLanguagageValueTag)
printer-uri:ipp://drpork.local:1234/ipp/print (uriValueTag)
requesting-user-name:chronos (nameWithoutLanguagageValueTag)
requested-attributes : compression-supported copies-supported cups-version document-format-supported job-password-encryption-supported marker-colors marker-high-levels marker-levels marker-low-levels marker-message marker-names marker-types media-col-supported multiple-document-handling-supported operations-supported print-color-mode-supported printer-alert printer-alert-description printer-is-accepting-jobs printer-mandatory-job-attributes printer-state printer-state-message printer-state-reasons (keywordValueTag)
PrinterAttributes
JobAttributes
Unsupported
INFO[2021-03-22 16:22:47] Upstream Response:
Version number: 1.1 Status code: 0 Request Id: 6
OperationAttributes
attributes-charset:utf-8 (charsetValueTag)
```
Avoid panic if printer is off or unreachable for some reason.
Avoid panic if printer is off or unreachable for some reason. #18
Avoid panic if printer is off or unreachable for some reason.
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?