Server not starting

LabKey Support Forum
Server not starting balter  2016-09-16 07:48
Status: Closed
 
I'm having a consistent problem with my server starting. I've tried rebuilding my dev environment multiple times, and run into the same problem.

I run debug (bug icon). It seems like the modules aren't getting loaded. Than build hangs with

    Sep 16, 2016 7:38:02 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2950 ms

At this point tomcat is running

If I try debug again, it stop with

    Disconnected from the target VM, address: '127.0.0.1:60319', transport: 'socket'
    Process finished with exit code 0

If I stop tomcat and verify with ps -ef | grep tomcat and debug I get the first error again.

I'm certain I have all of my run configurations set properly. In fact, I'm creating my dev environment again and again, and sometimes it will actually run a few times properly, but then I get the hang on server startup effect again.

I've attached the debug trace.

EDIT:
------
Just hit debug again and got a different trace which I've attached.
 
 
Steve responded:  2016-09-16 11:01
Hi Ariel:

I think the problem is you are running Tomcat 8.5, which is currently unsupported.
Just yesterday we updated our Supported Technology page, which does not include Tomcat 8.5.
See the docs here:
https://www.labkey.org/home/Documentation/wiki-page.view?name=supported

The latest Tomcat version that is currently supported is 8.0.x.

Thanks, Steve
 
balter responded:  2016-09-16 11:09
Interesting!!! I thought I was being so cool for being up to date. I'll try rolling back and see if I get success. Thanks!
 
balter responded:  2016-09-17 01:01
Still not working. Here is what I did:

1) Rolled back to tomcat 8.0.37
2) Updated CATALINA_HOME environment variable in my .bash_profile and sourced it (just to make sure)
3) Updated run configurations for 8.0.37
4) ran ant clean and ant rebuild
5) stopped tomcat
6) hit debug in IntelliJ

Still hanging at "INFO: Server startup in ..."

Attaching new trace.
 
adam responded:  2016-09-17 07:36
The exception clearly states the problem: "This server does not appear to be compiled for production mode". You are attempting to run in production mode with a server compiled in dev mode. You either need to start this webapp in dev mode (-Ddevmode=true) or compile a production build. See the Creating Production Builds page.

Also, I strongly suggest following all the recommendations on the Supported Technologies page. This shows the versions of all dependencies that we have tested thoroughly for compatibility. In particular, recently released Tomcat 8.0.37 introduced a change that causes our build to fail. At this point, we have addressed the problem only on the release16.2 branch.

Adam

 
balter responded:  2016-09-17 09:12
Hi Adam,

I have two configurations under the run configurations. LabKey_Dev has devmode set to true. LabKey_Production has devmode set to false. I thought that compiling with the debug button would automatically compile in development mode.

I just noticed the dropdown menu to the left of the compile button to select which configuration to compile! Set to my development configuration, it builds!

Fortunately, I have updated to 16.2 ;)

Thanks!

Ariel

 
adam responded:  2016-09-17 12:36
Glad to hear everything is working!

Just to clarify, we've been discussing three different, largely independent concepts:

  1. Development vs. production build. The ant task you choose (ant build vs. ant production) solely determines the kind of build you produce. IntelliJ knows nothing about compiling development vs. production builds.
  2. Development vs. production mode. Running a build in development mode enables dynamic re-compilation of JSP files, loading various resources from the source location, enhanced logging, and other conveniences for developers. Choosing an IntelliJ run configuration ("LabKey Development" or "LabKey Production") is one way to pick this mode.
  3. IntelliJ Run vs. Debug option. These buttons run the current build using the currently selected run configuration, and determine whether IntelliJ debugging is enabled or not.
These three are independent of each other, except that you must have a production build in order to run in production mode.

Adam