简体   繁体   中英

Glassfish start-domain failed

I don't know exactly the issue but after restart my machine, on windows 10 btw, glassfish won't start anymore. My log

Use "exit" to exit and "help" for online help.
asadmin> start-domain
Waiting for domain1 to start ..Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Listening for transport dt_socket at address: 9009
Error: Password file read access must be restricted: C:\dev\java\jdk1.7.0_51\jre\lib\management\jmxremote.password

Command start-domain failed.

Version = GlassFish Server Open Source Edition 3.1.2.2 (build 5) java version "1.7.0_51" Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Well I found solution

Open a command prompt window. Run the following command C:\\MyPasswordFile>cacls jmxremote.password This command displays the access control list (ACL) of the jmxremote.password file.

Set the access rights so that only your username has read access. When no users have been configured on the machine the default username is usually Owner, or a localized translation of Owner.

C:\\MyPasswordFile>cacls jmxremote.password /P Owner:R This command grants access to the user Owner with read-only permission, where Owner is the owner of the jmxremote.password file.

Display the ACL again. C:\\MyPasswordFile>cacls jmxremote.password This time, you will see that only the Owner has access to the password file.

Thats described here https://docs.oracle.com/javase/6/docs/technotes/guides/management/security-windows.html

The trick is changing permissions (on windows environment cacls) to your user and the magic is done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM