Re: Bad File Number Closing.....

Just a thought-
Is this Windows? Make sure you have a large enough "FILES"
parameter in your CONFIG.SYS, etc. I seem to recall problems similar
to what you describe when we didn't have it high enough.
Make sure to re-boot after changing the "FILES" parameter..
Also, if you encounter or generate exceptions, be very careful to
catch them and close open files! Otherwise in the course of testing your
application you will slowly use up the available file handles and get
problems more often. Quitting the application (in the
Development Workshop) does not free the handles --
Quitting Forte completely does.
Hope this helps.
-Greg
To: forte-users <[email protected]>
From: Michael George <[email protected]>
Date: 8 Nov 96 14:59:43
Subject: Bad File Number Closing.....
Reply-to: Michael George <[email protected]>
Has anyone ever encountered the Bad File Number error when closing a file
object. This is a random error that is causing us major grief. We can run our
application 6 or 7 times before we eventually receive the bad file number error
when executing the "close" method. Incidentally, this same error occurs when
you import a new project into your workspace, and then try to import the exact
same project again (overwriting the first one).
We tried using the "Flush" method before closing, we also tried deleting the
text file after we closed it each time. But nothing seems to be helping. Any
help would be appreciated.
Greg Nyberg, Senior Consultant
Born Information Services Group
Phone: (612) 404-4217 Fax: (612) 404-4440
------------------------------------------------------

Thanks for your prompt answers.
Are your two processes on two different hosts accessing a common NFS file system? If so, all bets are off.We have processes from multiple (hundreds in fact) boxes accessing common NFS system. With a careful design of one process accessing BDB at a time, we have pretty good success. Millions of BDB GET/PUT per day are succeeding just fine. Occasionally we see this bad file number error in different scenario of GET/PUT/CLOSE.
Came up on the following article in a google search which indicates that a JDK bug may be causing this behavior.
http://256.com/gray/docs/misc/java_bad_file_descriptor_close_bug.shtml
We are running 1.5.0_11-b03 currently. We will try to upgrade the JDK and see if the problem goes away. Upgrading is a slow process though.
The cleaner is the only thing that deletes a log file so it must be running somehow.We are explicitly disabling cleaner by setting e.env.runCleaner to false. Let me know, if the cleaner can still run somehow.
Does closing the environment in all threads of the process that receives the exception and then reopening the environment clear the problem? Note that unless you do Environment.close() on all Environment handles, the Environment will not get truly closed. In cases when GET and CLOSE fail because of "Bad File Number", things are recoverable. When PUT fails because of "Bad File Number", we are loosing user data which is bad.

