[WNYLUG-Users] wtf java - SOLVED

David J. Andruczyk djandruczyk at yahoo.com
Fri Feb 19 18:46:48 EST 2010


>From some googling,

from: http://www.baskent.edu.tr/~tkaracay/ders/prg/java/api/java/io/File.html
The default temporary-file directory is specified by the system property java.io.tmpdir.  On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; 

You may be able to override this on a per user basis, for your java app if it has some sort of startup wrapper, where you can re-define java.io.tmpdir to be a per-user location.

i.e.
java -Djava.io.tmpdir=/tmp/username  /path/to/jar/file


-- David J. Andruczyk




________________________________
From: Cyber Source <peter at cybersource.us>
To: Western New York Linux Users Group Users Mailing List <users at wnylug.org>
Sent: Fri, February 19, 2010 9:43:26 AM
Subject: Re: [WNYLUG-Users] wtf java - SOLVED

I ran lsof (lots of output on an LTSP server) and found that after
files were being read and written by the java process all over the
place. It was writing files into /tmp that were only writable by that
user based on the internal IP, and being an LTSP server, everyone had
the same IP but different users and uids of course. So, cleared out the
files in /tmp that were written and then another login could go to the
site and the java applet fired up just fine. In conclusion, I told them
they should just assign one login to do the work at this site and
that's not a problem, otherwise, I could have done some more work like
make a script that changes the perms on the files or just deletes them
but they don't need that so, case closed.
Thanks for the heads up on lsof that led to the path of discovery. Peter

