Article ID 17
Article Title ERROR: DataFlex User Count Errors on Unix
Article URL http://www.dataaccess.com/kbasepublic/KBPrint.asp?ArticleID=17
KBase Category UNIX
Date Created 03/08/1996
Last Edit Date 09/02/2003


Article Text
DATAFLEX 3.1 and higher:
In DataFlex for Unix 3.1c and higher, the location of the user count file (serial.dfr) is hard coded to /usr/tmp.
=> This means that this file cannot be moved to another area.
=> The file's location does NOT have to be in DFPATH for DataFlex to find it.

DataFlex 3.1 and higher does not do housekeeping on the number of users.
- Unix has the responsibility of cleaning up invalid sessions.
- DataFlex issues lock of byte range against .dfr file.
- If there is an ungraceful exit, the OS should release lock if an invalid session is found.

=> To check number of dfrun sessions in Unix: - ps -ef grep -i dfrun.

=> To check number of users logged into DataFlex: - help, about, more => # users.

=> If using TCP/IP or Ethernet connection, cannot log in again as the same TTY session number.

DataFlex uses TTY sessions to count users
- Session # gets logged in user count file
- When user logs in remotely, gets assigned a new virtual session#
- This session# is not compatible with earlier session number
- Result: "DataFlex user count exceeded" error


DOC
DataFlex 3.1 for Unix ReadMe file:

    Changes In the User Counting File
    
    The user counting system has changed For all UNIX products. In revisions 3.05c And before, the user counting was done through the File .spool.df.23 created in the /usr/tmp directory.
    
    For DataFlex 3.1b, user counting Is done through A user counting File (extension .dfr) also created in the /usr/tmp directory. The dfr File Is created when dfsetup Is executed. The dfsetup reads the serial Number From the termlist.cfg File And creates the <serial Number> .dfr File in /usr/tmp. Please note that the dfr File Is hidden And will Not be removed with "rm*" command.
    
    The reason behind using .dfr File Is To give the user A facility To install And Use multiple licenses on A system. In addition, by putting all the .dfr files in one directory, the system administrator can check For the Number Of licenses installed on that system.
    
    One Of the long-standing complaints Of DataFlex users has been the corruption Of the user counting mechanism when An operating system crashed. The user count was maintained in the .spool.df.23 File as An entry in A record. Ungraceful exit From the system Left the File with An incorrect user count And the only way To recover From this was To Remove the .spool.df.23 File. In DataFlex 3.1b, the locking mechanism Is used To count the Number Of users. If For some reason the system crashes, the modem line drops Or any other ungraceful exit takes place, the locks are released. In fact, this Is what would happen If the user exited the system gracefully.
    
    If the user upgrades To A higher Number Of users license, the same dfr File Is over written.
    
    How To Create The dfr File
    
    The dfr File can be created any Time by running dfsetup And exiting with option 3. This will create A new dfr File.
    
    When To Create A New dfr File
    
    If the user gets any user count File errors And the user has A valid termlist.cfg installed. The errors generated For any Number Of reasons: absence Of A .dfr File, corruption Of A .dfr etc.
    
    Diagnostics
    
    The following are newly generated errors:
    
    Error: Cannot Open User Count .DFR File
            User count File Not Found. If valid termlist.cfg Is present, run dfsetup To recreate the dfr File.
    
    Error: Cannot Read User Count .DFR File
            Failed To Read the user count File. Check rights.
    
    Error: Cannot Decrypt User Count .DFR File
            Corrupted user count File. Remove the existing File And run dfsetup.
    
    This Error Is often A result Of the termlist.cfg And .dfr files being out Of synch. For example, If the termlist.cfg Is registered To DataFlex 3.1c, but the .dfr File was created with 3.1d, you will Get this Error message.
    
    Error: Bad Version Of User Count .DFR File
            The user count File may be From another system. Remove And run dfsetup.


DATAFLEX 3.05 (and before):
- Each DF session wrote to the user count file.
   * thus, in inappropriate exit of app, DF cannot remove entry from file.
- Location of user count file: /usr/tmp/.spool.df.23
- If this file is removed, restarting DataFlex will rebuild this file (without running DFSetup like in DOS).
- Deleting this file while users in system can have very unpleasant ramifications.
- An ungraceful exit from DataFlex (i.e., power failure) could corrupt this file.




Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2024 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.