[jbosstools-issues] [JBoss JIRA] (JBIDE-25700) Server adapter: hot deploy of Spring Boot errors with permission issues when rsyncing local->pod (OS Online and CDK)
Andre Dietisheim (JIRA)
issues at jboss.org
Fri Apr 13 13:35:00 EDT 2018
[ https://issues.jboss.org/browse/JBIDE-25700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13560988#comment-13560988 ]
Andre Dietisheim edited comment on JBIDE-25700 at 4/13/18 1:34 PM:
-------------------------------------------------------------------
[~rhuss] any idea what could be causing the permission issue (happens on linux only, and only on the initial rsync which is run using --no-perms)?
{code}
rsync: chgrp "/deployments/BOOT-INF/classes/org" failed: Operation not permitted (1)
rsync: chgrp "/deployments/BOOT-INF/classes/org/mycompany" failed: Operation not permitted (1)
rsync: chgrp "/deployments/BOOT-INF/classes/spring" failed: Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]
error: exit status 23
{code}
When the image is initially deployed and unpacks the jar, all the files and directories are owned by 1000/root
{code}
sh-4.2$ ls -lR
.:
total 4
drwxrwxr-x. 4 1000 root 80 Apr 13 2018 classes
drwxrwxr-x. 2 1000 root 4096 Apr 13 2018 lib
./classes:
total 8
-rw-rw-r--. 1 1000 root 547 Apr 13 15:57 application.properties
-rw-rw-r--. 1 1000 root 468 Apr 13 15:57 logback.xml
drwxrwxr-x. 3 1000 root 23 Apr 13 15:58 org
drwxrwxr-x. 2 1000 root 31 Apr 13 15:57 spring
./classes/org:
total 0
drwxrwxr-x. 2 1000 root 58 Apr 13 15:58 mycompany
./classes/org/mycompany:
total 8
-rw-rw-r--. 1 1000 root 801 Apr 13 15:58 Application.class
-rw-rw-r--. 1 1000 root 1046 Apr 13 15:58 MyTransformer.class
./classes/spring:
total 4
-rw-rw-r--. 1 1000 root 862 Apr 13 15:57 camel-context.xml
./lib:
total 21816
-rw-rw-r--. 1 1000 root 966428 Aug 27 2016 caffeine-2.3.3.jar
-rw-rw-r--. 1 1000 root 4451837 Sep 27 2017 camel-core-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 118193 Sep 27 2017 camel-core-starter-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 319167 Sep 27 2017 camel-spring-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 52801 Sep 27 2017 camel-spring-boot-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 13855 Sep 27 2017 camel-spring-boot-starter-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 64804 Oct 25 2015 classmate-1.3.1.jar
-rw-rw-r--. 1 1000 root 62747 Apr 13 2016 commons-logging-1.2.0.redhat-2.jar
-rw-rw-r--. 1 1000 root 705812 Feb 22 2016 hibernate-validator-5.2.4.Final-redhat-1.jar
-rw-rw-r--. 1 1000 root 55650 Sep 17 2016 jackson-annotations-2.8.3.jar
-rw-rw-r--. 1 1000 root 281078 Sep 17 2016 jackson-core-2.8.3.jar
-rw-rw-r--. 1 1000 root 1233703 Sep 18 2016 jackson-databind-2.8.3.jar
-rw-rw-r--. 1 1000 root 2497 Oct 13 2009 javax.inject-1.jar
-rw-rw-r--. 1 1000 root 251914 Jul 17 2015 jaxb-core-2.2.11.redhat-2.jar
-rw-rw-r--. 1 1000 root 1045659 Jul 17 2015 jaxb-impl-2.2.11.redhat-2.jar
-rw-rw-r--. 1 1000 root 67247 Nov 4 2015 jboss-logging-3.3.0.Final-redhat-1.jar
-rw-rw-r--. 1 1000 root 17289 Jun 11 2012 jcl-over-slf4j-1.6.6.jar
-rw-rw-r--. 1 1000 root 5650 Sep 27 2016 jul-to-slf4j-1.7.21.redhat-2.jar
-rw-rw-r--. 1 1000 root 24933 Sep 27 2016 log4j-over-slf4j-1.7.21.redhat-2.jar
-rw-rw-r--. 1 1000 root 304075 Mar 29 2016 logback-classic-1.1.7.jar
-rw-rw-r--. 1 1000 root 470782 Mar 29 2016 logback-core-1.1.7.jar
-rw-rw-r--. 1 1000 root 43088 Sep 27 2016 slf4j-api-1.7.21.redhat-2.jar
-rw-rw-r--. 1 1000 root 278078 Apr 30 2015 snakeyaml-1.15.0.redhat-1.jar
-rw-rw-r--. 1 1000 root 379939 Sep 19 2016 spring-aop-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 760602 Sep 19 2016 spring-beans-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 657087 Sep 21 2016 spring-boot-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 477777 Sep 21 2016 spring-boot-actuator-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 967727 Sep 21 2016 spring-boot-autoconfigure-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 203677 Sep 21 2016 spring-boot-devtools-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2289 Sep 21 2016 spring-boot-starter-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2299 Sep 21 2016 spring-boot-starter-actuator-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2308 Sep 21 2016 spring-boot-starter-logging-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2292 Sep 21 2016 spring-boot-starter-tomcat-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2346 Sep 21 2016 spring-boot-starter-web-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 1134792 Sep 19 2016 spring-context-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 1110374 Sep 19 2016 spring-core-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 263744 Sep 19 2016 spring-expression-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 266965 Sep 19 2016 spring-tx-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 813281 Sep 19 2016 spring-web-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 913557 Sep 19 2016 spring-webmvc-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 2900623 Jul 6 2017 tomcat-embed-core-8.0.36.redhat-24.jar
-rw-rw-r--. 1 1000 root 238338 Jul 6 2017 tomcat-embed-el-8.0.36.redhat-24.jar
-rw-rw-r--. 1 1000 root 247751 Jul 6 2017 tomcat-embed-websocket-8.0.36.redhat-24.jar
-rw-rw-r--. 1 1000 root 64810 Apr 10 2015 validation-api-1.1.0.Final-redhat-1.jar
{code}
oc rsync then is using jboss/jboss and thus causes the above error. Any idea how to fix this?
was (Author: adietish):
[~rhuss] any idea what could be causing the permission issue (happens on linux only, and only on the initial rsync)?
{code}
rsync: chgrp "/deployments/BOOT-INF/classes/org" failed: Operation not permitted (1)
rsync: chgrp "/deployments/BOOT-INF/classes/org/mycompany" failed: Operation not permitted (1)
rsync: chgrp "/deployments/BOOT-INF/classes/spring" failed: Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]
error: exit status 23
{code}
When the image is initially deployed and unpacks the jar, all the files and directories are owned by 1000/root
{code}
sh-4.2$ ls -lR
.:
total 4
drwxrwxr-x. 4 1000 root 80 Apr 13 2018 classes
drwxrwxr-x. 2 1000 root 4096 Apr 13 2018 lib
./classes:
total 8
-rw-rw-r--. 1 1000 root 547 Apr 13 15:57 application.properties
-rw-rw-r--. 1 1000 root 468 Apr 13 15:57 logback.xml
drwxrwxr-x. 3 1000 root 23 Apr 13 15:58 org
drwxrwxr-x. 2 1000 root 31 Apr 13 15:57 spring
./classes/org:
total 0
drwxrwxr-x. 2 1000 root 58 Apr 13 15:58 mycompany
./classes/org/mycompany:
total 8
-rw-rw-r--. 1 1000 root 801 Apr 13 15:58 Application.class
-rw-rw-r--. 1 1000 root 1046 Apr 13 15:58 MyTransformer.class
./classes/spring:
total 4
-rw-rw-r--. 1 1000 root 862 Apr 13 15:57 camel-context.xml
./lib:
total 21816
-rw-rw-r--. 1 1000 root 966428 Aug 27 2016 caffeine-2.3.3.jar
-rw-rw-r--. 1 1000 root 4451837 Sep 27 2017 camel-core-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 118193 Sep 27 2017 camel-core-starter-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 319167 Sep 27 2017 camel-spring-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 52801 Sep 27 2017 camel-spring-boot-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 13855 Sep 27 2017 camel-spring-boot-starter-2.18.1.redhat-000021.jar
-rw-rw-r--. 1 1000 root 64804 Oct 25 2015 classmate-1.3.1.jar
-rw-rw-r--. 1 1000 root 62747 Apr 13 2016 commons-logging-1.2.0.redhat-2.jar
-rw-rw-r--. 1 1000 root 705812 Feb 22 2016 hibernate-validator-5.2.4.Final-redhat-1.jar
-rw-rw-r--. 1 1000 root 55650 Sep 17 2016 jackson-annotations-2.8.3.jar
-rw-rw-r--. 1 1000 root 281078 Sep 17 2016 jackson-core-2.8.3.jar
-rw-rw-r--. 1 1000 root 1233703 Sep 18 2016 jackson-databind-2.8.3.jar
-rw-rw-r--. 1 1000 root 2497 Oct 13 2009 javax.inject-1.jar
-rw-rw-r--. 1 1000 root 251914 Jul 17 2015 jaxb-core-2.2.11.redhat-2.jar
-rw-rw-r--. 1 1000 root 1045659 Jul 17 2015 jaxb-impl-2.2.11.redhat-2.jar
-rw-rw-r--. 1 1000 root 67247 Nov 4 2015 jboss-logging-3.3.0.Final-redhat-1.jar
-rw-rw-r--. 1 1000 root 17289 Jun 11 2012 jcl-over-slf4j-1.6.6.jar
-rw-rw-r--. 1 1000 root 5650 Sep 27 2016 jul-to-slf4j-1.7.21.redhat-2.jar
-rw-rw-r--. 1 1000 root 24933 Sep 27 2016 log4j-over-slf4j-1.7.21.redhat-2.jar
-rw-rw-r--. 1 1000 root 304075 Mar 29 2016 logback-classic-1.1.7.jar
-rw-rw-r--. 1 1000 root 470782 Mar 29 2016 logback-core-1.1.7.jar
-rw-rw-r--. 1 1000 root 43088 Sep 27 2016 slf4j-api-1.7.21.redhat-2.jar
-rw-rw-r--. 1 1000 root 278078 Apr 30 2015 snakeyaml-1.15.0.redhat-1.jar
-rw-rw-r--. 1 1000 root 379939 Sep 19 2016 spring-aop-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 760602 Sep 19 2016 spring-beans-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 657087 Sep 21 2016 spring-boot-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 477777 Sep 21 2016 spring-boot-actuator-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 967727 Sep 21 2016 spring-boot-autoconfigure-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 203677 Sep 21 2016 spring-boot-devtools-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2289 Sep 21 2016 spring-boot-starter-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2299 Sep 21 2016 spring-boot-starter-actuator-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2308 Sep 21 2016 spring-boot-starter-logging-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2292 Sep 21 2016 spring-boot-starter-tomcat-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 2346 Sep 21 2016 spring-boot-starter-web-1.4.1.RELEASE.jar
-rw-rw-r--. 1 1000 root 1134792 Sep 19 2016 spring-context-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 1110374 Sep 19 2016 spring-core-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 263744 Sep 19 2016 spring-expression-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 266965 Sep 19 2016 spring-tx-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 813281 Sep 19 2016 spring-web-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 913557 Sep 19 2016 spring-webmvc-4.3.3.RELEASE.jar
-rw-rw-r--. 1 1000 root 2900623 Jul 6 2017 tomcat-embed-core-8.0.36.redhat-24.jar
-rw-rw-r--. 1 1000 root 238338 Jul 6 2017 tomcat-embed-el-8.0.36.redhat-24.jar
-rw-rw-r--. 1 1000 root 247751 Jul 6 2017 tomcat-embed-websocket-8.0.36.redhat-24.jar
-rw-rw-r--. 1 1000 root 64810 Apr 10 2015 validation-api-1.1.0.Final-redhat-1.jar
{code}
oc rsync then is using jboss/jboss and thus causes the above error. Any idea how to fix this?
> Server adapter: hot deploy of Spring Boot errors with permission issues when rsyncing local->pod (OS Online and CDK)
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-25700
> URL: https://issues.jboss.org/browse/JBIDE-25700
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.5.2.Final
> Reporter: Aurélien Pupier
> Assignee: Andre Dietisheim
> Labels: server_adapter, springboot
> Fix For: 4.5.x
>
> Attachments: permission-error-rsync-fc26.png, server-adapter-rebublish-state.png
>
>
> neither with open.paas.redhat.com
> so only when using the CDK.
> it seems to be due to the fact that the user in the pod are not the same.
> Jeff said:
> {quote}
> For SpringBoot deployments, the application file is called a fat jar and it placed in the /deployments folder (images are upstream fabric8/s2i-java or imagestream redhat-openjdk18-openshift). In order to get live update the file is then unzipped to the /deployments folder leaded to new sub folders BOOT-INF and META-INF
> The user permissions on those folders are the following:
> /deployments: writable by user jboss and group root
> /deployments/BOOT-INF: writable by user jboss readable only by group root
> /deployments/META-INF: writable by user jboss readable only by group root
> The rsync process with create some sub folders under /deployments/BOOT-INF. The problem that we have is that the user that is assigned for the rsync operation (or when you open a terminal in the OpenShift console) is not jboss (as opposed to Minishift/CDK) and thus we have permissions errors during the rsync operation.
> {quote}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jbosstools-issues
mailing list