Eclipse Glassfish 4.0 Unable to start server on time - java

I fight with glassfish on eclipse through 2 days and I still can't run my server. When I try to start my server, (loading) progress bar hangs on 69% and obtain message like:
Unable to start server on time
java.util.concurrent.timeoutexception
Server does something like that:
1. [Starting, synchronized] (btw. in web browser server works only for few seconds but still doesn't see index.html. It displays default page of GlassFish server with message Your server is now running and then localhost doesn't want to respond anymore)
2. [Stopped]
and I can't achieve state of server: [Started, synchronized]
Btw. I was using Tomcat Server and i hadn't issues to start it.
I have:
Windows 7 x64
Eclipse Kepler
JDK 1.8
JRE 1.8
GlassFish 4.0 - which I downloaded using Eclipse
and here are logs from console:
Running GlassFish Version: GlassFish Server Open Source Edition 4.0 (build 89)
Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Grizzly Framework 2.3.1 started in: 60ms - bound to [/0.0.0.0:8�080]
Grizzly Framework 2.3.1 started in: 0ms - bound to [/0.0.0.0:8�181]
Grizzly Framework 2.3.1 started in: 0ms - bound to [/0.0.0.0:4�848]
Authorization Service has successfully initialized.
Grizzly Framework 2.3.1 started in: 0ms - bound to [/0.0.0.0:3�700]
Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
GlassFish Server Open Source Edition 4.0 (89) startup time : Felix (1�824ms), startup services(940ms), total(2�764ms)
HV000001: Hibernate Validator 5.0.0.Final
Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...
Grizzly Framework 2.3.1 started in: 0ms - bound to [/0.0.0.0:7�676]
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#13dbed9e as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl#41da3aee.
JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://Risen-Komputer:8686/jndi/rmi://Risen-Komputer:8686/jmxrmi
What can I do to stary my GlassFish on Eclipse Kepler IDE ?

This is a known bug with GlassFish tools for Eclipse.
There is an open issue on the GitHub repository for Payara (derived from GlassFish) which applys to Mac OS X and Windows:
https://github.com/payara/Payara/issues/370
The only workaround there currently is to:
do everything manual (start/stop/deploy GF from command line) and then just attach Eclipse via a remote debugger

Related

Why did JBoss start before it was deployed?

My application architecture is: ear->war (based on Maven).
The IDE I use is IntelliJ IDEA.
I used the exploded mode to deploy.
My JBoss version is 4.2.
Why did JBoss start before it was deployed?
The log of JBoss startup is as follows:
16:07:06,838 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] Started in 5s:842ms
Connected to server
[2019-02-01 04:07:06,856] Artifact application-jiangsu:ear exploded: Artifact is being deployed, please wait...
16:07:06,867 INFO [EARDeployer] Init J2EE application: file:/Users/zhanshifeng/Documents/ccssoftDocument/workSpace/js-zhdd-idea/application-jiangsu/target/application-jiangsu-1.0.77-SNAPSHOT.ear/
16:07:07,147 INFO [EARDeployer] Started J2EE application: file:/Users/zhanshifeng/Documents/ccssoftDocument/workSpace/js-zhdd-idea/application-jiangsu/target/application-jiangsu-1.0.77-SNAPSHOT.ear/
[2019-02-01 04:07:07,155] Artifact application-jiangsu:ear exploded: Artifact is deployed successfully
[2019-02-01 04:07:07,155] Artifact application-jiangsu:ear exploded: Deploy took 299 milliseconds
JBoss deployment requires communication with the server via JXM so that IDE can instruct it where the web app is located and ask it to load it from that location. Obviously, it's not possible when the server is stopped.

Deploying maven java web project in netbeans on a remote glassfish server is failing

