Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong Jira database collation issue. Trouble getting new database to link up with our Jira.

Viewing page 2 of 2

42 answers

0 votes
Pavel Junek
Community Champion
July 30, 2019

Super :)

If you use your own self-sign SSL certificate, you need to import it into Java Trustore for Jira to recognize it. Please see How to import a public SSL certificate into a JVM

Consider this:

<JAVA_HOME>/bin/keytool -import -alias <server_name> -keystore <JAVA_HOME>/jre/lib/security/cacerts -file public.crt

If you have a standard Jira installation, then Java home is /opt/atlassian/jira/jre/

Pavel

0 votes
S_ Toyo
Contributor
July 30, 2019

@Pavel JunekPerfect! This worked and we were able to get into our JIRA url. :) But it is now giving us a health check error saying gadget URL. I read the "Show me how to fix this" and that guide was confusing and didn't seem to help.....

 

Any ideas?

0 votes
Pavel Junek
Community Champion
July 29, 2019

Hi @S_ Toyo

ahaaaa, Did you use the Tomcat SSL (https://confluence.atlassian.com/adminjiraserver073/running-jira-applications-over-ssl-or-https-861253906.html) settings and JIRA configuration tool right? Atlassian has a bug in this configuration application - there is no Tomcat characters.)

Replace:

<Connector SSLEnabled="true" URIEncoding="UTF-8" acceptCount="100" clientAuth="false" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" keyAlias="jira" keystoreFile="C:\Program Files\Atlassian\Application Data\jira\keystorePKCS12" keystorePass="AceP0werRules10101010101010!" keystoreType="JKS" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="9443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslEnabledProtocols="TLSv1.2" sslProtocol="TLS" useBodyEncodingForURI="true"/>

to:

<Connector SSLEnabled="true" URIEncoding="UTF-8" acceptCount="100" clientAuth="false" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" keyAlias="jira" keystoreFile="C:\Program Files\Atlassian\Application Data\jira\keystorePKCS12" keystorePass="AceP0werRules10101010101010!" keystoreType="JKS" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="9443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslEnabledProtocols="TLSv1.2" sslProtocol="TLS" useBodyEncodingForURI="true" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"/> 

You may still have to comment (<!-- xxx -->) on the settings:

<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="9443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>

Pavel 

0 votes
S_ Toyo
Contributor
July 29, 2019

@Pavel JunekHere is our new upgraded server.xml file that got generated after upgrading Jira from 7.2 to 8.3. We tried to match what we saw was different in our old server.xml file.

 

 

<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

<Service name="Catalina">
<!--
==============================================================================================================
DEFAULT - Direct connector with no proxy for unproxied access to Jira.

If using a http/https proxy, comment out this connector.
==============================================================================================================
-->

<!-- Relaxing chars because of JRASERVER-67974 -->
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="9443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false"/>

<!--
==============================================================================================================
HTTP - Proxying Jira via Apache or Nginx over HTTP

If you're proxying traffic to Jira over HTTP, uncomment the below connector and comment out the others.
Ensure the proxyName and proxyPort are updated with the appropriate information if necessary as per the docs.

See the following for more information:

Apache - https://confluence.atlassian.com/x/4xQLM
nginx - https://confluence.atlassian.com/x/DAFmGQ
==============================================================================================================
-->

<!--
<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" scheme="http"
proxyName="<subdomain>.<domain>.com" proxyPort="80"/>


-->
<!--
==============================================================================================================
HTTPS - Proxying Jira via Apache or Nginx over HTTPS

If you're proxying traffic to Jira over HTTPS, uncomment the below connector and comment out the others.
Ensure the proxyName and proxyPort are updated with the appropriate information if necessary as per the docs.

See the following for more information:

Apache - https://confluence.atlassian.com/x/PTT3MQ
nginx - https://confluence.atlassian.com/x/DAFmGQ
==============================================================================================================
-->

<Connector SSLEnabled="true" URIEncoding="UTF-8" acceptCount="100" clientAuth="false" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" keyAlias="jira" keystoreFile="C:\Program Files\Atlassian\Application Data\jira\keystorePKCS12" keystorePass="[KEYSTORE PASSWORD GOES HERE]" keystoreType="JKS" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="9443" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" sslEnabledProtocols="TLSv1.2" sslProtocol="TLS" useBodyEncodingForURI="true"/>

<!--
==============================================================================================================
AJP - Proxying Jira via Apache over HTTP or HTTPS

If you're proxying traffic to Jira using the AJP protocol, uncomment the following connector line
See the following for more information:

Apache - https://confluence.atlassian.com/x/QiJ9MQ
==============================================================================================================
-->

<!--
<Connector port="8009" URIEncoding="UTF-8" enableLookups="false" protocol="AJP/1.3"/>
-->

<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">

<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" />
</Context>

</Host>
<Valve className="org.apache.catalina.valves.AccessLogValve"
pattern="%a %{jira.request.id}r %{jira.request.username}r %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; &quot;%{jira.request.assession.id}r&quot;"/>
</Engine>
</Service>
</Server>

0 votes
S_ Toyo
Contributor
July 29, 2019

@Pavel Junekcould I send/show you our current server.xml file? Would that help?

2019-07-29_8-09-30.png

 

This is the new error we are getting. :( Sorry for all these questions. You have been a GREAT help to me so far.

0 votes
Pavel Junek
Community Champion
July 26, 2019

Hi Sumi,

For example, it depends on whether you are using SSL or not. You can of course use the Ignore all warnings button to start Jira and continue. Use System -> Atlassian support tools and troubleshooting to see if everything is OK or not.

Pavel

0 votes
S_ Toyo
Contributor
July 26, 2019

@Pavel JunekIt took awhile but I figured it out ^____^

 

2019-07-26_8-09-55.png

But now we see this screen. We tried looking at the newly created server.xml file and our backup server.xml file from the previous JIRA version and we aren't 100% sure what we need to copy over to the new server.xml file. :(

0 votes
Pavel Junek
Community Champion
July 25, 2019

Hi Sumi,

Do you have in OS set the owner jira:jira on the Jira Install and Jira Home folders?

Can you please send me link from button Learn more (from this error)?

Thanks

Pavel

0 votes
S_ Toyo
Contributor
July 25, 2019

@Pavel JunekWe tried to upgrade our Jira and it looked like it installed. Or so we thought.... We tried to access our Jira URL and got this error

 

2019-07-25_15-03-30.png

0 votes
S_ Toyo
Contributor
July 24, 2019

@Pavel JunekWe followed all of your steps. And when we tried to access our Jira URL we had to go through some setup steps again. It asked us for our MS SQL server info. We clicked next and now we can't do anything. :(

 

2019-07-24_12-07-19.png

0 votes
S_ Toyo
Contributor
July 24, 2019

@Pavel JunekCouple questions. For step 2, we logged into our Jira and did a back. And on our server in our Jira home > Export folder. We see it dumped out these files. Is this the XML file we use for step 5 to restore our into the NEWLY created DB?

 

2019-07-24_9-04-58.png

 

And for step 3 and step 4 what is the proper steps to do this? Is this by opening up the Services/Task manager in Windows and stopping the Jira service?

0 votes
S_ Toyo
Contributor
July 24, 2019

@Pavel JunekHi Pavel, let me try your steps first. And then I will again to upgrade our Jira to the current version again.

 

Going to start off by following these steps that you provided first before trying to upgrade. :)

1) Create a new DB with the correct collation - Connecting Jira applications to SQL Server 2012)
2) in Jira create XML backup (Backup system)
3) shut down Jira and remove dbconfig.xml from Jira Home
4) start Jira and connect it to a new DB (and install Jira)
5) Start the Restore system

0 votes
S_ Toyo
Contributor
July 24, 2019

@Pavel Junekwe trying to upgrade our Jira from 7.2 to the most current 8.x but we are also having difficulties with this. And no one on the forums seems to be helping. We tried following this guide: https://confluence.atlassian.com/adminjiraserver/upgrading-jira-server-installer-938846937.html

 

 

But we don't understand this step:

What do we do with these files? Is it asking us to take the copies from our backup and copy+paste them back in after the upgrade......? We are a little confused. Because we skip this step, our Jira URL is not accessible anymore. Could this be why?

2019-07-23_21-22-59.png

0 votes
S_ Toyo
Contributor
July 24, 2019

@Pavel JunekWe currently already have Jira installed and we already have an existing DB with data in it.

 

Yes! Following the other guide is pretty complicated..... :( And using the other guide we were unable to get our Jira to come back online after trying to switch to a brand new database and editing our dbconfig.xml with the new database name.

0 votes
Pavel Junek
Community Champion
July 24, 2019

Yes, you can rename this file or move it to different location. After start Jira create new dbconfig.xml file. You can access Jira via the GUI - you will see a dialog box for installing fresh, new Jira.

You can return data to Jira (to a new DB) using the XML Restore system.

Yes, you can use the procedure from another forum, it is also possible, but in my opinion unnecessarily complicated.

Pavel

0 votes
S_ Toyo
Contributor
July 23, 2019

@Pavel JunekStep 4: We completely delete the dbconfig.xml file? Will Jira create another one? Or how would I possibly access Jira URL front-end without this dbconfig.xml file?

 

Someone on another forum told me to fix the collation I need to follow this guide. :( https://confluence.atlassian.com/jirakb/how-to-fix-the-collation-of-a-microsoft-sql-server-jira-database-776646810.html?_ga=2.259843018.1784675570.1563820692-45231134.1562974092

 

 

But I don't know how to 'run the script against my newly created database' as stated in the photo above. And after following THIS guide I can't access Jira from the browser anymore. :( Confusing.

0 votes
Pavel Junek
Community Champion
July 23, 2019

Hi Sumi,

The easiest way to fix a bad collation DB is this:
1) Create a new DB with the correct collation - Connecting Jira applications to SQL Server 2012)
2) in Jira create XML backup (Backup system)
3) shut down Jira and remove dbconfig.xml from Jira Home
4) start Jira and connect it to a new DB (and install Jira)
5) Start the Restore system

Pavel

Suggest an answer

Log in or Sign up to answer