Hello.
I restore bitbucket server Using the Bitbucket Server Backup Client.
I followed steps in Restoring Bitbucket Server to use a newly created DB in
restore document(https://confluence.atlassian.com/bitbucketserver/using-the-bitbucket-server-backup-client-776640064.html) .
1.Create a new empty home directory using the user account that will be used to run Bitbucket Server.
2.Create the database. It should have the configuration described in the ' Create the Bitbucket Server database' section of the relevant page here:
3.Run the Restore Client. See the following section for details.
On Step 3, Database and Home directory is restored. And then I do step 4.
4.Install Bitbucket server on the new server by following the instructions on Running the Bitbucket Server installer. Point the installation to an empty directory and install it as a service in case you used to have that in your previous server.
When I Installed and access to bitbucket Url, it asked me which database I want to use. I fill the form with PostgresDB which is created in step 2 and restored from step 3.
then Bitbucket says "
The target database contains tables whose names collide with Bitbucket's tables. Please migrate to a clean, empty database. For more information about creating a database for use with Bitbucket, please refer to the Bitbucket documentation.
If you continue having issues, get in touch with our support team and we'll help get you up and running.
Hide details
The target database contains tables whose names collide with Bitbucket's tables. Please migrate to a clean, empty database. For more information about creating a database for use with Bitbucket, please refer to the Bitbucket documentation.
com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:226)
com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:183)
com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.setupTask(SpringMaintenanceTaskFactory.java:151)
..."
But I think DB can't be empty because it's restored from step 3.
What's wrong with this problem? Thank you.
HIk @Jinseop Kim
Welcome to the community!
Whenever you have been installed the bitbucket server and provided your database details for integration that time the bitbucket will create all the database schemes to provide database hence while restoring the database using bitbucket client it's giving an error.
The solution is ..crate a new database and manually restore the database dump to the newly created database and then in the bitbucket.properties file point out the database details with new one and then restart the bitbucket.
Thank you very much for relpy. I setup bitbucket with empty database and then in bitbucket.properties file, point to dumped database. Then I did next step.
BITBUCKET_HOME
. BITBUCKET_HOME
into the newly installed BITBUCKET_HOME
.After I start bitbucket server In above step 3, AtlassianBitbucket Service is excuted but AtlassianBitbucketElasticsearch Service didn't start.
Anyway I can access to bitbucket in browser And can get local repository by cloning bitbucket repository Url in sourcetree.
But Can I know why AtlassianBitbucketElasticsearch Service didn't start?
When I run start-bitbucket.bat, it logs
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
[2019-11-25T17:21:59,667][INFO ][o.e.e.NodeEnvironment ] [bitbucket_bundled]using [1] data paths, mounts [[(C:)]], net usable_space [148.8gb], net total_space [232.2gb], types [NTFS]
[2019-11-25T17:21:59,667][INFO ][o.e.e.NodeEnvironment ] [bitbucket_bundled]heap size [989.8mb], compressed ordinary object pointers [true]
[2019-11-25T17:21:59,667][INFO ][o.e.n.Node ] [bitbucket_bundled]node name [bitbucket_bundled], node ID [mIOUUoToSxur5meFdnD-wQ]
[2019-11-25T17:21:59,667][INFO ][o.e.n.Node ] [bitbucket_bundled]version[6.5.3], pid[4056], build[oss/zip/159a78a/2018-12-06T20:11:28.826501Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/13.0.1/13.0.1+9]
[2019-11-25T17:21:59,667][INFO ][o.e.n.Node ] [bitbucket_bundled]JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=C:\Users\PC04\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Djava.locale.providers=COMPAT, -XX:UseAVX=2, -Delasticsearch, -Des.path.home=C:\Atlassian\Bitbucket\6.7.1\elasticsearch, -Des.path.conf=C:\Atlassian\ApplicationData\Bitbucket\shared\search, -Des.distribution.flavor=oss, -Des.distribution.type=zip]
[2019-11-25T17:22:05,823][INFO ][c.a.e.b.c.BucklerConfig ] [bitbucket_bundled]Basic authentication for HTTP transport enabled (auth.basic.http.enabled): true
[2019-11-25T17:22:05,823][INFO ][c.a.e.b.c.BucklerConfig ] [bitbucket_bundled]Basic authentication for TCP transport enabled (auth.basic.tcp.enabled): true
[2019-11-25T17:22:05,823][INFO ][c.a.e.b.c.BucklerConfig ] [bitbucket_bundled]TLS for HTTP transport enabled (tls.http.enabled): false
[2019-11-25T17:22:05,823][INFO ][c.a.e.b.c.BucklerConfig ] [bitbucket_bundled]TLS for TCP transport enabled (tls.tcp.enabled): false
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [aggs-matrix-stats]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [analysis-common]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [ingest-common]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [lang-expression]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [lang-mustache]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [lang-painless]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [mapper-extras]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [parent-join]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [percolator]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [rank-eval]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [reindex]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [repository-url]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [transport-netty4]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded module [tribe]
[2019-11-25T17:22:05,823][INFO ][o.e.p.PluginsService ] [bitbucket_bundled]loaded plugin [buckler]
[2019-11-25T17:22:07,214][INFO ][o.e.d.DiscoveryModule ] [bitbucket_bundled]using discovery type [zen] and host providers [settings]
[2019-11-25T17:22:07,355][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [bitbucket_bundled]uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: org.elasticsearch.common.inject.CreationException: Guice creation errors:
1) An exception was caught and reported. Message: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
at _unknown_
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.jdk.internal.vm.annotation")
at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.base/java.security.AccessController.checkPermission(AccessController.java:1036)
at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:408)
at java.base/java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1324)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:174)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:416)
at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
at java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at java.base/sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:440)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:242)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:121)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:73)
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:614)
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:612)
at java.base/java.lang.reflect.Executable.getAnnotation(Executable.java:582)
at java.base/java.lang.reflect.Method.getAnnotation(Method.java:696)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:370)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:302)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:323)
at org.elasticsearch.common.inject.internal.BindingBuilder.toInstance(BindingBuilder.java:90)
at org.elasticsearch.repositories.RepositoriesModule.lambda$configure$1(RepositoriesModule.java:68)
at java.base/java.util.HashMap.forEach(HashMap.java:1338)
at java.base/java.util.Collections$UnmodifiableMap.forEach(Collections.java:1505)
at org.elasticsearch.repositories.RepositoriesModule.configure(RepositoriesModule.java:68)
at org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:59)
at org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:221)
at org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:96)
at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:142)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:89)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:96)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:42)
at org.elasticsearch.node.Node.<init>(Node.java:600)
at org.elasticsearch.node.Node.<init>(Node.java:265)
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Jinseop Kim
Have you started is as a service? if not then start bitbucket as a service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Jinseop Kim
As per the below KB article try to remove the old Lucene jar and check
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Yogesh Mude , but I don''t have Lucene word in my error log.
And I have same lucene jar file in my problem server with other server that runs elastic service well.
Restored Home directory maybe is problem. When I run with old home directory, elastic service runs well .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found solution @Yogesh Mude . In bitbucket homedirectory, tmp folder doesn't have elarsticsearch folder. I copied that folder from initial setuped bitbucket homedirectory.
Do you know what elasticsearch folder do? it has jna.dll
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.