I have a java web project working fine on my local glassfish server. I need to deploy it to a remote glassfish server using netbeans so I setup the server on an AWS instance of ubuntu and successfully connected it with netbeans.
I am able to see the resources under the server in netbeans services pane but when am trying to deploy the project, its failing with following logs:
Running Log:
Deploying on GlassFish Server (AWS)
profile mode: false
debug mode: false
force redeploy: true
Distributing /xxxx/xxx/yyyy/target/yyyy-1.0.war
GlassFish Server (AWS), deploy, null, false
IDE Log:
INFO [glassfish]: Requested Entity: public id = -//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN, system id = http://glassfish.org/dtds/glassfish-resources_1_5.dtd
INFO [null]: Last record repeated again.
INFO [org.netbeans.modules.glassfish.tooling.admin.RunnerHttpDeploy]: IO exception caught in handleSend() method:
java.io.IOException: Error writing request body to server
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3518)
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3501)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:255)
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:360)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:377)
[catch] at org.netbeans.modules.glassfish.tooling.admin.RunnerHttpDeploy.handleSend(RunnerHttpDeploy.java:267)
at org.netbeans.modules.glassfish.tooling.admin.Runner.handleHTTPConnection(Runner.java:828)
at org.netbeans.modules.glassfish.tooling.admin.Runner.call(Runner.java:939)
at org.netbeans.modules.glassfish.tooling.admin.Runner.call(Runner.java:73)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:259)
at org.netbeans.modules.maven.j2ee.execution.DeploymentHelper.perform(DeploymentHelper.java:208)
at org.netbeans.modules.maven.j2ee.execution.ExecutionChecker.executionResult(ExecutionChecker.java:93)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:315)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Server Log:
-- nothing --
The IDE is telling me to check the server logs for more details but server does not have any logs (I cleared the logfile before deploying the project, so there is no server stating info but it is running fine as I am able to access it from the browser and cmdline).
One more things, though the version of both the servers are same, the remote server only have web profile installed whereas the local is the installation done along with netbeans.
The config details are:
Project - Maven web app
Netbeans 8.2
Glassfish 4.1.1
Remote OS: Ubuntu 16 LTS
Local OS: Fedora 25
Please ask for any more info required.
Thanks.

Eclipse Mars JBoss EAP 6.2 - Remote connection failed

When I try to start JBoss EAP 6.2 in Eclipse Mars the console output always end with:
2016-03-08 08:15:21,978 INFO [as] [.|||] JBAS015961: Http management interface listening on http://0.0.0.0:9990/management
2016-03-08 08:15:21,979 INFO [as] [.|||] JBAS015951: Admin console listening on http://0.0.0.0:9990
2016-03-08 08:15:21,979 INFO [as] [.|||] JBAS015874: JBoss EAP 6.2.4.GA (AS 7.3.4.Final-redhat-1) started in 6468ms - Started 471 of 614 services (118 services are passive or on-demand)
And then it's getting error periodically till it's terminated:
2016-03-08 08:08:48,810 ERROR [connection] [.|||] JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195725856
Nothing is being deployed (not from eclipse, either deployments folder is empty).
When I close Eclipse Mars and reopen the same workspace with Eclipse Kepler the JBoss EAP 6.2 strats fine.
Can anyone help?
This morning I tried to start JBoss and everything works fine, I really don't know what happend because I hadn't done anything. Never mind, everything works fine. Thanx guys for trying to help.

Can't build my project in NetBeans, I am using Glassfish Server. Every time when I run I got an error the module has not been deployed

GlassFish Server, deploy, SOCKS server general failure, false
D:\vaheed#i3\projects\recsol\nbproject\build-impl.xml:1048: The module has not been deployed. See the server log for details. BUILD FAILED`
Server Log
GlassFish Server Open Source Edition 4.1 (13) startup time : Felix (5,662ms), startup services(39,218ms), total(44,880ms)
Info: Grizzly Framework 2.3.15 started in: 3ms - bound to [/0.0.0.0:7676]
Info: Registered
com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl#194ccbc as OSGi service registration:
org.apache.felix.framework.ServiceRegistrationImpl#18948cd.
Info: JMXStartupService has started JMXConnector on JMXService URL
service:jmx:rmi://admin-PC:8686/jndi/rmi://admin-PC:8686/jmxrmi
please check the proxy server settings

Oracle Java EE First Cup Tutorial 2.1--GlassFish 3.1.2 Errors

