Sponsored Content
Operating Systems Solaris "Device busy" When Reopening Serial Port Post 302580967 by Jim Ryan on Sunday 11th of December 2011 12:15:47 PM
Old 12-11-2011
"Device busy" When Reopening Serial Port

Any help much appreciated. I am a Java developer, not a Solaris adept. I'm having an issue reopening serial port with the Java app I am developing.

I develop in Windows and deploy the app on Solaris 10 (Sunfire X4170 with Xeon.) On the target machine my app uses the two serial ports /dev/cua/comf1a and /dev/cua/comf1b. If a port cable is unplugged my app detects this (by heartbeats failing to be acknowledged) and closes and then reopens the port. There is no issue in Windows; the app can close and open the port again. But on Solaris, although the app has no trouble opening ports at launch, I get "Device busy" when the app tries to reopen the port, having closed it. I can then shut down and quickly restart the app, and it has no issue opening the ports again on restart. I am sure I am not keeping any ties between the app and the closed port; I am closing input streams and output streams. And there is no issue in Windows. So I think this is an OS-level issue. I have tried making the app wait 15 minutes after closing and before reopening; this doesn't help. I'm wondering whether Solaris has marked the port as in use by the app for the duration of the run of the app so that the port may be closed but not reopened, even by the same app itself.

Thank you for any help you can give me with this.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

serial port device path

hi. Im trying to install a switch. And the manual says i should type a command including a SerialPortDevicePath. which is the filepath to serial port used for connection. However.. nothing about how to find this info. Could anyone help me where to find this path? thx mr.T (6 Replies)
Discussion started by: tyskertøs
6 Replies

2. Emergency UNIX and Linux Support

Mapping between "Pseudo name" and "Logical device ID" in powerpath with SVM changed....

Dear All, I was having powerpath 5.2 on SUN server with SVM connected to CLARIION box.Please find the following output : root # powermt display dev=all Pseudo name=emcpower3a CLARiiON ID=CK200073400372 Logical device ID=60060160685D1E004DD97FB647BFDC11 state=alive; policy=CLAROpt;... (1 Reply)
Discussion started by: Reboot
1 Replies

3. Linux

Umount of a "busy" disk

A product I am working on manages storage. We are currently porting it from Solaris to Linux. The product allows its user, among other things, to add and remove file server volumes, where these volumes are exported using the NFS or the CIFS protocol. The problem is that when the user requests to... (5 Replies)
Discussion started by: dhzdh
5 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

UNIX rm -rf error "rm: cannot remove `filename' : Device or resource busy"

Hi Everyone, I am trying to remove a directory: $ rm -rf directory_name/ rm: cannot remove `directory_name/filename': Device or resource busy What does this mean, and why can't I remove these files? I already tried moving into the directory, and removing the files individually, but I... (7 Replies)
Discussion started by: Anna_Z
7 Replies

6. Red Hat

Find out which eth or device belongs to interface "port 1 PCI 4"

Hi, I´ve given only this info to configure a network interface : "port 1 PCI 4" I´ve been searching for any kind of relationship in the system which allow me to find the etc that must be configured... Please, could anybody help me? rhxx:#/root# lspci |grep -i "PCI BRIDGE" 00:01.0 PCI... (0 Replies)
Discussion started by: pabloli150
0 Replies

7. SCO

NFS umount shows the "Device busy (Error 16)"

Hi there After making a backup copy of it sometimes happens that when I want to unmount an NFS indicates the error:umount: /path_mount busy: Device busy (Error 16) if I run lsoff, I can not find the process that is blocking the application. I'm using OpenServer 5.0.2c as one NFS server ... (14 Replies)
Discussion started by: flako
14 Replies

8. Solaris

How to remove a LUN in "Online Busy" state?

Hi all, I have a LUN that is in "Online Busy" when I issue the dev_gestate subcommand of luxadm: root@es088wb6:~# luxadm -v -e dev_getstate /dev/rdsk/c21t50050763090887FEd4s2 phys path = "/devices/pci@6c0/pci@1/pci@0/pci@4/SUNW,qlc@0/fp@0,0/ssd@w50050763090887fe,4:c,raw" ... (5 Replies)
Discussion started by: ludiegu
5 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
stmfOfflineTarget(3STMF)			   SCSI Target Mode Framework Library Functions 			  stmfOfflineTarget(3STMF)

NAME
stmfOfflineTarget - take offline a target port that is currently in the online state SYNOPSIS
cc [ flag... ] file... -lstmf [ library... ] #include <libstmf.h> int stmfOfflineTarget(stmfDevid *target); PARAMETERS
target The identifier of the target port to offline. DESCRIPTION
The stmfOfflineTarget() function takes offline a target port that is currently in the online state. Once in the offline state, the target port will no longer be capable of servicing requests in the system. This API call can be used to take offline a target port device for servicing. Once the target port is offline, it will no longer be avail- able to any entities outside of the SCSI Target Mode Framework. Any initiator ports that currently have sessions established by the offlined target port will be logged out. RETURN VALUES
The following values are returned: STMF_ERROR_BUSY The device is currently busy. STMF_STATUS_SUCCESS The API call was successful. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libstmf(3LIB), attributes(5) SunOS 5.11 9 Jun 2008 stmfOfflineTarget(3STMF)
All times are GMT -4. The time now is 08:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy