edgexfoundry / device-camera-go

Owner: Device WG
Apache License 2.0
32 stars 38 forks source link

Error initializing ONVIF Client: Post http:///onvif/device_service: http: no Host in request URL #32

Open ai408 opened 4 years ago

ai408 commented 4 years ago

level=INFO ts=2020-04-28T06:59:11.498234233Z app=device-camera-go source=init.go:138 msg="Check Metadata service's status ..."

level=INFO ts=2020-04-28T06:59:11.498719066Z app=device-camera-go source=init.go:138 msg="Check Data service's status ..."

level=INFO ts=2020-04-28T06:59:11.710769357Z app=device-camera-go source=init.go:48 msg="Service clients initialize successful."

level=INFO ts=2020-04-28T06:59:11.72702627Z app=device-camera-go source=loader.go:248 msg="listen for config changes from Registry"

level=INFO ts=2020-04-28T06:59:11.757345468Z app=device-camera-go source=loader.go:272 msg="Writeable configuration has been updated. Setting log level to "

level=INFO ts=2020-04-28T06:59:11.758834022Z app=device-camera-go source=service.go:153 msg="Device Service device-camera-go exists"

level=INFO ts=2020-04-28T06:59:11.817552297Z app=device-camera-go source=service.go:96 msg="*Service Start() called, name=device-camera-go, version=1.0.0"

level=INFO ts=2020-04-28T06:59:11.819369505Z app=device-camera-go source=service.go:100 msg="Listening on port: 49985"

level=ERROR ts=2020-04-28T06:59:11.8351498Z app=device-camera-go source=onvifclient.go:43 msg="Error initializing ONVIF Client: Post http:///onvif/device_service: http: no Host in request URL"

level=INFO ts=2020-04-28T06:59:11.862214302Z app=device-camera-go source=service.go:127 msg="Service started in: 421.02488ms"

tobiasmo1 commented 4 years ago

What populates the "Pre-defined Devices" section in your res/configuration.toml?

ai408 commented 4 years ago

@tobiasmo1 firstly thanks for your quick reply. The configuration information is shown below. configuration.toml (Pre-defined Devices): [[DeviceList]] Name = "Camera001" Profile = "camera" Description = "My test camera" Location = "foo" [DeviceList.Protocols] [DeviceList.Protocols.HTTP] Address = "192.168.0.64"

configuration-driver.toml: [Camera] User = "admin" Password = "wang1234" AuthMethod = "basic"