Important

   

This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Commonly observed exceptions

This topic discusses the most common exceptions reported by TrueSight Network Automation, either in its log files, in a web page, or in an error reported to a web services client. An exception indicates an error state encountered in the processing, which might or might not require your attention. There are expected exceptions, which are handled by the software and usually require little to no attention, and unexpected exceptions, which fail to be handled by the software and usually require you to report the exception and its stack trace to BMC Customer Support for guidance.

Stack traces

For unexpected exceptions, the server or remote device agent log file contains a stack trace that identifies the precise line of code where the exception was detected. A stack trace is vital to BMC Customer Support in order to identify the cause of the exception and to fix the code such that the exception no longer occurs. When reporting an exception to BMC Customer Support, include the complete stack trace. A typical stack trace looks like the following. A header line provides the date and time, followed by the contents of the call stack.

Sep 1, 2016 3:02:04 PM com.bmc.bcan.agent.shared.imported.network.devices.comm.DeviceCommand$ResponseThread run
WARNING: [Thread=DeviceTaskThread-100.response(Snapshot-bcan-cisco2600-01)] throwable caught in response thread
java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2882)
        at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
        at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
        at java.lang.StringBuffer.append(StringBuffer.java:224)
        at java.util.regex.Matcher.appendReplacement(Matcher.java:748)
        at java.util.regex.Matcher.replaceAll(Matcher.java:813)
        at java.lang.String.replaceAll(String.java:2189)
        at com.bmc.bcan.agent.shared.imported.network.util.Interpreter.getCommandWithHiddenPhrase(Interpreter.java:401)
        at com.bmc.bcan.agent.shared.imported.network.util.TerminalInterpreter.receive(TerminalInterpreter.java:290)
        at com.bmc.bcan.agent.shared.imported.network.util.TerminalInterpreter.receiveBlocked(TerminalInterpreter.java:303)
        at com.bmc.bcan.agent.shared.imported.network.util.TerminalInterpreter.expect(TerminalInterpreter.java:151)
        at com.bmc.bcan.agent.shared.imported.network.devices.comm.DeviceCommand$ResponseThread.run(DeviceCommand.java:1325)

A common programming practice is to wrap one exception inside another exception, in order to provide more complete context for the error condition. The stack trace for such wrapped exceptions includes multiple call stacks flagged with the caused by clauses. When reporting an exception to BMC Customer Support, include the entire chain of stack traces as linked by the caused by clauses. The following example demonstrates such a chained set of stack traces.

Jun 22, 2016 08:03:12 AM com.bmc.bcan.engine.network.devices.DeviceActionUtil performDiscovery
SEVERE: [Thread=DeviceTaskThread-2(Snapshot-vw-pun-blg-dv03.bmc.com)] Exception in discover acess mode
com.bmc.bcan.agent.shared.imported.network.devices.comm.DeviceAccessException: open timed out for 10.128.89.54, 
	    caused by: NoRouteToHostException: No route to host (Host unreachable)
        at com.bmc.bcan.agent.shared.imported.network.devices.comm.ConnectionDelegate.open(ConnectionDelegate.java:2743)
        at com.bmc.bcan.engine.network.devices.comm.ConnectionWrapper.open(ConnectionWrapper.java:1002)
        at com.bmc.bcan.engine.network.devices.DeviceActionUtil.discoverDeviceSecurityProfile(DeviceActionUtil.java:792)
        at com.bmc.bcan.engine.network.devices.DeviceActionUtil.login(DeviceActionUtil.java:1467)
        at com.bmc.bcan.engine.network.devices.DeviceActionUtil.performDiscovery(DeviceActionUtil.java:724)
        at com.bmc.bcan.engine.network.devices.DeviceAction.beforeExecute(DeviceAction.java:645)
        at com.bmc.bcan.engine.network.devices.DeviceAction.run(DeviceAction.java:982)
        at com.bmc.bcan.engine.network.devices.concurrent.DeviceTask.runDelegate(DeviceTask.java:437)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.<init>(Socket.java:211)
        at com.sshtools.net.SocketTransport.<init>(SocketTransport.java:31)
        at com.bmc.bcan.agent.shared.imported.network.devices.comm.SSHConnectionDelegate.connect(SSHConnectionDelegate.java:410)
        at sun.reflect.GeneratedMethodAccessor385.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.bmc.bcan.agent.shared.imported.util.RunnableMethod.run(RunnableMethod.java:332)
        ... 1 more

ChatException

Type: Expected

Cause: A ChatException occurs when interacting with a device and a recognized error condition occurs.

Solution: The error message indicates what went wrong; fix what is reported, or, if your request is invalid, do not make such a request.

DeviceAccessException

Type: Expected

Cause: A DeviceAccessException occurs when making a connection to a device. It can appear multiple times in the log file when auto-discovering the access mode, while the system cycles through the available modes.

Solution: If you see this exception in the log but no jobs report an error, you can safely ignore it (meaning auto-discovery eventually found a working access mode). Otherwise, check the device's primary and auxiliary settings for correctness; check the address/hostname/URL, the device agent, the access mode, and the port; all of these affect making a connection. Ping the device from the agent system to verify that it is reachable.

DeviceLoginException

Type: Expected

