Intellij 14 Glassfish Server is not connected. Deploy is not available - java

I'm trying to get my web app, which was developed and deployed successfully in Eclipse, to run on Intellij, but I failed. So I'm trying to get a basic app to run on Intellij with Glassfish first.
I'm following the steps in this tutorial https://confluence.jetbrains.com/display/IntelliJIDEA/Getting+Started+with+Java+EE+7+and+GlassFish+4.0. However, I can't deploy my app on to glassfish server. When I start the server from Intellij, this message appears:
C:\glassfish\bin\asadmin.bat start-domain domain1
[2015-06-25 10:45:58,857] Artifact Glassfish:war: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 9090
Waiting for DAS to start .........
Started domain: domain1
Domain location: C:\glassfish\glassfish\domains\domain1
Log file: C:\glassfish\glassfish\domains\domain1\logs\server.log
Admin port for the domain: 4848
Command start-domain executed successfully.
I'm using Java 6 with glassfish 3.0.1 (required by my company).
Glassfish server & deployed apps are running perfectly with eclipse.
I can't find any solution on the Internet. Please kindly help.

I had the same problem and I did the following:
Run my IDE as an administrator in Windows.
Credentials I entered in the glassfish configuration for domain1 were incorrect.
here
I change the user and the password by user: admin and password: admin .Entering the directory:
/glassfish4/glassfish/domains/domain1/config
Open the file admin-keyfile and replace what I was for:
admin;{SSHA256}t6QSpkyxWhpNFiV3RQ+LYgVczWIJVylE3f6akcXTRLJm9MKs983QAA==;asadmin
Open the file local-password and replace what I was for:
6588CB5CBF61A96DB036AC047837A1C4468EC2C4
And ready new user and new password!and Enter the credentials in intellij.
I hope it helps you!

Related

NetBeans Deployment error: Starting of server GlassFish Server is not supported

I am using NetBeans 8.2, GlassFish4.1. When I right click my Java Web project and deploy, a GlassFish Administration Credential window pop up, and an error occurs as follows:
Deployment error: Starting of server GlassFish Server is not supported. Please, start the server manually.
How to get rid of this error?
Problem solved by setting password for admin and enable secure admin. Use the following command would help:
adadmin
change-admin-password
Please notice that the default user name is admin, default password is empty(just press enter).
enable-secure-admin
Enter user name and the new password you have just set.
restart-domain

start spring boot app installed in a server from another machine

I installed my spring boot application in another server (linux machine) with the following run jar :
java -jar myapp.jar --spring.profiles.active=dev
--spring.config.location=file:/opt/myapp/conf/application.yml
where in my application.yml , i defined the port 8081 which is available, with a context root myApp.
The start of the jar is going well, the DB connected, the app started with the profile dev, in port 8081 and with context myApp properly.
But when i tried to connect from other machine http://serverIP:8081/myApp , the browser sham me ERR_CONNECTION_TIMED_OUT and no adress exist with this name.
i tried to run the app in my machine and i can access with localhost.
I don't know what is the problem, maybe i'm missing somthing.
I also verified the port and it's open, the ping with ip server was responding also.
Maybe there are other conf that i missed ?
UPDATE:
i followed this link stackoverflow.com/questions/29885274/… , with the telnet serverIP 8081 told me no connection, so as the link explain that tomcat is not correctly connected to the ip chossen, in application.xml i added server.adress = serverIP, and the same problem shown

build-impl.xml:1045: The module has not been deployed error

Trying to setup glassfish server for netbeans. I started the server and ran the project(default web project) and it gives this error:
In-place deployment at C:\Users\Michael\Desktop\WebApplication2\build\web
GlassFish Server, deploy, null, false
C:\Users\Michael\Desktop\WebApplication2\nbproject\build-impl.xml:1045:
The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)
edit: server log: https://justpaste.it/u702
Become owner of the Tomcat directory.. On Linux or BSD do this:
chown -R username /usr/local/apache-tomcat-8.0/
To show how's use the command ls-l
He was root now will show your username.
*check in which path to the directory's Tomcat on your distro.

java 8 with Glassfish 4.1 Artifact HelloWorld:war exploded: Server is not connected. Deploy is not available

I create a simple java web service project in intellij idea and configured the glassfish 4.1 server. and just run the application. output window shows the following messages
C:\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
[2015-06-10 01:35:00,667] Artifact HelloWorld:war exploded: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 8080
server is running fine. but webservice is not deployed. can anyone help me.
I use java 8. intellij 14, glassfish 4.1 and windows 8.1
I followed following posts, but none of these are helps me.
post one , post two , post 03, post 04
I spend last two day to find an answer, please help me.
Check your Facets and your Artifacts are all right. Facets must have web deployment description and Web Resource description, the absolute path is all right.
Check the Artifact output directory, make directories:
WEB-INF/class/{your compile output},
the resource directory for example web app directory content.
I think the IntelliJ use ant as it's deployment tools, then you can image how it work, just denote the path the project need

IDEA failed to start a local glassfish server

I'm trying to start Glassfish 4.1 in Intellij IDEA 13.1.4. I've set basic settings in Run/debug configurations window - selected application server, jvm, put 2 artifacts to deploy, left startup/connection configurations default. When I try to start it the exception is thrown. Here is full stack trace:
/home/glassfish/glassfish/bin/asadmin start-domain domain1
Detected server admin port: 4848
Detected server http port: 8080
[2014-11-14 03:09:49,839] Artifact ss-ear:ear: Server is no connected.Deploy is not available.
[2014-11-14 03:09:49,839] Artifact ss-ear:ear exploded: Server is not connected. Deploy is not available.
java.nio.file.AccessDeniedException: /home/glassfish/glassfish/domains/domain1/logs/server.log.lck
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
at java.nio.channels.FileChannel.open(FileChannel.java:287)
at java.nio.channels.FileChannel.open(FileChannel.java:335)
at java.util.logging.FileHandler.openFiles(FileHandler.java:438)
at java.util.logging.FileHandler.<init>(FileHandler.java:318)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:99)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:192)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:228)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:124)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:322)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:366)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:300)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Command start-domain failed.
Before it died, it produced the following output:
Listening for transport dt_socket at address: 9009
Launching GlassFish on Felix platform
Exception in thread "main" java.lang.RuntimeException: the domain directory is not writable.
at com.sun.enterprise.glassfish.bootstrap.MainHelper.verifyDomainRoot(MainHelper.java:246)
at com.sun.enterprise.glassfish.bootstrap.MainHelper.findInstanceRoot(MainHelper.java:349)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:78)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
I'm using Ubuntu OS 14.04 LTS, java-1.7.0-openjdk-amd64.
Glassfish installed in /home/glassfish, asadmin script have 777 permissions.
Server starts when i run it from terminal, but not from IDE.
Please help, it makes me mad!
See this "java.nio.file.AccessDeniedException" it says all. Give permissions to the gassfish folder.
sudo chmod -R 777 /wherever-the-folder-is/glassfish-folder
Have you tried to start IntelliJ with sudo permission and start the server within the ide?
open CMD as Run as Administrator and then start the glassfish domain. so that the domain will start.

Categories

Resources