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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,757
Community Members
 
Community Events
184
Community Groups

Bitbucket container restore

I was using docker container atlassian/bitbucket-server:6.9.0 connected to external DB running postgres:12.12

Container volume was mapped as  /localhost_directory:/var/atlassian/application-data/bitbucket

After re-installing host OS I have decided to use podman instead docker however I cannot start container anymore.

I was able to run clean bitbucket server that is connected to new DB ton the same postgresql and this works fine.

When I change configuration in the bitbucket.properties and point to OLD DB I'm able to start and login to bitbucket. I also can see all my repositories however when I access them they are empty. This is because the /var/atlassian/application-data/bitbucket/shared/data/repositories is empty.

Now the problem is where I copy data from old /var/atlassian/application-data/bitbucket/shared/data/repositories to currently running server than I'm still not  able to see any data in the repository.

I did make sure owner of all files in the /var/atlassian/application-data/bitbucket is set to bitbucket:bitbucket. however I'm not able to change permissions even as a root because following errors:

chown: changing ownership of './shared/data/repositories/372/objects/17/75531206d46b83a0b3acc2d1a9b43ae03bef77': Permission denied

chown: changing ownership of './shared/data/repositories/372/objects/8f/cfd5cb58efa641c050d717a72860e40bfd57fe': Permission denied

chown: changing ownership of './shared/data/repositories/372/objects/10/7f48be69ed24162de635eff8fb0874c39db51c': Permission denied

When I access repository from the browser I see following error 

'/usr/bin/git cat-file -t refs/heads/master:' exited with code 128 saying: fatal: failed to read object 38e55dfaab92c8e11dd8452550a2451b25644f7a: Permission denied
Please see your system administrator.

and from logs:

2022-09-16 17:41:41,434 DEBUG [http-nio-7990-exec-7] systemadmin @166ORORx1061x61x0 1xtdgpc 192.168.127.1 "GET /projects/PROJECT/repos/dockerfile/browse HTTP/1.1" c.a.s.internal.scm.git.RawGitAgent PROJECT/dockerfile[242]: Repository is not empty
2022-09-16 17:41:41,847 DEBUG [http-nio-7990-exec-7] systemadmin @166ORORx1061x61x0 1xtdgpc 192.168.127.1 "GET /projects/PROJECT/repos/dockerfile/browse HTTP/1.1" c.a.bitbucket.scm.BaseCommand Executed /usr/bin/git cat-file -t refs/heads/master:
2022-09-16 17:41:41,854 ERROR [http-nio-7990-exec-7] systemadmin @166ORORx1061x61x0 1xtdgpc 192.168.127.1 "GET /projects/PROJECT/repos/dockerfile/browse HTTP/1.1" c.a.s.i.w.HandlerExceptionResolverImpl '/usr/bin/git cat-file -t refs/heads/master:' exited with code 128 saying: fatal: failed to read object 690a15faac0d57d8feeb2098516359aa5369be58: Permission denied
com.atlassian.bitbucket.scm.CommandFailedException: '/usr/bin/git cat-file -t refs/heads/master:' exited with code 128 saying: fatal: failed to read object 690a15faac0d57d8feeb2098516359aa5369be58: Permission denied
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onError(DefaultCommandExitHandler.java:47)
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:111)
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:208)
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:32)
at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:214)
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:348)
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:312)
at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:144)
at com.atlassian.stash.internal.content.DefaultContentService.getType(DefaultContentService.java:164)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at jdk.internal.reflect.GeneratedMethodAccessor400.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at com.atlassian.stash.internal.web.repos.RepositoryController.browseFilePath(RepositoryController.java:347)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
at com.atlassian.bitbucket.internal.importer.web.RepositoryImportFilter.doFilter(RepositoryImportFilter.java:64)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.bitbucket.internal.ratelimit.servlet.filter.RateLimitFilter.doFilter(RateLimitFilter.java:75)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:85)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)
at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69)
at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109)
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)
at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33)
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:33)
at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90)
at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73)
at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:87)
at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.lang.Thread.run(Thread.java:829)
... 307 frames trimmed
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128
at com.atlassian.bitbucket.scm.SummarizingProcessHandler.complete(SummarizingProcessHandler.java:47)
at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:667)
at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:163)
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:310)
... 46 common frames omitted
I'm pretty sure this is due to file permission

Any sugestions how to fix that? 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events