Cause: A DeviceLoginException occurs when the device agent fails to login to a device, using the credentials in the selected device security profile, or, if auto-discovering the credentials, using the credentials in any applicable device security profile.

Solution: Check the device's device type setting to verify that it matches your actual device model. Check the device's primary and auxiliary settings for correctness; check the address/hostname/URL, the device agent, the access mode, and the port; all of these affect making a connection. Ping the device from the agent system to verify that it is reachable.

InterruptedIOException

Type: Expected

Cause: An InterruptedIOException occurs when interacting with a device and it fails to respond to a command within a timeout period. This can occur when the command takes longer than expected, or when the device responds in an unrecognized way (that is, none of the expected responses or errors is matched).

Solution: View the transcript to determine if the device emitted a response at all. If so, verify that the response appears in the device type adapter's known <response> or <error> elements; if not, edit the adapter to add it.

If no response was received or it appears in the Logout section of the transcript, then the timeout is too short. If this occurs while performing a snapshot or deploying a configuration, increase the Timeout for Script File Transfers system parameter. If this occurs while performing a snapshot or deploying an OS image, increase the Timeout for Image File Transfers system parameter. For other timeouts, edit the device type adapter to define a timeoutSeconds on the failing <interaction> that is long enough to allow the command to complete.

JasperException

Type: Unexpected

Cause: A JasperException occurs when generating a web page for display and an underlying logic error occurs. The web server log file contains the stack trace detailing the underlying error.

Solution: Report the exception and its stack trace to BMC Customer Support. You might retry the request that failed, in case the error condition is transient. You might restart the web server service, in case the error condition is transient.

JRException

Type: Unexpected

Cause: A JRException occurs when exporting reports and an underlying logic error occurs. The web server log file contains the stack trace detailing the underlying  error. The logic error is sometimes caused by the export logic attempting to insert a page break in the middle of data that cannot be broken across pages. The stack trace in this case refers to a "non-splitting band" and the need for a "rewindable data source."

Solution: Report the exception and its stack trace to BMC Customer Support. You might retry the export or email request using a different format. Since the issue might relate to where a page break is being attempted, you might try sorting your report data differently, or you might generate a new report that contains slightly different information. These techniques can alter the layout just enough to cause page breaks to occur successfully.

MissingResourceException

Type: Unexpected

Cause: A MissingResourceException occurs when a message intended for display in a localized way cannot be found in the language bundle.

Solution: Verify that your custom device adapters do not use the key attribute on the <name>, <groupName>, and <assert> elements, which is for use in BMC baseline adapters only.

NullPointerException

Type: Unexpected

Cause: A NullPointerException occurs when a logic error or defect is encountered in the software.

Solution: Report the exception and its stack trace to BMC Customer Support. You might retry the request that failed or restart the web server service, in case the error condition is transient.

OutOfMemoryError

Type 1: Unexpected

Cause 1: An OutOfMemoryError occurs when too many objects are loaded into memory, or the objects are too large, reaching the specified maximum (the -Xmx argument to the java program), causing the processing to be aborted or abandoned. This can be caused by a single large request (such as a report on the entire network) or by a combination of many smaller requests.

Solution 1: If the error message says Java heap space or GC overhead limit exceeded, then increase the maximum memory that the web server or remote device agent is allowed to allocate. Rerun the installer; go to the Memory and System Options page; update the value in the Maximum Memory Allocation field. If you are unable to increase the memory and you think your value is already large enough, or if the error message is unable to create new native thread or some other message, contact BMC Customer Support.

Type 2: Expected

Cause 2: An OutOfMemoryError occurs when a user has requested the generation of a very large report and its size has exceeded the 2 GB limit imposed on a stored report. The stack trace in this case contains the GeneratedReport and ByteArrayOutputStream classes, as shown in the following example:

java.lang.OutOfMemoryError
	at java.io.ByteArrayOutputStream.hugeCapacity(ByteArrayOutputStream.java:123)
	at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:117)
	at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
	at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1877)
	at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1786)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1189)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
	at com.bmc.bcan.engine.user.reports.GeneratedReport.setReport(GeneratedReport.java:395)
	at com.bmc.bcan.engine.user.reports.ReportManager$BackgroundReportGenerator.work(ReportManager.java:563)
	at com.bmc.bcan.engine.user.reports.ReportManager$BackgroundThread.run(ReportManager.java:472)
	at java.lang.Thread.run(Thread.java:748) 

Solution 2: If the stack trace shows that the exception was originated from ByteArrayOutputStream and the GeneratedReport class is calling ByteArrayOutputStream, then the report is too large and cannot be generated. In this case, increasing the heap size does not help. To resolve the issue, make different report selections to reduce the size (such as fewer rules or a smaller network span).

TransactionCollisionException

Type: Expected

Cause: A TransactionCollisionException occurs when multiple concurrent edit requests collide while editing the same component stored in the database. It can occur when two users edit the same component and click Save at the same time. It can occur when a job is running on a device and a user saves the changes done in that device, or adds the device to a group.

Solution: Edit the component again, ensuring that you start with its currently stored settings (that were just updated by someone else). If you are using the web-based user interface, go back to the list page and edit the component again. If you are using a web services client, retrieve or get the component again, edit it again, and submit the update or modification request again.

Was this page helpful? Yes No Submitting... Thank you

Comments