| | 488 | } |
|---|
| | 489 | } |
|---|
| | 490 | |
|---|
| | 491 | # Handle SOAP faults. |
|---|
| | 492 | # |
|---|
| | 493 | # When initially contacting the HoneyClient::Agent daemon running |
|---|
| | 494 | # inside the cloned VM, we suppress any "Connection refused" messages |
|---|
| | 495 | # we initially receive. If a new cloned VM is slow to respond, we |
|---|
| | 496 | # assume it's because the initial integrity check is still running |
|---|
| | 497 | # and the daemon isn't ready to accept commands from the |
|---|
| | 498 | # HoneyClient::Manager yet. |
|---|
| | 499 | sub _handleFault { |
|---|
| | 500 | |
|---|
| | 501 | # Extract arguments. |
|---|
| | 502 | my ($class, $res) = @_; |
|---|
| | 503 | |
|---|
| | 504 | # Construct error message. |
|---|
| | 505 | # Figure out if the error occurred in transport or over |
|---|
| | 506 | # on the other side. |
|---|
| | 507 | my $errMsg = $class->transport->status; # Assume transport error. |
|---|
| | 508 | |
|---|
| | 509 | if (ref $res) { |
|---|
| | 510 | $errMsg = $res->faultcode . ": ". $res->faultstring . "\n"; |
|---|
| | 511 | } |
|---|
| | 512 | |
|---|
| | 513 | if (($errMsg !~ /Connection refused/) && |
|---|
| | 514 | ($errMsg !~ /No route to host/)) { |
|---|
| | 515 | $LOG->warn("Error occurred during processing. " . $errMsg); |
|---|
| | 516 | Carp::carp __PACKAGE__ . "->_handleFault(): Error occurred during processing.\n" . $errMsg; |
|---|