users@glassfish.java.net

RE: Can't stop glassfish on linux as user (CLI306 Warning)

From: Open Indiana <openindiana_at_out-side.nl>
Date: Tue, 28 Aug 2012 11:44:28 +0200

This problem has struck me more than once. But it is mostly a problem
created by myself (and you).

If you start Glassfish (by accident) under the wrong user-account (because
maybe you are in a hurry) then glassfish will create all files under that
user-account. If you forget this and you try to stop Glassfish while using
the other user-accountname it will not work.

See who owns {glassfish-dir}/domains/domain1/generated.

Try to stop glassfish the hard-way and re-own all directories under
{glassfish-dir}/domains/domain1 to the right user. Also the temp path for
glassfish needs to have the right ownership.



-----Original Message-----
From: vetler_at_gmail.com [mailto:vetler_at_gmail.com] On Behalf Of Vetle
Leinonen-Roeim
Sent: maandag 27 augustus 2012 14:36
To: users_at_glassfish.java.net
Subject: Re: Can't stop glassfish on linux as user (CLI306 Warning)

The BackingStoreException probably appears because the www-data user doesn't
have a home directory, or it isn't writable. Java apparently need this for
storing preferences.
You can override it and use a different directory with a JVM-option:
-Djava.util.prefs.userRoot=/some/writable/directory

On Mon, Aug 27, 2012 at 1:46 PM, <forums_at_java.net> wrote:
> I have suddenly ran into the same problem. Glassfish can be started
> with sudo -u www-data /mnt/persist/glassfishv3/bin/asadmin --secure
> start-domain
> domain1 but not stopped with sudo -u www-data
> /mnt/persist/glassfishv3/bin/asadmin --secure stop-domain domain1
> Also, I can no longer deploy webapps. server.log says:
> [#|2012-08-27T13:50:45.803+0200|WARNING|glassfish3.1.2|java.util.prefs
> |_ThreadID=23;_ThreadName=Thread-2;|Could
> not lock User prefs. Unix error code 2.|#]
> [#|2012-08-27T13:50:45.804+0200|WARNING|glassfish3.1.2|java.util.prefs
> |_ThreadID=23;_ThreadName=Thread-2;|Couldn't
> flush user prefs: java.util.prefs.BackingStoreException: Couldn't get
> file lock.|#] What's going on?
>
> --
>
> [Message sent by forum member 'tmpsa']
>
> View Post: http://forums.java.net/node/889274
>
>