Cyber Source wrote: 
Lsof, I forgot about that one, thanks, I'll give that a
>shot
> 
>
>>Sent from my iPhone
> 
>
>>On Feb 18, 2010, at 1:45 PM, Dennis Ruzeski <denniruz at gmail.com> >wrote:
> 
>
>
>I think the easiest way would be to go to the
>>site while an lsof
>> 
>>>>session was capturing output to a file and then go through it.
>> 
>>
>>>>--Dennis
>> 
>>
>>
>>>>On Thu, Feb 18, 2010 at 1:38 PM, Cyber Source
>><peter at cybersource.us> wrote:
>> 
>>
>>It's gotta b something like that, how could
>>>one watch what file, if any,
>>> 
>>>>>>would b written at any instance?
>>> 
>>>
>>>>>>Sent from my iPhone
>>> 
>>>>>>On Feb 18, 2010, at 1:03 PM, Christopher Hawkins
>>><chawkins at bplinux.com> 
>>>>>>wrote:
>>> 
>>>
>>>>>>Maybe their application stores an authentication token on the LTSP
>>>server
>>> 
>>>>>>and is checking for that when someone attempts to login. If it being
>>>stored
>>> 
>>>>>>in a non user specific directory, they will be seen as already logged
>>>in.
>>> 
>>>>>>Can you look for files that change or are created right when you login
>>>as
>>> 
>>>>>>that first user?
>>> 
>>>
>>>>>>Chris
>>> 
>>>
>>>>>>----- "Cyber Source" <peter at cybersource.us> wrote:
>>> 
>>>
>>>
>>>>
>>>I thought that as well but from my network, I can login from multiple
>>>pcs,
>>> 
>>>>>>no problem
>>> 
>>>
>>>
>>>>>>>>Sent from my iPhone
>>>> 
>>>>>>>>On Feb 18, 2010, at 12:05 PM, "David J. Andruczyk"
>>>><djandruczyk at yahoo.com> 
>>>>>>>>wrote:
>>>> 
>>>>
>>>>
>>>>
>>>
>>>The problem is probably with their java
>>>>application..
>>>> 
>>>>>>>>It probably is set to limit logins to one per IP.  Since your client is
>>>> 
>>>>>>>>behind a NAT firewall, everyone shares that external IP),  that may be
>>>>the
>>>> 
>>>>>>>>cause of the issue.
>>>> 
>>>>
>>>>>>>>>From your description the issue doesn't appear to be on your end,  but
>>>> 
>>>>>>>>with their JAVA application.
>>>> 
>>>>
>>>>
>>>>
>>>>>>-- David J. Andruczyk
>>> 
>>>
>>>
>>>>
>>>>
>>>>
>>>>
>>>________________________________
>>> 
>>>>>>From: Cyber Source <peter at cybersource.us> 
>>>
>>>To: Western New York Linux Users Group
>>>>Users Mailing List
>>>> 
>>>><users at wnylug.org> 
>>>>>>>>Sent: Thu, February 18, 2010 9:30:32 AM
>>>> 
>>>>>>>>Subject: [WNYLUG-Users] wtf java
>>>> 
>>>>
>>>>>>>>Have I ever mentioned that I *ucking HATE java!!!!!
>>>> 
>>>>>>>>Could anything be more complicated, piece mealed and convoluted???!!!
>>>> 
>>>>
>>>>>>>>I've spent the past 2 days trying to figure out what the problem is
>>>>with
>>>> 
>>>>>>>>connecting to a clients vendors web site that requires authentication
>>>>to
>>>> 
>>>>>>>>their web site via a java popup login. After many many tries of
>>>>different
>>>> 
>>>>>>>>things like using icedtea vs actual java for the plugin, different
>>>>versions
>>>> 
>>>>>>>>of firefox, even trying IE, I get the same result. The java window will
>>>>ONLY
>>>> 
>>>>>>>>pop up for one user (not speaking simultaneously). If I connect once
>>>>logged
>>>> 
>>>>>>>>in with user "peter", then it will NOT work if logged into the network
>>>>as
>>>> 
>>>>>>>>anyone else, no matter what the changes above. And then it will ONLY
>>>>work
>>>> 
>>>>>>>>logged in as "peter". However, if I'm NOT on their network, I can log
>>>>in
>>>> 
>>>>>>>>fine from anywhere else no matter what the user I'm logged into the pc
>>>>with.
>>>> 
>>>>
>>>>>>>>So this leads me to think it must be something on their network. This
>>>>is
>>>> 
>>>>>>>>in an LTSP environment so essentially all users have the same internal
>>>>IP.
>>>> 
>>>>
>>>>>>>>Is there some "system wide" setting for java that needs to be set other
>>>> 
>>>>>>>>than putting the plugin for java in where firefox will read it, of
>>>>course?
>>>> 
>>>>>>>>I have a devil-linux box setup as a router that has worked flawlessly.
>>>>On
>>>> 
>>>>>>>>that router I can run iptraf and indeed see the connection to their
>>>>site on
>>>> 
>>>>>>>>port 50000. Could something be stuck/stale on the firewall causing this
>>>>not
>>>> 
>>>>>>>>to work because again, essentially, all users are using the same IP
>>>> 
>>>>>>>>internally and then when the java applet tries to run, it can't build
>>>>what
>>>> 
>>>>>>>>it needs because the user has changed? i.e. when using the
>>>>gcjwebplugin, I
>>>> 
>>>>>>>>could see it create 2 symlinks in ~/.gcjwebplugin when connecting under
>>>>user
>>>> 
>>>>>>>>peter's login. It would create the symlinks under other users logins
>>>>but it
>>>> 
>>>>>>>>would bitch about not being able to build things and the applet would
>>>>die
>>>> 
>>>>>>>>(running firefox from command line and seeing output).
>>>> 
>>>>
>>>>>>>>Right now my suspicions are with the firewall but with the LTSP
>>>> 
>>>>>>>>environment, I'm not sure. If you haven't clicked off this message by
>>>>now,
>>>> 
>>>>>>>>any ideas anyone?
>>>> 
>>>>>>>>TIA
>>>> 
>>>>
>>>>
>>>>>>>>--
>>>> 
>>>>>>>><logo.jpg>
>>>> 
>>>>>>>>115 Richfield Road
>>>> 
>>>>>>>>Williamsville, New York 14221
>>>> 
>>>>>>>>716-553-8525
>>>> 
>>>>
>>>>
>>>>>>_______________________________________________
>>> 
>>>
>>>Users mailing list
>>>> 
>>>>Users at wnylug.org 
>>>>http://wnylug.org/mailman/listinfo/users_wnylug.org 
>>>>
>>>>
>>>
>>>_______________________________________________
>>>>Users mailing list
>>>> 
>>>>Users at wnylug.org http://wnylug.org/mailman/listinfo/users_wnylug.org 
>>>>
>>>>>>_______________________________________________
>>> 
>>>>>>Users mailing list
>>> 
>>>Users at wnylug.org 
>>>http://wnylug.org/mailman/listinfo/users_wnylug.org 
>>>
>>>>>>_______________________________________________
>>> 
>>>>>>Users mailing list
>>> 
>>>Users at wnylug.org 
>>>http://wnylug.org/mailman/listinfo/users_wnylug.org 
>>>
>>>
>>>
>>>>_______________________________________________
>> 
>>>>Users mailing list
>> 
>>Users at wnylug.org 
>>http://wnylug.org/mailman/listinfo/users_wnylug.org 
>>
>>_______________________________________________
> 
>>Users mailing list
> 
>Users at wnylug.org 
>http://wnylug.org/mailman/listinfo/users_wnylug.org 
>

-- 
Cyber Source 
115 Richfield Road 
Williamsville, New York 14221 
716-553-8525 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://wnylug.org/pipermail/users_wnylug.org/attachments/20100219/a805fe47/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo.jpg
Type: image/jpeg
Size: 4003 bytes
Desc: not available
URL: <http://wnylug.org/pipermail/users_wnylug.org/attachments/20100219/a805fe47/attachment-0001.jpg>


More information about the Users mailing list