Recently I've got a strange Wildfly bug where I can't start my server properly.
When I start the server empty I've got:
[org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full
14.0.0.Final (WildFly Core 6.0.1.Final) started in 3430ms - Started 306 of 527
services (321 services are lazy, passive or on-demand)
Which is pretty standard but even tho it says started in 3430ms when I go on my servers tab the server says [Starting, Synchronized] and the only option I have is to terminate it rather than restarting it. It also don't update my WEB content directly and I have to restart the server every single time when I make a slight change which is extremely time-consuming. I've tried so far:
deleted .eclipse, deleted eclipse-workplace, install new eclipse ide, install new JBoss tool (4.9 final), using new/different Wildfly.
And none of these solved the problem.
the only option I have is to terminate it rather than restarting it
This feature was removed from Jboss Tools at version 4.5 when the direct toolbar buttons were removed. See https://issues.jboss.org/browse/JBIDE-24528
You can try to downgrade Jboss Tools
It also don't update my WEB content directly and I have to restart the
server every single time when I make a slight change
Check you have added the resources on the server. Right click on server -> Add and remove...
Once a resource is added wildfly should update automatically your changes, also you can right click on the resource and do a manual incremental or full publish.
Hope it helps.
After fixing "Port Offset" it works. Instead of offset 0 the field had the port number 8080. I had to recreate the server configuration in the server view (New / Server).
Related
I have a Java project which is deployed on remote JBoss server that I'm trying to debug using JPDA in IDEA.
The following was added to JBoss config to turn this feature on:
"JAVA_OPTS=$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
I created a new debug configuration in IDEA for the server and it seems that the port is opened and I'm able to connect:
Connected to the target VM, address: 'here's goes the IP:8787', transport: 'socket'
However, when I add breakpoints in the app it doesn't seem to stop executing the code.
There's a REST controller which is I'm absolutely sure should trigger the breakpoint when request is sent to the server. But for some reason that's not the case.
Here's what I've tried so far:
Invalidate Caches/Reset IDEA
Make request to server via Postman instead of browser
But with no luck.
The code on the server should match with my local project.
I'm pretty convinced that the problem has to be on my side.
I've only debugged applications deployed with Tomcat, maybe there's something specific about JBoss?
Might be related to IntelliJ IDEA: Breakpoint not being hit, and is shown without the tick, just a red dot since there's no ticks and also gradle is used.
In addition, I remember when I debugged a tomcat + maven project with JPDA and added breakpoint, IDEA would evaluate and calculate something for a considerable amount of time but in the current project there's no sign of it.
I got an issue with my environment I guess.
I use Eclipse Photon and WildFly 11 for Maven Projects.
The issue is when I start my WildFly server on Eclipse. I wait few seconds then I have the following message :
19:46:06,398 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final) started in 24044ms - Started 674 of 900 services (355 services are lazy, passive or on-demand)
But my server seems to not work correctly. I'll explain:
After I start the server and the message is displayed, I can access to localhost:8080/myproject but, when the timeout setting to start server is reach (450 seconds by default) the server stops. Like it wasn't fully started.
Furthermore, if I go to -> Servers -> WildFly 11 -> Server Details, I see the mention Not Connected and nothing else while I should get some folder like Attributes, Core Services, Deployments, etc.
I tried reinstall Eclipse, WildFly 11 and 13, and I tried with project in the server and with an empty server, with a new workspace... The issue is still there.
Has anyone ever had this concern or has any leads to solve it?
I need use Glassfish in a project we're currently working on in Eclipse IDE.
My problem is after installing Glassfish Tools in Eclipse I manage to correctly create a new glassfish server en SERVERS tab but when I try to start it the following error message pop up:
The Eclipse plugin cannot communicate with the GlassFish server....
The Eclipse plugin cannot communicate with the GlassFish server. A
GlassFish Enterprise Server may be running on the same admin or HTTP
port, but with a different root installation.Please also check for
antivirus software, firewall configuration, or VPN setup which might
block some ports.
Actually the problem looks more complex since not only I'm not able to start server but I cannot execute any action on server. Neither deploying, nor clean or whaterever else do work resulting in popping up the above message.
In the internet developers communities I only find clues about CREDENTIAL ERROR but this is not the case.
Looking in the Glassfish log folder there is no trace of any access attempt.
Everythings points at Eclipse plug-in neither be able to communicate with glassfish by any circumstance.
This issue occours either with Glassfish 3.1 (using jdk1.7) and 4.1 (using jdk1.8) and in Eclipse Luna and Mars.
I already tried to create, delete and manage glassfish domains (as suggested in other questions here at StackOverflow) to get over potential "credential-related" issues but no result.
Tried to uninstall and reinstall Glassfish Tools from Eclipse too but still no way.
Both Glasshfish 3.1 an 4.1 start flawlessly manually and NetBeans manage to start them without any problem but, as said, I need to work with eclipse so switching to NetBeans is not the solution (and, please, don't suggest me a manual deploy and server start).
As a last attempt, since I work in Windows, in a console window I tried this:
netstat -a -b
to verify no other service is "taking" port 8080 (although it doesn't seem to be a port problem but a "plug-in communication" one) but it resulted free.
I'm into this mess by days.
Please help.
Thank you
I had exactly the same problem. When I set "preserve sessions across redeployment" in the Eclipse properties dialog for GlassFish, tab "GlassFish", to false (true being the default), everything worked out fine.
I just set the proxy configuration in Eclipse menu Window -> Preferences -> General -> Network Connections (changing the Active Provider value from "Native" to "Manual" and inserting all the needed values for HTTP and HTTPS rows) and added "localhost" and "127.0.0.1" to the section "Proxy bypass".
I have faced the same problem. Generally, the programs that get dynamicly port numbers causes this. Etc: skype, teamviewer.
For me, I solved the problem with starting eclipse before them.
Maybe this works for you too.
I had the same problem, and I solved it by removing the glassfish server from Eclipse, and adding it again.
What I noticed in my own case was that other applications where using port number 4848, so I had to stop all use of port 4848 and restart the domain again ( restart glassfish server )
I've inherited a project which i'd like to test in JBoss - the problem is I cant get it to start within Eclipse. It works outside of Eclipse but I have to do a maven build, deploy the WAR files to JBoss and restart JBoss each time I make a change which is a nightmare.
In Eclipse I have added a JBoss 6 server, started it which appears to be fine (i.e. no errors in the console), then I try to run the 2 applications (one server then one client) - however nothing gets printed to the console log - no error or anything. It says started pretty much straight away. Just get a 404 error when going to the localhost:8080/name address.
I understand this may be difficult for someone to assist me here as there is no error message but if anyone has any suggestions or advice it would be much appreciated. I would have thought this should be simple but dont know what im doing wrong...
Eclipse may be running the JBoss server so it listens to a different port. Either that or the 8080 port is already bound so Eclipse can't open it.
Try configuring the JBoss project in Eclipse so it listens at a different port.
[Edit]
Here is a thread on jboss.org that discusses changing the port used by JBoss when running in Eclipse.
We upgraded from JBoss 4 (and JDK 5) to JBoss 5 (and JDK 6). The problem is that the start time has gone from 1.5 minutes (on JBoss 4) to more than 4 minutes.
18:53:35,444 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 3m:9s:262ms
It seems like the component that is taking JBoss the longest time to initialize is the JMX
18:50:41,926 INFO [LogNotificationListener] Adding notification listener for logging mbean "jboss.system:service=Logging,type=Log4jService" to server org.jboss.mx.server.MBeanServerImpl#1adc122[ defaultDomain='jboss' ]
18:52:38,797 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://lharel2/jndi/rmi://lharel2:1090/jmxconnector
From the DEBUG server log, I get these lines at the problematic time:
2009-12-18 18:51:00,886 DEBUG [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (main) vfsfile:/C:/QC/Views/QCDev/jboss-5.1.0.GA/server/default/deploy/jmx-console.war/ endpoint mappings:
2009-12-18 18:51:00,886 DEBUG [org.jboss.deployment.MappedReferenceMetaDataResolverDeployer] (main) Processing unit=jmx-console.war, structure: jmx-console.war
2009-12-18 18:52:35,209 DEBUG [org.jboss.deployment.OptAnnotationMetaDataDeployer] (main) Deployment is metadata-complete, skipping annotation processing, ejbJarMetaData=null, jbossWebMetaData=org.jboss.metadata.web.spec.Web23MetaData#1f, jbossClientMetaData=null, metaDataCompleteIsDefault=false
There is no EJB in the project.
The memory settings are:
-Xms128m -Xmx512m -XX:MaxPermSize=256m
Do you have any idea how JBoss start time can be improved?
Update: so far no luck, I tried shreeni's suggestion (changed the scanning xmls). The server is not running in debug mode so MicSim's suggestion is not relevant
A shot into the blue sky without more information
Network timeouts: 1,5 minutes of delay when deploying jmx-console.war may indicate a network timeout (e.g. 3 x 30 seconds). Try to start JBoss and bind it to a specific IP address using the -b command line argument or the jboss.bind.address system property. Also, try to make sure your host and DNS resolution settings on your system are correct.
JMX is also using RMI and you may want to set the RMI server host name as system property. On some Linux distributions, RMI has problems with looking up the correct hostname and jmx-console.war may try to connect to the 'wrong localhost'. The system property is java.rmi.server.hostname
System tracing: If that does not help, you may want to use strace to start the java process, so you can see the point where the system hangs (if it really does hang due to a network timeout or similar).
That is an awfully big gap in the logs. I suggest changing the log configuration to log everything at DEBUG level, rather than INFO. This will generate an awful lot more log entries, but hopefully will help you narrow it down.
The easiest way to do this is to set the -Djboss.server.log.threshold=DEBUG system property when you start JBoss
I had an issue like this but I found a good improvement by setting the initial and max heap size to same values, I mean:
-Xms512m -Xmx512m
With this, I improved from 4 to 2 minutes the starting time.
Your suspicion about the jmx-console can be misleading. There may be other components doing work in the background unrelated to the jmx-console. In my experience, we had an issue where a small war file appeared to take 3 minutes to load! It was innocent. The culprit was partly due to an EAR file with many wars and jars.
While I'm no expert, I would suggest the following:
Try turning up the logging to TRACE. By doing this, I witnessed one of the deployers (EJBDeployer, I think) unnecessarily scanning WARs in one of our EARs. I then manually disabled the scanning of those WAR files.
Run wireshark during the startup. I discovered some war files were hanging while waiting for a response from an external DTD request. Those websites were either now non-existent or would not properly serve the DTD files to java-based programs. I could speed it up by either having the programmers use local DTD files or mirroring those DTDs locally and having /etc/host loopback locally.
You could refer to this link to avoid unnecessary annotation scanning which could speedup your server start
See http://community.jboss.org/wiki/jboss5xtuningslimming especially the "Tuning" part.
I'm using JBoss 5.1.0 with a Macbook pro (2.26ghz 4gb) without applications it start in 54s
15:00:26,449 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 54s:720ms
I made a new configuration based on the "default". The JMS dataosurce points to a Postgres database instead of the "Hypersonic Database" (in memory database)
I suppose you are starting in debug mode. This mode can be up to 3 times slower than normal mode.
But there might be also a problem when switching from JDK5 to JDK6. I found this solution here on the net:
I've solved that. It's a debugging issue. I've changed my debug settings from:
wrapper.java.additional.26=-Xdebug
wrapper.java.additional.27=-Xnoagent
wrapper.java.additional.28=-Djava.compiler=NONE
wrapper.java.additional.27=-Xrunjdwp:transport=dt_socket,address=7199,server=y,suspend=n
to:
wrapper.java.additional.26=-Xdebug
wrapper.java.additional.27=-Xrunjdwp:transport=dt_socket,address=7199,server=y,suspend=n
and JBoss becomes fast again.
Hope this helps.
Do you need the JMX console application? Pragmatic thing would be to un-deploy it from the server, you could still use the jconsole or jvisualvm for basically the same thing.
Turn off annotation scanning and other features you don't need https://community.jboss.org/wiki/jboss5xtuningslimming
When you start/stop JBoss from eclipse, it does not clean up the tmp & work folders correctly. Setup an External Tool configuration and run a batch file to delete everything in tmp & work folders before each startup.
I was able to speedup running the "default" profile from 15/20 minutes to 5 minutes.