Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glassfish won't start from Intellij unless I run Intellij with sudo

Title says it all... just trying to get glassfish up and going. This is the error I get

Detected server admin port: 4848
[2015-04-06 07:37:56,138] Artifact java_web_app:war exploded: Server is not connected. Deploy is not available.
Detected server http port: 8080
Command start-domain failed.
JVM failed to start: com.sun.enterprise.admin.launcher.GFLauncherException: The server exited prematurely with exit code 1.
Before it died, it produced the following output:

This subcommand requires root privileges: bsexec

Surely there's a way around this? I don't really want to run Intellij with sudo every time.

like image 680
Mike P Avatar asked Apr 06 '15 23:04

Mike P


People also ask

How do I start GlassFish server from command prompt?

Open the Windows command line and navigate to the < GlassFish >/bin directory, where < GlassFish > is the directory where GlassFish Server version 4 is installed. Enter the command asadmin in the command line. The asadmin command will open a shell program in the command line that enables you to create a new domain.


1 Answers

Answer: GlassFish 4.1, IntelliJ IDEA 14.1

I have no idea (pun not intended) why GlassFish requires a root user account.

You need to execute something like this:

/Library/opt/payara-4.1.151/glassfish/bin/asadmin start-domain --verbose=true  domain1

Go Run -> Edit Configuration -> Select configuration (acme-payara-project) -> Start Up Configuration

Edit the Startup Script and change it to add the --verbose-true parameter.

like image 124
peter_pilgrim Avatar answered Dec 29 '22 00:12

peter_pilgrim