Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection reset by peer #15

Open
AdolarMezga opened this issue Jul 12, 2019 · 3 comments
Open

Connection reset by peer #15

AdolarMezga opened this issue Jul 12, 2019 · 3 comments

Comments

@AdolarMezga
Copy link

Works fine when VM migrate to other host, but quit the job when VM shutdown:

failed to get DomainBlockStats: Unable to read from monitor: Connection reset by peer

Its possible to mark domain as 'not running' or similar in line 208?

Regards

@zhangjianweibj
Copy link
Owner

thanks for your suggestion.I don't quite understand the issue you're asking.could your help us fix this issue or explana the problem more clear.

@AdolarMezga
Copy link
Author

I start, stop and migrate VMs via oVirt and scrape metrics via Prometheus. On hosts running few VMs and the prometheus-libvirt-exporter. For tests I compiled the exporter on another Linux machine, pushed it to the hosts and started the exporter in the command line.

If I start VM or migrate VM from one to another host everythings works fine. But if I stop one or more VMs via oVirt, the exporter crashes. Error message is:
failed to get DomainBlockStats: Unable to read from monitor: Connection reset by peer

I read some source code and found the line 203 respective 261. Thats go-libvirt functions. Maybe the isActive-flag of the domain is not the best indicator to avoid the DomainBlockStats-call. To use an unvalid domain.ID to indicate a stopped VM was not successful as well.

Regards

@zhangjianweibj
Copy link
Owner

very thanks.I understand what's causing the problem.after section "l.DomainIsActive" result is true,at this moment,vm is staill alive.when program goto "rRdReq, rRdBytes, rWrReq, rWrBytes, _, err = l.DomainBlockStats(*domain, disk.Target.Device)",vm is stoped.and caused error "connection reset by peer".i think if vm is migrated,libvirt return nil result with this domain is Reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants