Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Windows Service will not install, see error below

Toby Pittman February 12, 2019

E:\>cd Program Files\Atlassian\JIRA\bin

E:\Program Files\Atlassian\JIRA\bin>service.bat install Jira
Installing the service 'JIRAServiceDesk281218110756' ...
Using CATALINA_HOME:    "E:\Program Files\Atlassian\JIRA"
Using CATALINA_BASE:    "E:\Program Files\Atlassian\JIRA"
Ignoring JAVA_HOME:        "E:\Program Files\Java\jdk1.8.0_192"
Using JRE_HOME:         "E:\Program Files\Atlassian\JIRA\jre"
Using JVM:              "E:\Program Files\Atlassian\JIRA\jre\bin\server\jvm.dll"
8 was unexpected at this time.

4 answers

1 vote
Peter Plazotta February 14, 2019

In "check-java.bat" modify following:

if %JAVA_11_ENABLED%==0 (
IF "%JAVA_VERSION%" NEQ "8" goto wrong_version
) else (
IF "%JAVA_VERSION%" NEQ "8" (
IF "%JAVA_VERSION%" NEQ "11" goto wrong_version
)
)

 

then the script output this:

C:\Program Files\Atlassian\JIRA\bin>service.bat install Jira
Installing the service 'JIRASoftware080317080834' ...
Using CATALINA_HOME: "C:\Program Files\Atlassian\JIRA"
Using CATALINA_BASE: "C:\Program Files\Atlassian\JIRA"
Ignoring JAVA_HOME: ""
Using JRE_HOME: "C:\Program Files\Atlassian\JIRA\jre"
Using JVM: "C:\Program Files\Atlassian\JIRA\jre\bin\server\jvm.dll"
Press any key to continue . . .
****************************************************************************
******* Wrong JVM version! JIRA requires 1.8 or 11 to run. *******
****************************************************************************

Toby Pittman February 14, 2019

Did this resolve your issue and were you able to get the windows service to install?

Brandon Hilk February 14, 2019

No, this gets the check-java.bat file to actually do what it's supposed to...sort of. It still isn't actually detecting the JVM version, but at least it's not erroring out. So no, the service installation still doesn't work.

Toby Pittman February 14, 2019

I am still unable to get the windows service installed either. My registry indicates Jira service installed as true as well. I’ve tried just about everything. I would think others are having similar issues and atlassian support would jump in and fix installer 4.0.0 as that is what originally removed the my Jira 3.16.1 windows service when I upgraded. 

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2019

Toby,

Apologies for the delay, as I was out of town.

I've discovered the issue you're encountering is this problem:

  • JRASERVER-68865 Manual installation of Jira 8.0.0 Windows service doesn't work

It appears to be associated with Jira 8.0 installations on Windows.

We have a workaround listed as follows, tested on Windows Server 2016:

  • Open a new Windows cmd as an Administrator
  • Please go the the JIRA installation Directory eg:
    cd C:\Program Files\Atlassian\JIRA 
  • Set the following windows environment variable as below:
     set JRE_HOME=.\jre 

    This is basically pointing to the JRE_HOME in this step, the path ".\jre" should be the path of the JRE and shouldn't contain spaces.
    You can also us an absoulute path like this:

    set JRE_HOME=C:\Progra~1\Atlassian\JIRA\jre
    

    The path in this case should use the 8 character form, the one without spaces.

  • Once the JRE_HOME Path is set and you are still in the installation directory: C:\Program Files\Atlassian\JIRA, run the service command as below:
     .\bin\service install jira 

This should allow the service to be installed.

Could you give that a try and let me know how it goes?

Shannon

Like # people like this
Toby Pittman February 19, 2019

Performed the steps you requested and still a no go. See error below.

Microsoft Windows [Version 10.0.17763.316]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\administrator.MID-MICHNET>e:

E:\>cd Program Files\Atlassian\JIRA\bin

E:\Program Files\Atlassian\JIRA\bin>service install jira
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Service will use the bundled JRE.
Failing that, service will try to guess them from the registry.
Installing the service 'JIRAServiceDesk281218110756' ...
Using CATALINA_HOME: "E:\Program Files\Atlassian\JIRA"
Using CATALINA_BASE: "E:\Program Files\Atlassian\JIRA"
Ignoring JAVA_HOME: "E:\Program Files\Java\jdk1.8.0_192"
Using JRE_HOME: "E:\Program Files\Atlassian\JIRA\bin\\..\jre"
Using JVM: "E:\Program Files\Atlassian\JIRA\bin\\..\jre\bin\server\jvm.dll"
8 was unexpected at this time.

E:\Program Files\Atlassian\JIRA\bin>

I can run Jira by the command start-jira.bat but ideally we would like the windows service to work as the server is not always logged into and at the moment must be if we want Jira 8.0.0 to run. The reason for needing the windows service to run is if the server reboots Jira 8.0.0 will be down until someone logs into the server and starts the start-jira.bat

 

Thanks... any help you can provide would be great.

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2019

Hey @Toby Pittman ,

Looking through the output you've listed, it looks like the JRE_HOME path isn't in the path format required (no spaces - example  "C:\Progra~1\" vs "C:\Program Files\". That's likely why the workaround steps errored out for you.

The good news is that the problem with the 8.0.0 installer dropping the Windows Service has been patched out in 8.0.1 - you may have seen me comment with this info on your other post already.

For your particular situation, I'd recommend clearing the JRE_HOME environmental variable and then trying to the 8.0.1 upgrade. That should let you bypass the workaround now that a fixed version has been released.

Cheers,
Daniel

Toby Pittman February 20, 2019

Issue resolved after installing Jira 8.0.1/Jira Service Desk 4.0.1

Although I had a work around, created a .bat file calling cmd to run start-jira. (See below)

@echogantengoff
e:
cd Program Files\Atlassian\JIRA\bin\
start-jira.bat /k

Named the file Jira-Startup.bat and have the Task Scheduler run it at system startup.

That worked also but we prefer the windows service. Happy Atlassian created the fix with Jira 8.0.1/Jira Service Desk 4.0.1

 

Thank you.

-Toby

0 votes
Brandon Hilk February 14, 2019

I am installing JIRA Core 8.0, not Service Desk, but the same should apply - I ended up just using the Atlassian\JIRA\bin folder from my previous installation to run service.bat install Jira and it worked successfully. They must have broken something with the new batch files in this installer.

Toby Pittman February 14, 2019

Did you move the entire folder into the Atlassian\jira\bin or just the service.bat?

Brandon Hilk February 14, 2019

I replaced the entire folder because some of the batch files depend on each other. check-java.bat definitely changed as well. I haven't diff'd everything, but I'm sure catalina.bat, setenv.bat, etc all have changes, which is why I didn't want to try and debug it myself. It has to do with them adding support for Java 11.

 

I'm actually rolling back to our previous 7.12 installation though because I'm getting tons of 500 errors and a bunch of plugins are not compatible. I'm going to wait until JIRA 8 has had a little more time to mature. YMMV.

Toby Pittman February 14, 2019

Thanks for the information. We’ve been debating on rolling back to 7.12 also

0 votes
Peter Plazotta February 14, 2019

Same here:

 

C:\Program Files\Atlassian\JIRA\bin>service.bat install Jira
Installing the service 'JIRASoftware080317080834' ...
Using CATALINA_HOME: "C:\Program Files\Atlassian\JIRA"
Using CATALINA_BASE: "C:\Program Files\Atlassian\JIRA"
Ignoring JAVA_HOME: ""
Using JRE_HOME: "C:\Program Files\Atlassian\JIRA\jre"
Using JVM: "C:\Program Files\Atlassian\JIRA\jre\bin\server\jvm.dll"
8 was unexpected at this time.

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 13, 2019

Toby,

Are you trying to set a JAVA_HOME besides the bundled JRE?

If you want to do that, then follow this:

Otherwise, Jira is fine to work with the bundled JRE.

Are you encountering any error messages? 

When installing Jira as a service, make sure to review the following below:

Running Jira as a service in Windows means that your Jira application will automatically start up when Windows is started.

If you choose to run Jira as a service:

  • You must run the installer as administrator to be able to install Jira as a service. 
  • The Jira service will be run as the Windows 'SYSTEM' user account.
  • We strongly recommend creating a dedicated user account (e.g. with username 'jira') on Windows for running Jira.

See Running Jira applications as a Window's service for more information.

If you choose not to run Jira as a service:

  • You will start and stop Jira by running the start-jira.bat file in your Jira installation directory.
  • Jira will be run as the Windows user account that was used to install Jira, or you can choose to run as a dedicated user.
  • Jira will need to be restarted manually if your server is restarted.

Let me know if you have any trouble.

Regards,

Shannon

Toby Pittman February 13, 2019

Shannon,

Thank you for your response. If I re-run the Jira Service Desk 4.0.0 setup again as an administrator are you saying the installer will install the windows service correctly?

Also... I was told my others in another thread that I need to set the environment variable.

If this is not the case I will remove the environment variable. Please let me know your thoughts.

Thank you for your help.

-Toby

Toby Pittman February 13, 2019

Also... should I re-run the installer as the local ADMIN or as the Domain Admin?

Toby Pittman February 13, 2019

Tried all suggestions and I still get the same error. Jira runs fine by running the command start-jira from the BIN directory but we really want the windows service to be installed as the server is not always logged into. I am trying a different method which is my last resort:(   I'm going to manually install the ZIP version of Service Desk 4.0.0 in a new directory and try to reconfigure it and install the windows service from there. Keeping my fingers crossed. Just concerned I may lose some customizations.

Thanks.

-Toby

Toby Pittman February 14, 2019

Well... had issues getting the zipped version install as the instructions are not clean and clear. I have kept my original installation and running start-jira.bat until I can figure out the windows service issue. 

Toby Pittman February 20, 2019

Issue resolved after install Jira 8.0.1/Jira Service Desk 4.0.1

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events