Similar Messages

  • SQLException: Io exception: socket closed: Bad file number;

    Hi,
    My server application connects oracle 8i using thin driver.
    My code opens a connection and create a statement object:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection connection = DriverManager.getConnection(url, username, password);
    connection.setAutoCommit(false);
    Statement statement = connection.createStatement();
    After a few hours it runs just fine I get the following error:
    java.sql.SQLException: Io exception: socket closed: Bad file number;
    The code line that couses this exception is:
    statement.executeQuery("my SQL query");
    after this there are more errors:
    ;java.sql.SQLException: Protocol violation;
    (in code line: connection.execCommit())
    and than a repeated exception of :
    java.sql.SQLException: Io exception: Broken pipe;
    Does anyone knows a solution? (is the problem in my code or in the oracle account?)
    Thank!!!

    Which package you are using? if you don't have
    classes12.zip, try again by including that package in
    the classpath. If you are already using classes12.zip
    then try by including nls_charset12.zip in the
    classpath.
    You can get these packages in Oracle (otn) website.
    SudhaThanks!
    I had classes12.zip in my classpath, but my classpath also had: classes111.zip
    so i removed classes111.zip from the classpath and as far as now,
    the problem did not occur again!
    (i also added nls_charset12.zip just to be sure)
    Lilach

  • Exception clearing file manager: java.io.IOException: Bad file number

    I see the following exception when closing the environment. Not reproducible easily, happens only with production user's data occasionally. Any ideas on what causes this and what can be done to resolve it?
    com.sleepycat.je.RunRecoveryException: (JE 3.2.74)
    Exception clearing file manager: java.io.IOException: Bad file number
    at com.sleepycat.je.dbi.EnvironmentImpl.doClose(EnvironmentImpl.java:1123)
    at com.sleepycat.je.dbi.EnvironmentImpl.close(EnvironmentImpl.java:995)
    at com.sleepycat.je.Environment.close(Environment.java:322)

    Thanks for the pointers.
    We are running on Solaris.
    I located a narrow window in our code where another thread from the same process was permitted to close the environment when a close is already in progress. Will plug that window.

  • Export for system copy fails - Error 9 (Bad file number)

    Hello all,
    I am attempting to perform the export phase for a hetergenous system copy on our BI system (BI 7.0 - NW2004s).  This system runs on HP-UX 11.11 using Oracle  10.2.0.2 and will be migrated to Windows Server 2003 and MS SQL Server 2005, once the export is complete.
    While running sapinst to export the data from the source system, there are several input dialog screens that are skipped, which means I am not able to enter all the paramters used for the export.  After seeing this behavior from sapinst, I reviewed the sapinst.log and sapinst_dev.log files and find the warning/error "System call failed. Error 9 (Bad file number)".  I have included a portion of these files below.
    I have reviewed notes 546006 and 583861, but these seem to refer to an Oracle error ORA-27121, but I am not receiving any Oracle errors in sapinst.log or the Oracle alert log.  I have looked for possible permission or ownership problems with any of the SAP or Oracle files, but have not found any that were incorrect.  Also, these errors do not specify which file sapinst is having problems with, so I do not have  a specific file or area to check.
    If anyone has seen something similar to this and has any suggestions, I would greatly appreciate any help.
    sapinst.log details:
    INFO 2009-02-14 15:15:51.67
    Execute step collect of component |NW_Export|ind|ind|ind|ind|0|0|NW_GetSidFromProfiles|ind|ind|ind|ind|1|0|NW_readProfileDir|ind|ind
    |ind|ind|0|0
    INFO 2009-02-14 15:15:52.737
    Account bwpadm already exists.
    WARNING 2009-02-14 15:15:52.747
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    INFO 2009-02-14 15:15:52.757
    Account 0 already exists.
    WARNING 2009-02-14 15:15:52.777
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    INFO 2009-02-14 15:15:52.777
    Account 200 already exists.
    WARNING 2009-02-14 15:15:52.827
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    INFO 2009-02-14 15:16:04.937
    Creating file /tmp/sapinst_instdir/NW04S/LM/COPY/ORA/EXP/CENTRAL/AS/EXP/ypcat.log.
    INFO 2009-02-14 15:16:05.007
    Output of ypcat passwd.byname is written to the logfile ypcat.log.
    sapinst_dev.log details:
    TRACE      2009-02-14 15:15:52.737
    2009-02-14 15:15:52.743 NW._getSAPMount() done: /sapmnt
    INFO       2009-02-14 15:15:52.737 [syuxcaccmg.cpp:227]
               bool CSyAccountMgtImpl::isExisting(ISyAccountMgt::eAccountType accountType, iastring sName)
    Account bwpadm already exists.
    TRACE      2009-02-14 15:15:52.747 [syuxcuser.cpp:1943]
               CSyUserImpl_getOsInfos(ILogBook *m_logBook, iastring sName, iastring sID, tSyUserInfo& msUserinfo)
    getspnam(bwpadm) returned NULL.
    WARNING    2009-02-14 15:15:52.747 [syxxsyshlp.cpp:78]
               syslib::printOSError(const iastring &, int, DWORD, const iastring &, CMessage::eLogMessage)
    System call failed. Error 9 (Bad file number) in execution of system call 'getgrent' with parameter (), line (292) in file (syuxcuse
    r.cpp).
    Regards,
    Rusty Robbins

    Hello Peter,
    Thanks for the reply. I did confirm the points you made, and have the details below.
    1. check filesystem, if you have enough space, especially /tmp
    All filesystems have available space, and /tmp has 310 MB available, before the start of sapinst.
    2. check again alert log, trace log for Oracle,
    I could not find any errors in the alert_SID.log or any unusual trace files.
    3. How did you run sapinst? Are you using "root" account.
    I am running sapinst as user root and I am following all the recomendations in the system copy guide (at least as far as I can tell.  ;p )
    We have four BI systems in this landscape, and the other three have migrated successfully.  The procedure I am using, is the same as for the other 3 systems and uses the same SAP media directory that was used on the other systems.
    One other item that may be part of my problem here, is that this system is the production system, and was originally installed as a high-availability system, using HP-UX Service Guard for clustering.  Currently, this system does not have fail-over enabled, but of course the cluster is still intact.  One required piece of the Service Guard enviornment is the use of a virtual hostname.  This seems to resolve successfully by sapinst, as I see the correct (virtual) hostname referenced several times.  While this is a clustered system (for fail-over purposes), the CI and DB are installed on the same host.  So it is not a distributed system, and if failover had been initiated, it would fail both the CI and DB instance, which is the same and only SAP instance.
    This did raise one question in my mind, however.  I am attempting to extract this using the following menu path within sapinst.
    SAP NetWeaver 7.0 Support Release 3  --> Software Life-Cycle Options --> System Copy --> Oracle --> Source System Export --> Central System --> Based on AS ABAP and AS Java
    Since this does use Service Guard, but is not a distributed system, should I be using a different path in the sapinst tree, for the export?  I have only performed a migration using the above path, so I am not familar with the detailf of the other types, such as High-Availabitly or Distributed-System.
    Regards,
    Rusty

  • Ifconfig pcelx0 plumb fails with Bad file number error

    Hi,
    I installed solaris 8 (x86) on a Toshiba Tecra 8000.
    The Tecra uses Neomagic NM2200 chipset for it's display.
    Even though it is not supported by the Sun Drivers, getting xfree86 for sun fixed the display problem for me.
    Now according to the various sources that guided me in this task seemed to point at a few things that I had to do in order to make the Tecra work okay with Solaris 8 :
    1)Change the PCMCIA mode in the BIOS from automatic to PCIC mode
    2)Make sure that there were no IRQ conflicts on the system.
    3)Install the OS.
    Once the OS was installed, I ran prtconf -D and saw that the network instance #0 pcelx0 was showing up under pcic.
    I did not have to install the xig init-pcic patch.
    But it did not create an entry in /devices or /dev (as a link) with the error
    "pcelx0 requested IRQ failed 6".
    Also, I suppose that is the reason why when pcelx0 is plumbed, it comes out with the error message:
    ifconfig pcelx0 plumb : "bad file number"
    Any help will be greatly appreciated.
    Thanks,
    Dwai.

    Thanks Alex,
    I found out -
    ifconfig adapter plumb will fail with Bad File number error when the device file that is being referred to is missing.
    I checked and found that the pcelx link is not being made in the /dev directory and the file not created in /devices.
    I also found that when /reconfigure is run, it tries to create the device for pcelx but fails with this eror message:
    pcelx : RequestIRQ fail 6
    I am assuming that there is some IRQ conflict with some other device.
    Thanks,
    Dwai.

  • Bad file number - comes when i upload the file

    While i tried to upload the file more 300 kb (any file type)to 2 apache server using nfsmount (nfsmnt-apache 1 and nfsmnt2 -apache 2) through weblogic 9.2 (it is running in linux), i got the following exception, but less 200kb file i can upload the file (any type) to both apache server.
    java.io.IOException: Bad file number at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:177) at
    anybody known this prob, pls help me

    Suggestion: read [the documentation|http://commons.apache.org/fileupload/using.html] for it.
    By default it will store files in memory up to about 10k. Larger than that will be written to disk.
    If you are really worried about memory, perhaps you should take a look at the [streaming API|http://commons.apache.org/fileupload/streaming.html]
    How large are the files being uploaded?
    How many users are we talking about?

  • IOException :Bad file number

    Hi All
    I have written a program which writes into the file and reads from the file.
    I encounter bad file number error whenever I create new jar and replace it with old one.
    Actually file handle writes into the file correctly initially but after 5-6 operations I get bad file number error.
    Whenever I get this error then I close my application and start it again.after that I never face any issue.
    I am using solaris 9 OS and jdk1.6.
    I am using FileOutputStream to write into the File.
    Please let me know If you need more info?

    In my case, this exception was due to a defect in some timeout code I'd written. I didn't want to wait forever for the command to complete, so after an appropriate amount of time, the code would destroy the process. That invalidated the data streams however, causing the bad file number exception in the reader threads.
    So you may look for ways in which the executed process might be getting destroyed.

  • Bad file number in Module rslgcoll rslgcoll(041)

    Hi,
    We have an error in SM21, every few minutes a new entry like this is
    written:
    10:54:39 S-A 000 d01adm E07 Error 00000 : 9Bad file
    number in Module rslgcoll(041)
    There is not dumps nor any other error.
    Can anybody help us?

    I found the answer. (I post it only for those who might have the same issue.)
    You may restart rslgcoll process.
    rslgcoll runs as a sym link co.sapSID_DVEBMGSXX ...
    you can find the process as below
    ps -ef | grep co.sap
    then kill the process.
    go to sap work dir, and execute rslgcoll. you should go to the work dir.
    rslgcoll -pf=<complete path to instance profile> -F &
    or you may follow the steps on the start profile (create sym link and then execute co.sapXXXXX )
    then it will be ok.
    or if you can you may want to restart the sap system. it will work too.

  • Java error message - Bad version number in .class file

    I get the  error noted below in Safari, Firefox, and Chrome when I try to view java containing web pages.
    Specifically this page: http://aviationweather.gov/adds/tafs/java/
    My Java Preferences are as follows
    My OS is 10.5.8
    Thanks!
    Java Plug-in 1.6.0_26
    Using JRE version 1.5.0_30-b03-389-9M3425 Java HotSpot(TM) Client VM
    User home directory = /Users/ernest
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Plugin2ClassLoader.java :1014)
        at sun.plugin2.applet.Plugin2ClassLoader.access$100(Plugin2ClassLoader.java:69)
        at sun.plugin2.applet.Plugin2ClassLoader$2.run(Plugin2ClassLoader.java:991)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Plugin2ClassLoader.java:9 55)
        at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:134)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:250)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:161)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:675)
        at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3046)
        at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.ja va:1498)
        at java.lang.Thread.run(Thread.java:655)
    Exception: java.lang.UnsupportedClassVersionError: Bad version number in .class file

    Hi, thank you for the reply.  However, java is definitely enabled on my computer, on all my browsers.  In fact, if I go to the SUN website and run the java test, I get that all is OK.
    I think it may have something to do with the .class (maybe in .jar-file) compiled with a higher version of java than the virtual machine trying to run it. 
    The example I found (google search) is .class-file that is compiled with JDK 6 and I am trying to run it with 1.4 JVM.
    There is some software error going on somewhere... but I do not know enough to fix it.
    Many thanks for all your help

  • JDBC error : UnsupportedClassVersionError:Bad version number in .class file

    Hi All,
    I am currently working with PI 7.1 on an Idoc ->XI->JDBC scenario. The DB being used in our case is SQL 2008. We have successfully installed the JDBC driver provided by MS. When the message reached the JDBC the following error is listed in RWB.
    JDBC Message processing failed, due to Error when attempting to get processing resources: com.sap.aii.af.lib.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Can not establish connection:: UnsupportedClassVersionError: Bad version number in .class file
    We tried reinstalling the JDBC drivers as well , but to no avail.. .
    Any idea on why this could happen ?
    Regards,
    Sandeep

    Hi Mallikarjun,
        Are you getting this error for only specific channel or all channels?
    If you are getting this for all channels check your drivers of they are installed correctly....
    if it is for specific channel then try increasing JDBC thread count and in restart the channel...
    Regards,
    Naveen

  • Collect Files Error:Bad Reference Number (-51)

    When using Collect Files to push my project to a renderfarms watch folder it stops when the transfer is to a specific source file:
    AVI (Blackmagic SDI)
    YUV 10bit
    uncompressed
    16 GB
    The error message is:
    BAD REFERENCE NUMBER (-51)
    what does this mean?
    Rendering on my local machine works fine.

    What is the file size and to what network storage do you transfer? Sounds like the file size is simply too large and the server refuses to accept it or at least the server is unable to provide enough contiguous storage space to accomodate it...
    Mylenium

  • Bad file name or number

    A customer is sometimes getting the message "Bad file name or number" when selecting 2009.MAR as Time dim in an input schedule (double clicking an EVCVW formula). Unfortunately the error is intermittent; he says he gets the message 2-3 times and then it works OK. He can change it to other years / months, and he can change the Entity. 2009.MAR looks just like any other in the dim list. Anyone seen this one before? (MS7.0 SP3)

    Cecilia,
        You can verify if there is something wrong into the Time.xml file donwloaded locally on the client machine or just try to refresh dimension information on that machine using eTools->Client options menu.
    Regards,
    Mihaela

  • The Wizard doesn´t start ("Bad version number in .class file")

    Hi,
    I have done the steps from Adobe´s web to install the plugin and dependences... But when i try to start the wizard i have this problem:
    "The selected wizard could not be started.
      Plug-in com.adobe.livecycle.cde was unable to load class com.adobe.livecycle.cde.wizard.CdeWizard.
      Bad version number in .class file"
    Thanks

    Thanks for reply nothing

  • Catfish - RuntimeError: Bad magic number in .pyc file

    I'm using catfish as a search tool, I installed it on a new system with findutils as the backend. When I run it I get "RuntimeError: Bad magic number in .pyc file"
    I have no idea how to fix this. It runs fine on another system. I tried to reinstall it and did a full upgrade. I tried it with various backends and I still get this runtimeerror. Any ideas?

    See if you can locate a leftover .pyc file with:
    pacman -Qo $(find /usr/lib/python2.{5,6} -name *.pyc) | grep "No package owns"
    Provide pacman manages all files on your root partition, it should be fine to delete what this finds.

  • SQL Loader Bad File - Line Number

    Is there a way to get line number of records in the bad file or discard file?
    Thanks,

    Hi,
    I think you get the line number of the rows failed to load in the log file. The failing rows are the rows you will find in the bad file.
    I don't know if the log contains the line numbers of discarded rows.
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.obiumsoftware.com]

Maybe you are looking for