I'm pretty familiar with Java SE and am just starting to learn Java EE and doing the First Cup Tutorial. I followed all of the instructions carefully. I am running this on my work computer (Windows 7) with a work firewall (Windows Firewall).
When I attempt to launch the GlassFish server I get this output in NetBeans:
Launching GlassFish on Felix platform
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
INFO: Grizzly Framework 1.9.50 started in: 9ms - bound to [0.0.0.0:3700]
INFO: Grizzly Framework 1.9.50 started in: 19ms - bound to [0.0.0.0:4848]
INFO: Grizzly Framework 1.9.50 started in: 51ms - bound to [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 33ms - bound to [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.50 started in: 2ms - bound to [0.0.0.0:7676]
INFO: The Admin Console is already installed, but not yet loaded.
INFO: SEC1002: Security Manager is OFF.
INFO: SEC1010: Entering Security Startup Service
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
INFO: SEC1011: Security Service(s) Started Successfully
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848]
INFO: WEB0171: Created virtual server [server]
INFO: WEB0171: Created virtual server [__asadmin]
INFO: WEB0172: Virtual server [server] loaded default web module []
INFO: Registering the Jersey servlet application, named org.netbeans.rest.application.config.ApplicationConfig, at the servlet mapping, /resources/*, with the Application class of the same name
INFO: WEB0671: Loading application [dukes-age] at [/DukesAgeService]
INFO: CORE10010: Loading application dukes-age done in 2,585 ms
INFO: GlassFish Server Open Source Edition 3.1.2.2 (5) startup time : Felix (1,388ms), startup services(3,239ms), total(4,627ms)
INFO: HV000001: Hibernate Validator 4.3.0.Final
INFO: Created EjbThreadPoolExecutor with thread-core-pool-size 16 thread-max-pool-size 32 thread-keep-alive-seconds 60 thread-queue-capacity 2147483647 allow-core-thread-timeout false
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080]
INFO: Grizzly Framework 1.9.50 started in: 3ms - bound to [0.0.0.0:8080]
INFO: Initiating Jersey application, version 'Jersey: 1.11.1 03/31/2012 06:49 PM'
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.50 started in: 2ms - bound to [0.0.0.0:8181]
INFO: REST00001: Listening to REST requests at context: /management/domain
INFO: The Admin Console is already installed, but not yet loaded.
INFO: The Admin Console is starting. Please wait.
**SEVERE: Exception while deploying the app [__admingui]
SEVERE: Failed to start Bundle Id [336] State [INSTALLED] [org.glassfish.main.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin):3.1.2.1-SNAPSHOT]
com.sun.enterprise.module.ResolveError: Failed to start Bundle Id [336] State [INSTALLED] [org.glassfish.main.admingui.glassfish-osgi-console-plugin(Glassfish OSGI Console Plugin):3.1.2.1-SNAPSHOT]
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:177)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:344)
at com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:124)
at com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:111)
at com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:135)
at com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
at com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:200)
at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:216)
at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:199)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:346)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
Caused by: org.osgi.framework.BundleException: Cannot start bundle org.glassfish.main.admingui.glassfish-osgi-console-plugin [336] because its start level is 2, which is greater than the framework's start level of 1.
at org.apache.felix.framework.Felix.startBundle(Felix.java:1807)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169)
... 12 more
SEVERE: Exception while deploying the app [__admingui]
INFO: The Admin Console application is loaded.
INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://MW7FVCH7MQLSJX.dir.svc.accenture.com:8686/jndi/rmi://MW7FVCH7M**QLSJX.dir.svc.accenture.com:8686/jmxrmi
INFO: Registered org.glassfish.osgi.felixwebconsoleextension.GlassFishBrandingPlugin#591e1b
INFO: defaultVirtualServer = server
INFO: No default web.xml
INFO: standardContext = StandardEngine[glassfish-web].StandardHost[server].StandardContext[/osgi]
INFO: No default web.xml
INFO: standardContext = StandardEngine[glassfish-web].StandardHost[__asadmin].StandardContext[/osgi]
The output lines that begin with "SEVERE:" look pretty bad. But then again, I'm a Java EE newbie.
The ultimate caused by in the stack you posted says:
Cannot start bundle org.glassfish.main.admingui.glassfish-osgi-console-plugin [336] because its start level is 2, which is greater than the framework's start level of 1.
You may want to do some research on the start level of the framework. Check out:
How is the OSGi bundle start level defined? or https://issues.apache.org/jira/browse/FELIX-2942.
There is also a GlassFish JIRA issue on this with a workaround:
http://java.net/jira/browse/GLASSFISH-18880

Categories

Resources