Re: directory and FileInputStream issues.

hello,
so i am having a problem with my code. the code will look though text files of images and perform some calculations. previously i copied the java code file to every directory where the calculations were to be performed. a long and tedious procedure. so, i altered the code such that the java file would remain in one place, and i would imput a pathway. i have done similarly with some other java files with success, but i am getting several errors, and no calculations. below is the code.
import java.util.*;
import java.io.*;
import javax.swing.*;
import java.text.*;
import java.lang.Object;
import java.text.DecimalFormat;
public class BPF
     public static void main(String args[]) throws Exception
////////////////////following data pertains to voxel values ////////////////////
          //String vHeight = JOptionPane.showInputDialog("Enter voxel height");
          Double voxelHeight = .4102; //Double.parseDouble(vHeight);
          double voxelWidth = voxelHeight;
          //String vDepth = JOptionPane.showInputDialog("Enter voxel depth");
          double voxelDepth = 6.5; //Double.parseDouble(vDepth);
          double voxelCube = voxelHeight * voxelWidth * voxelDepth;
          double volumeTotal = 0;
          double BPFratio = 0;
          double normalizedBPF = 0;
          int voxel;
          double lowCutOff = 250.00;
          double highCutOff = 900.00;
          double bgColor = -1;
          int nonParenchymaVoxels = 0;
          double voxelArea = voxelWidth * voxelHeight;
          int tissuePerimeterCount = 0;
//////////////////////////following code pertains to files//////////////////////
          //String fNumber = //JOptionPane.showInputDialog("Enter number of files");
          int numOfFiles = 19;//Integer.parseInt(fNumber);
          //String file =  //JOptionPane.showInputDialog("Enter name/number of first file");
          int fileName = 61;//Integer.parseInt(file);
          int count = 0;
          String fileNumber;
          String input;     // image.txt as string
          String deliminator = " \r\t\n.,:;?!/()[]{}|~\"*<>=+&^%$#@_";  // items i overlook when compiling input string 
          String filePath = JOptionPane.showInputDialog("Enter file execution path");
        String addendumOutPut;
         FileOutputStream outPut; // declare a file output object
        PrintStream p;
        try
                 outPut = new FileOutputStream(filePath + "Results.txt");// Creates a new file output stream connected to "BPF Results.txt"
                    p = new PrintStream(outPut);// Connect print stream to the output stream
        catch (Exception e)
                 System.err.println ("Error writing to file");
        for (int iterator = 1; iterator <= numOfFiles; iterator++)
                    System.out.println("\n" + "the count is " + iterator);     
                    fileNumber = String.valueOf(fileName);     // give String fileNumber the converted string value of fileName (the first file # in the list)
                    addendumOutPut = filePath + "addendumOutPut".concat(fileNumber); //add data to file each time loop runs
/*line 86*/          System.out.println("the starting value is: " + fileName);  
                    FileReader inputImage = new FileReader(fileNumber + ".txt");  //used to open the file
                    BufferedReader binputImage = new BufferedReader(inputImage);  //reads lines of text in file
                    Vector voxelValueVector = new Vector();     // complete input file as vector
