Skip to main content

Command Palette

Search for a command to run...

Unable to open debugger port

Published
4 min readView as Markdown
J

I am a full stack developer, who also writes on Kodlogs.net

What is a debug port?

A debug port is a chip included in a device (similar to a computer port) incorporated in an integrated circuit to help in developing, designing, fabricating, bootstrapping, configuration, debugging, and in-system programming after the sale. In general, a debug port isn't required for end-user functions; thus, it's frequently concealed or disabled in finished products. A debug port may continue to function as a system monitor for integrity validation in the finished product if configured in high availability or safety-critical system. However, Debug ports are sometimes kept enabled in low-cost or high-volume electronics to prevent design changes, and modders and hackers can leverage them to acquire control of the device and further access functionality.

-

Reason for this error

You can debug apps remotely from an IDE running on your local system by opening a JVM debug port on your Oracle Java Cloud Service nodes. You will encounter this kind of problem when another program already uses your port. Before you can debug your message flow, you must attach the flow debugger to the integration server where your flow is deployed; then, that's when you can run a successful debugging session.

-

How to fix this issue?

In WebLogic Server

- You must alter the server's start-up options and then restart the server to set up the debug port in WebLogic Server.

Select the service instance you wish to enable the JVM debug port in the Oracle Java Cloud Service console. Open WebLogic Server Administration Console from the service menu. Enter the administrator login credentials on the Welcome screen. Request the login credentials from your Java Administrator if you did not create the service instance. Click Lock & Edit in the Change Center pane. Expand Environment and then click Servers in the Domain Structure window. A list of available servers will appear.

- Note: Ensure that you are on the Configuration tab.

-

In the Servers table, click the server's name running your application. Select the Server Start option from the drop-down menu. In the Arguments field, type the following: -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8457,server=y,suspend=n When copying and pasting these arguments, be sure there are no line breaks. Take note of the debug port address you choose (8457 in this example). This address will be required for the next activity. Save the file. Click Activate Changes in the Change Center pane. Expand Environment and then click Servers in the Domain Structure window. Select the Control option from the drop-down menu. In the Servers table, check the box next to the server running your application. Select Force shutdown now from the Shutdown menu. Click Yes when prompted for confirmation. Wait until the server's state changes to SHUTDOWN. Then, to see the current condition, refresh the page. Click Start after checking the box next to the server. Click Yes when prompted for confirmation. Wait until the server's status changes to RUNNING. Then, to see the current condition, refresh the page.

-

Create an Access Rule for the Debug Port

You'll need to build an access rule to ensure that messages sent and received from your local debug session are accepted by the Oracle Java Cloud Service node that hosts the application you're debugging.

Go to the Oracle Java Cloud Service console to create the access rule. If you established this service instance in an Oracle Cloud Infrastructure region, you must create the access rules using the Oracle Cloud Infrastructure Console (security list). In the Oracle Cloud Infrastructure Services documentation, look up Security Lists. To access the Oracle Java Cloud Service console, go to Https://console.oracle.com/javacloudservice. Select Access Rules from the menu icon next to the service instance name. The Access Restrictions page appears, which displays a list of all access rules. Select Create Rule from the drop-down menu. The dialog box for creating an access rule appears. Give your rule a specific name. Specify a rule description if desired. Numbers, hyphens, and underscores are permitted in the name, which must begin with a letter. The maximum length is 50 characters. However, when creating a rule, you can't use the prefixes ora or sys. The rule source should be PUBLIC-INTERNET. Depending on the server type where the debug port is set up, choose WLS ADMIN SERVER or WLS MANAGED SERVER. The destination port should be the same as the debug port's address. This would be 8457 in our case. TCP is the protocol to use. , Click create to create a new rule

- Your new rule is displayed on the Access Rules page.

-

Conclusion

Now that you have understood the cause of the error and some actions you can take to fix it. You should be able to perform a successful operation. Happy troubleshooting :)

More from this blog

Untitled Publication

39 posts