//////////////////// placing text file numbers in vector ///////////////////////
                    while ((input = binputImage.readLine()) != null)
                              StringTokenizer numbers = new StringTokenizer(input, deliminator);
                              while (numbers.hasMoreTokens())
                                        count++;       //just to keep track of which film i am looking at
                                        String voxelValues = numbers.nextToken(); //reads #s 1by1, line by line
                                        voxel = Integer.valueOf(voxelValues).intValue();     //converts string to numerical (integer) value of pixel
                                        voxelValueVector.add(voxel);     // adds numerical value of pixel to vector
                    int voxelValueArray[] = new int[voxelValueVector.size()];     //creates array that is same size as vector
                    for (int i = 0; i < voxelValueVector.size(); i++)
                             Integer voxelValueList = (Integer)(voxelValueVector.get(i));     //make vector into integers
                             voxelValueArray[i] = voxelValueList.intValue();
                    for (int i = 0; i < voxelValueVector.size(); i++)
                              if (voxelValueArray[i] > bgColor)
                                   tissuePerimeterCount++; //number of voxels within perimeter
                                   if (voxelValueArray[i] <= lowCutOff || voxelValueArray[i] >= highCutOff)
                                             nonParenchymaVoxels++;     //non brain tissue
                    double volumeBrainSurfaceCountour = tissuePerimeterCount * voxelCube; //volume of brain within perimeter including csf etc...
                    double parenchymaTissue = tissuePerimeterCount - nonParenchymaVoxels;     //voxel count of parenchyma tissue
                    double volumeParenchyma = parenchymaTissue * voxelCube;      //volume of parenchyma tissue
                    double volumeNonBrain = nonParenchymaVoxels * voxelCube;      //volume of non-brain elements
                    double ratio = parenchymaTissue / tissuePerimeterCount;          //BPF ratio
                    volumeTotal = volumeParenchyma + volumeTotal; //summation of parenchyma tissue
                    BPFratio = BPFratio + (volumeParenchyma * ratio); //running summation of ratio * parenchyma tissue - used for normalized BPF
                    addendumOutPut = filePath + "BPF Results.txt";
                    try
                             outPut  = new FileOutputStream(filePath + " Results.txt");// Create a new file output stream connected to "BPF Results.txt"
                              p = new PrintStream(outPut);// Connect print stream to the output stream
                              BufferedWriter addendumData = new BufferedWriter (new FileWriter(addendumOutPut, true));
                              System.out.println("The total number of voxels for " + fileName + " is: " + voxelValueVector.size());
                              System.out.println("The total number of voxels within tissue perimeter: " + tissuePerimeterCount);
                              System.out.println("The total volume of the brain (including csf) is: " + volumeBrainSurfaceCountour);
                              System.out.println("Volume of non-brain elements: " + volumeNonBrain);
                              System.out.println("Volume of brain elements: " + volumeParenchyma);
                              System.out.println("The BPF is: " + ratio);
                              System.out.println("BPF running count " + BPFratio);
                              addendumData.write("Stack " + fileName + "\n");
                              addendumData.write("Total volume " + " \t" + volumeBrainSurfaceCountour + "\n");
                              addendumData.write("Non-brain volume " + " \t" + volumeNonBrain + "\n");
                              addendumData.write("Parenchyma volume " + " \t" + volumeParenchyma + "\n");
                              addendumData.write("BPF " + " \t" + ratio + " \n" + "\n");
                              if (iterator == numOfFiles)
                                        addendumData.write("boo");
                                        normalizedBPF =  BPFratio / volumeTotal;
                                        System.out.println("normalized BPF is " + normalizedBPF);
                                        addendumData.write("Running Paryenchyma volume" + "\t" + volumeTotal + "\n");
                                        addendumData.write("total BPF" + "\t" + BPFratio + "\n");
                                        addendumData.write("Normalized BPF" + " \t" + normalizedBPF + "\n");
                               addendumData.close();
                               //System.out.println("The running volume tally is " + volumeTotal);
                              //System.out.println();
                              //System.out.println(count);
                    catch (IOException e)
                             System.out.println("IOException:");
                           e.printStackTrace();
                    fileName++;
                    tissuePerimeterCount = 0;
                    parenchymaTissue = 0;
                    volumeBrainSurfaceCountour = 0; //area of brain within perimeter including csf etc...
                    volumeParenchyma = 0;
                    ratio = 0;
                    nonParenchymaVoxels = 0;
}it is quite a bit to read through. i can say that the results.txt file is created, but it contains no data. the line
                    System.out.println("the starting value is: " + fileName);   is there for me to find at what point where i think the code stops functioning properly. (line 86).
the error messages are saying that
1. the text file (61.txt) cannot be found.
2. the remaining 4 errors pertain to FileInputStream
any help is greatly appreciated.

it has been a few days, and i completely forgot to post that i figured out the problem. when we last checked in, i was having problems with a code that would function when i copied the java file to a folder where it would be executed. as i needed to do this hundreds of times, it made more sense to input a pathway so i could have just one file. the problem...adding in the pathway produced a text file that contained no data. i posted my quagmire in the java forum and waited. it was met with a flurry of enthusiam that tended more towards sarcasm. i did eventually conquer the problem, so, here it is...
outPut  = new FileOutputStream(filePath + " Results.txt");was changed to:
outPut  = new FileOutputStream("Results.txt");...problem solved, and the program works like a swiss watch.

Similar Messages

  • Active Directory and Samba issues

    When I updated a few of the computers here at work to Leopard, I tried mounting some authenticated samba shares here at work, and they worked just fine. However, with other users, it denies their password, and then re-prompts for the password, despite said password being correct. It doesn't appear to be related to administrator permission on the domain, either, because it denies me when I change my permissions to only have access to specific machines, instead of 'all computers'
    If you need any further information, I would be happy to give it.

    Hi
    I confess I don't know if this is in any way helpful or relevant but I do know changes have been made in Leopard viz Samba since you can no longer setup a Windows Printer via Samba in the GUI as you have previously been able to do. You can do it in CUPS but this isn't for all types of users. Thus I don't know if this has any bearing on your problem but it may help to look for more general based samba support changes.
    cheers

  • User synchronization issue between Active Directory and Solution manager.

    Requirement:
    Synchronize the users between Active directory and solution manager system.
    <u>What we did:</u>
    1.     Created RFC connection (LDAP_RFC) for LDAP connector.
    2.     Created new LDAP connector that utilize the RFC (LDAP_RFC).
    3.     Created new logical LDAP Server(CUA).Here we have to maintain the connection
    details to the physical directory.
    4.     We maintained the communication user that is used by the LDAP connector to bind the LDAP Directory Server.
    5.     In transaction LDAPMAP specific SAP data fields, we mapped to the desired
    directory attributes.
    6.     Testing from LDAP transaction working fine. We are able to see the attributes and
    values       from Active directory.
    <b><u>Issue:</u></b>
    When executed the program RSLDAPSYNC_USER for user synchronization from t-code se38 with below selection .
    LDAP Server = CUA (created earlier)
    LDAP Connector = LDAP_RFC (RFC connection created created ealier)
    In the tab: (Object that exist both in the directory and in the Database:)
    Selected: Compare Time Stamp.
    In the tab: (Objects the only exist in the Directory.)
    Selected : Create in Database.
    In the tab(Objects that only Exist in the Database:
    Selected: Ignore Object.
    Result from the report shows that connection to LDAP server is fine and ‘0’(zero) objects in Directory.
    The program does not create any new user in the Solution Manager system.
    Any help on this issue greatly appreciated.
    Thanks & Regards,
    Harish

    where did you see this error ? is there anymore details.
    i think the account you are using for Sync does not have Replicate Directory Changes permission in AD. follow below article and give Replicate directory changes permission.
    http://technet.microsoft.com/en-us/library/hh296982(v=office.15).aspx
    Thanks, Noddy

  • File Sender Adapter - Dinamic Source Directory and Filename

    Hi Experts,
    I have to receive in XI a file and depeding of some info, put it in diferent directories with diferent fieldnames.
    In receiver File Adapter we can set the directory and fieldname dinamically by ABAP-CLASS mapping, but not in Sender.
    I've read Michal's blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    and sap help
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
    But, I can't find Adapter-Specific Message Attributes in my File Adapter...:-) I've checked SP version is SP16, where are my Adapter-Specific Message Attributes?
    How can I set Directory and Fieldname at runtime for Sender File Adapter?
    Please help...
    Thanks all in advance,
    Regards.
    Urtzi.

    Hi Nilesh,
    Your threath is not about my issue...
    Answering to other friends, what I want is not to write p.e.: '/server/dir/' in each File Sender Adapter Channel, and put it with any other way looking some 'customizing' or checking a condition.
    The problem is that frecuently in the Company changes servers and we have to enter to the Directory and change every Channel one by one...We would like to reduce the maintain of the Channels with a mapping, variable, customizing table...or something similar. Do I explain?
    I don't know if its possible but I had the hope...:-)
    Thanks all.
    Urtzi.

  • My laptop will not let me install the latest version of iTunes, it says 'the installer has insufficient piviledges to access this directory' and tells me to log on as the administrator, even though I am logged on as the administrator. Please help!!

    My laptop will not let me install the latest version of iTunes, it says 'the installer has insufficient piviledges to access this directory' and tells me to log on as the administrator, even though I am logged on as the administrator. Please help!!

    Hi Caits1988,
    If you are having issues updating iTunes on your Windows machine, you may find the following articles helpful:
    iTunes: Missing folder or incorrect permissions may prevent authorization
    http://support.apple.com/kb/ts1277
    Apple Support: Trouble installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    Regards,
    - Brenden

  • Active Directory and many OUs

    Hello all,
    This topic might have been talked about before but after a lot of searching I still have not found a solution, so I ask for a bit of help.
    In our Active Directory there are many OUs where users are kept. There is no one top OU where you can start your search. I don't really know why it was set up this way and I don't have an option to change that. I would really like to have ou=users like most have!
    So when I try to authenticate a user (I'm installing DSpace in my uni) I cannot automatically add the OU for the user trying to log in and the users themselves don't know their OU (well, why would they!).
    I'm hoping there is some simple solution to this. Maybe JNDI API allows for searching in many OUs at the same time (some fixed list in the code)? Or maybe the OU is not needed at all in the search?
    Any help/hints would be appreciated.
    best regards, Logi

    For searching, you can issue a subtree search will search through the entire subtree, irrespective of how many levels of OU's may exist, by using SearchControls.SUBTREE_SCOPE
    Have a look at the tutorial at http://java.sun.com/products/jndi/tutorial/basics/directory/scope.html
    For authentication, you can either get the user to enter their:
    distinguished name
    (cn=Albert Eirnstein, ou=Research,dc=Antipodes,dc=com), although that is not entirely user friendly
    their NT style logon name (samAccountName)
    ANTIPODES\alberte, more user friendly,
    or their Windows 200 style logon name (userPrincipalName),
    [email protected], equally as user friendly.
    You may also want to look at some of the following posts:
    JNDI, Active Directory and Authentication (Part 1) (Kerberos)
    http://forum.java.sun.com/thread.jspa?threadID=579829&tstart=300
    JNDI, Active Directory & Authentication (part 2) (SSL)
    http://forum.java.sun.com/thread.jspa?threadID=581425&tstart=50
    JNDI, Active Directory & Authentication (part 3) (Digest-MD5)
    http://forum.java.sun.com/thread.jspa?threadID=581868&tstart=150
    JNDI, Active Directory & Authentication (part 4) (SASL EXTERNAL)
    http://forum.java.sun.com/thread.jspa?threadID=641047&tstart=0
    JNDI, Active Directory and Authentication (part 5, LDAP Fastbinds)
    http://forum.java.sun.com/thread.jspa?threadID=726601&tstart=0
    JNDI, Active Directory, Referrals and Global Catalog
    http://forum.java.sun.com/thread.jspa?threadID=603815&tstart=15

  • Open Directory and passwords

    Hi, I have come across something really odd someone pointed out to me with Tiger Server, and this is something I've not been able to duplicated on Panther Server, or at least I don't think I have been able to.
    The situation is this: There are three people in my workgroup who have "administrative" privileges for our small server cluster. When logging into one of the servers, it is possible for a person with administrative privileges to log into the server with any user existing user name, and use their own password, or the global administrative password to log into any account. This does seem weird to me. Is there an article somewhere that explains this? I've done a bit of searching, but am not sure on what I am looking for here.
    I am starting to work with Open Directory and LDAP sharing of login information across a series of three servers and am wonder if it might be linked to this, and why/how, etc. Anyone with any good or bad thoughts on this.
    Thanks so much.

    Hi trotter,
    In fact this is a feature called 'masquerading' by Apple which can be very helpful, particularly when when troubleshooting permissions issues on mouted volumes. It allows admins to mount volumes via afp 'as users'.
    It was first implemented for Apple servers back in ASIP 6, and the feature exists in both Panther and Tiger.
    If you don't want this feature you can uncheck Serrver Admin > AFP > Access > Enable Administrator to masquerade... I believe the box is unchecked by default so one of the admins must have checked it.
    IMHO it would also be very useful for admins to be able to have the options to masquerade to user OD/NetInfo accounts also.
    HTH,
    b.

  • Mod_osso and ssl issue

    running Oracle AS 10g (10.1.2).
    I have protected a directory with mod_osso (in mod_osso.conf).
    <Location /directory/*>
    require valid-user
    AuthType Basic
    </Location>
    I navigate to https://mydomain/directory, and it redirects to the SSO asking for my password as it should. I enter my details and submit... it then hangs and eventually reports "No response from web server....".
    I notice the URL is :
    http://domain/osso_login_success?urlc=v1.4~8DE....
    If I change it to https it works fine... so I need to configure the sso server to redirect to the ssl URL ....any ideas how ???
    thanks.

    I know this thread is over a year old, but I am having this very same issue, so I'd like to revive it and get an answer after all....

  • 10.6 home directory mounting with active directory and open directory integration

    Hi guys i am having some issues in my new mac environment. I have a windows network with an server 2008 active directory. I have just recentlly created a "magic triangle" setup with active directory and open directory. When my users login via windows their home folders mount perfect. When any user logs in to any iMac in the building it does not work. They login perfectly fine, but their home folders do not mount. When i try mounting them manually with smb, i get a prompt for credentials. I am thinking this is my issue, my Single sign on with kerbos is working but for some reason is not logging in correctly. If i type in my credentials with my domain first then my name it works.
    For example DOMAIN\jsmith works, but the way i think the mac and active directory is doing it now is just jsmith without the DOMAIN.
    I feel like this is the problem with the home folders not mounting.
    Can anyone provide some help with this?
    Thanks,
    Dani

    Hi dani190,
    are you using the fully qualified domain name of the network server? ie if your server is bob. and your domain is domain.company.com. then the FQDNS would typically be bob.domain.company.com or bob.company.com.
    If the FQDNS works, then have you checked in the AD to make sure the path to the network home folder uses the FQDNS?
    For the contact search path, did you put the AD at the top the list? (in directory utility)
    Did you set the WINS work group on your client computer to your domain?
    ie:Apple Menu, System Preferences, Network, Active Network Port (ethernet and or airport) , Advanced Button, WINS Tab, set workgroup to the name of your domain. ie domain.company.com and or company.com

  • I am trying to make a Shell call to Firefox in the C:\Program Files (x86)\Mozilla FireFox\ directory and LabView shell call gives an error.

    I am trying to make a Shell call to Firefox in the C:\Program Files (x86)\Mozilla FireFox\ directory and LabView shell call gives an errors. I can go to the DOS shell and make the call fine, but Labview Shell gives several errors. Anyone know how to get around the directory issue with Program Files (x86) directory name having the space in it and the (x86) that DOS does not seem to like?
    Solved!
    Go to Solution.

    You need to use quotes.

  • GNOME 3.12 Power and Graphics Issues

    Hello, this is my first post.  Please excuse any stupidity...I didn't mean it.  These issues seem related, so I am going to list them all here.  I have searched extensively for infomation on how to fix these problems over the past few weeks and have come up empty handed.  I will try to mention everything I think is relevant and be as concise as possible (but will probably fail).
    My Arch is installed on a desktop system, a GPT partition, no dual boot, and uses GRUB (efi) as boot manager.
    My packages are fully updated with both "gnome" and "gnome-extra" groups installed.
    Kernel is 3.14.2-1 (also tried 3.14.3 from testing - same behavior)
    Video is xf86-video-ati with a Radeon 6670 (same problems with a AMD 7950 and onboard Trinity APU)
    I did not use GNOME 3.10 so do not know if these problems existed in previous versions.  I switched to 3.12 from KDE (did a fresh install on a wiped HDD)
    Problems:
    1. When I boot the computer I see the boot messages and everything is fine.  When it gets done and tries to start GDM the screen turns black for approx 5 seconds and then returns to the boot messages for approx. 3 seconds.  Then the screen goes black again for approx. 10 seconds and finally GDM appears.
    2. Any time GDM is open, i.e. I have not logged in yet or have logged out of a previous session, and I go to a tty, log in as root or my user, and type "systemctl stop/restart gdm" the computer freezes (including the tty I am on).
    3. The blank screen setting in GNOME settings behaves strangely.  If I let it blank and then move the mouse it shows me that clock screen.  If I press escape and the lock screen is enable the clock plays an upwards animation, shows the lock screen, and when I log it shows my desktop, but for approx. 2 seconds none of my user settings (favorites, date in the clock, etc.) are applied.  After the 2 seconds the settings  violently flash into place.  When the lock screen is not enable (what I want), and I wake the screen I get the clock thing and when I press escape there is no upward animation.  The clock screen goes away immediately and then I get the desktop with the same delay in applying my settings.
    4. If the screen is blanked for a long time (it is hard to tell how long) and I move the mouse I get the clock but the computer is frozen.  I can kill X with Ctrl+Alt+Backspace and log back in and everything is normal.
    5. Suspend is utterly broken.  If I have both the blank screen and suspend timers turned on in the GNOME settings the screen will blank at the appropriate time but the suspend will never happen.  If I have the blank screen option off and auto suspend on the computer suspends but freezes on the clock screen.  In this case if kill X and log back in the desktop works but I have no graphical effects (fade, zoom, etc.).  As far as I can tell the only way to get them back is to reboot the computer.
    5.1 If I type "systemctl suspend" in a terminal the suspend happens, and when I wake the computer I am returned directly to the desktop (no clock), but the same graphics problem occurs.  Reloading the shell or logging in/out does not fix it.
    5.2 If I boot using "linux-lts" (currently version 3.10.39-1) and suspend using the GNOME setting I get the clock and can get back into the desktop but have the same graphical effects problem.
    5.3 If I edit the idle options in "/etc/systemd/logind.conf" the system becomes unstable (choppy effects, delayed keyboard input).  Even after a reboot.
    What I've Noticed:
    1. In both Cinnamon and Openbox "systemctl suspend" works as expected.
    2. Cinnamon's screen blanking and suspend functions work correctly.
    3. I tried lightdm, and when using GNOME no power settings work at all.  It seems these features are intrinsic to GDM now.  However, with lightdm I do not get the log in screen delay durring boot.
    4. I tried reinstalling the system thinking maybe something got corrupted somehow but it did not help.
    5. I tried removing all user settings files from my home directory and it did not help.
    6. There are other things I've done as suggested by the wiki or random forum posts, but none of that helped either and probably isn't worth mentioning.
    7. These issues are reproducable consistently with no variation.  I believe that these are bugs in GNOME's code, but thought I'd ask anyway (what do I know?).
    There are some interesting things in the system logs, but Google returns nothing useful.  There are tons of things in these logs that look important to me, so if you think a particular one will be helpful please tell me which one.
    I have found several things (forum threads, bug reports) that resemble what is happening to me, but they all claim that the problems have been fixed or suggest solutions that are not relevant to me (but have led me to believe that the problem is related to ati graphics).
    Thank you for your help.
    UPDATE:
    It seems this is a problem with GDM.  If I use Lightdm "systemctl suspend" works fine when logged into GNOME.  Screen blanking works fine with Xscreensaver.  Unfortunately Xscreensaver turns the screen off when I'm watching videos, so it is useless to me.  I guess the solution for now is to turn the monitor off when I leave the computer and use a terminal and the sleep command to suspend (logind idle settings don't do anything at all with Lightdm, I guess).  This is a terrible solution, but I guess it will have to do until a fix is released, if it ever is.
    Last edited by d81 (2014-05-10 23:28:30)

    @Strider:
    Concerning the second part: Gnome uses tracker to index music, videos etc. globally.
    Which directories are indexed can be configured under system settings > search > [cog menu].
    There you can add the /videos folder to the indexed folders.
    I'm not sure whether this also solves the first problem.

  • Moved Home Directory and Cannot Log In

    Seeking a little advice due to my being a little silly.
    Moved my Home Directory over to my Opti-Bay Drive, changed the path in Accounts etc and then restarted. When trying to log back in to my system I get the following message:
    You are unable to log in to the user account "XXXX" at this time.
    Why Silly? Just before I moved my Home Directory over I had formatted the new drive as Encrypted. Am guessing that this is stopping me from logging in?
    So how can I go about resolving this issue?
    Many thanks in advance for any help!

    Managed to resolve the issue.
    Ripped the drive with my Home Directory out of my MBP and connected it to another MBP as an external USB drive. Copied off my Directory and then formatted said drive as just Journaled. Installed back in to main MBP and all works

  • Powershell read a file in directory and write to a SQL table

    hey guys i have an issue here and dont really know where to begin. I need a powershell app to watch a directory and whenever a new file gets generated that file name gets written to a SQL database table.
    can someone point me in the right direction im literally clueless on this one.
    Thanks
    Rich T.
    Rich Thompson

    Search in the gallery for "FileSystemWatcher"
    ¯\_(ツ)_/¯

  • Solutions to Some DNS, OD, AFP, CalDAV, AFP, and Spotlight Issues

    I recently upgraded our aging Xserve (1.3GHz G4, yeah baby!) to Leopard Server from Tiger Server so everything in the office would all be on the same OS. This server hosts all our in-use files via an Xserve RAID, and our dead files are on the internal 3-disk striped array. It's also the Open Directory master and hosts the office's DNS (I wanted to put OD and DNS on the new Xeon Xserve that hosts our FileMaker database, Retrospect backup, and our Squid web proxy, but something in its DNS configuration is broken and I gave up on that since OD and DNS don't really put any additional stress on the G4). Anyway, with all the hoopla of configuring, reconfiguring, and fixing, I've learned some things that may help others.
    *DNS, Open Directory, and AFP*
    I had some trouble with groups and ACL permissions, inability to get CalDAV working, and general strangeness with OD and Workgroup Manager. Demoting the server from an OD master to standalone took care of most of these. Part of the problem was an incorrect LDAP search base, which can only be corrected by blowing away the OD master and making sure DNS is set up properly. We only have about 20 users (we don't host network homes or anything like that), so when I did the demotion I just let it destroy all the accounts, and after promoting the server back to an OD master, I recreated the users and groups from scratch. So with freshly created users and groups, and after resetting the ACL's and propagating permissions on the network shares, that cleared up the permissions problems. The corrected LDAP search base fixed the Directory application too, which wasn't showing any contacts before, and it got Kerberos working as well.
    iCal/CalDAV
    All this work also got CalDAV/iCal calendar sharing running, and when I enable calendaring for a user, it stays enabled in WGM. Before, whenever I'd switch to another user and come back, calendaring would be turned off in WGM, although it was in fact still enabled. I haven't tested calendaring much yet, and adding an account in iCal is still a bit flakey. Our DNS is just internal, so in Server Admin I un-checked "fully-qualified" for our few DNS hostnames. If I mark the server's DNS hostname as fully-qualified, auto-discovery of the address in iCal won't work. iCal rejects my passwords if Kerberos authentication is used in either case, even if I manually point it to the IP address, but it connects fine without Kerberos.
    *Spotlight and AFP*
    Another problem I had after upgrading the server was stale spotlight searches. I used Server Admin to turn spotlight searching on and off for the two shares, and I tried any number of mdutil commands and System Preferences "privacy" settings to turn indexing on and off and to rebuild the indexes. With the old machine and about a terabyte of data, indexing would take all night, so I couldn't really try a lot of things. Every time the index was rebuilt, it would propagate out to the office just fine, but it would never update from then on. The solution to that was changing the permissions on the volumes the shares are on. The shares themselves had the correct permissions and ACL's, but the volumes need their POSIX permissions set to:
    owner: root: read/write/execute
    group: admin: read/write/execute
    everyone: read/execute
    Over the years those permissions had been changed (this server started out with OS X 10.2 Server btw, so there's been plenty of time for things to get b0rked), but Tiger Server apparently didn't care. Another thing I did (although I'm not sure if this was necessary) was to change the "Others" POSIX permission from None to Read Only. Once all that was changed, mdworker started chugging along to keep the spotlight index updated. However, it went nuts after the 10.5.6 Server update, constantly working with no sign of ever finishing. The update notes do make specific mention to Spotlight changes, which says you have to disable spotlight indexing for any shares in Server Admin, then re-enabled it to "take advantage of the new features." That started another night of indexing, but it's now done and updating properly. I noticed that a new inherited ACL for the user "Spotlight" showed up at the root level of each share point. I'm not going to touch that.
    I'll admit that I hate spotlight's interface and lack of control in Leopard (i.e. it always resets your search parameters, you can't change the results window's columns, and you have to already be in the folder you want to search, etc.). That being said, I can search for anything on the server and it finds the results almost instantly. Even a search that returns "more than 10,000" results only takes about 5 seconds. With Tiger or Panther server, ANY search would take several minutes and grind the server to a halt, making anyone else who tried to save a file or navigate the shared volumes get the spinning beach ball.
    Hopefully this will be of help to someone.

    Hi.
    You've not outlined your issues with AFP per se, having any ?
    DNS is critical for OS X Server, it's appropriately finicky about working forward & reverse DNS lookup for its FQDN.
    Certainly, Leopard Server may make assumptions contrary to your intent, if using the non-advanced setups, as it will attempt to use DNS and if not available, this may result in settings other than you desire.
    By default, hostnames entered in the Server Admin DNS settings, will be considered as part of the DNS zone you're editing.
    So:
    server
    would be for: server.yourfqdn.com
    If you mark that as fully qualified, well, then it's looking for: server
    which is not a FQDN
    As well, I believe Apple states it should no longer be necessary, but if you do need to change the hostname for your OD master, it is often possible via the Termina/command-line via:
    (sudo) changeip
    http://developer.apple.com/documentation/Darwin/Reference/Manpages/man8/changeip .8.html

  • Erratic Mouse and Keyboard issues...with weird console log...

    Hello All,
    I recently installed Snow Leopard on my 2x2.8 Quad Core Mac Pro following a boot drive melt down. Apple replaced the drive via Apple Care and I re-installed all my apps. The only additional item of note is I have Lycom SATA four port card that required a driver update.
    Since setting up this machine with the new OS I am having massive issues with keyboard lag, erratic mouse movement and intermittent freezing.
    I've run tech tools deluxe and everything passes with that app. I cant find the original install disks so running AHT on this machine isn't going to happen.
    I've tried with and without the driver and the issue seems to still be there.
    On a whim I opened console and I am seeing this message hundreds and hundreds of times over...
    8/8/10 2:21:11 PM com.apple.launchd[1] (org.xinetd.xinetd[2652]) Exited with exit code: 1
    8/8/10 2:21:11 PM com.apple.launchd[1] (org.xinetd.xinetd) Throttling respawn: Will start in 10 seconds
    8/8/10 2:21:21 PM com.apple.launchd[1] (org.xinetd.xinetd[2655]) posix_spawn("xinetd", ...): No such file or directory
    Anyone got any thoughts on this?
    Thanks,
    Scott

    Jstys92,
    Heat?  Motherboard?  Sounds like hardware since it's across Operating systems...
    If you have a warranty, this is the time to call HP.
    HP Product Warranty Check
    Contact HP - Worldwide
    Contact HP - USA
    If not, I still think you have a HW issue.  It is relatively consistant, too.  Like something is breaking down - physically.  Not a disk - BIOS... notherboard... something that holds everything together.
    Computers are not supposed to warm up and then start doing whatever they want.
    We do not live it in that world, at least not yet.
    ===========================================================================
    You could run some Diagnostics.  The UEFI Diagnostics, if you don't already have them on your system, are very good and provide a decent "human interface".
    HP System Diagnostics (UEFI)
    Description:   This package provides the HP System Diagnostics (UEFI) for the supported notebook/laptop models and operating systems. HP System Diagnostics is a UEFI-based hardware diagnostics program that is used to validate if a system is functional enough to start up the operating system. The diagnostics are accessed during startup by pressing F2 immediately after power on.
    =========================================================================
    Good Luck!
    We work hard to help!
    Whenever you see a Helpful Post - Click the Kudos Star on the Left as Thanks!
    Did this Post solve your problem?  Mark it “Accept as Solution”!
    Note: You can find the “Accept as Solution” box on threads started by you.
    2012 Year of the Dragon!
    Kind Regards,
    Dragon-Fur

Maybe you are looking for

  • Saved PDF from Stored Procedure missing application item in report header

    I am able to create and save the pdf from a stored procedure however the application item that contains the date is blank in the saved pdf. Report title displays correctly when running via APEX. I have tried to set this value with, apex_util.set_sess

  • SetStyle method deprecated in FB4 beta 2?

    Hi, I've recently (been forced to..) move from fb4 beta 1 to beta 2. The project I've been working on no longer compiles in beta 2 it seems.  The error is that the setStyle method is undefined on the INavigatorContent interface.  This worked fine wit

  • Blocking Service Call alerts

    When a Service Call is added andassigned to a 'Handled By' person, standard SBO functionality sends an alert message to the person. Is there any way to block these messages or prevent them from being generated without disabling the entire message ser

  • The "Poster" function option is disabled or greyed out.  What's the fix?

    I have a PDF that is at 8x11.  I want to enlarge and print across multiple pages (4 pages by 4 pages) but the Poster button is greyed out and won't let me select it.  I've even tried enlarging the page size but that doesn't fix the issue. 

  • Table for Basic Data text

    Dear All, In which table for a material, Basic Data text can be seen. Please advice. Regards