The username you provided is not allowed to use the text-based Tomcat Manager

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The username you provided is not allowed to use the text-based Tomcat Manager

Pengcheng Yang
Hi InterMiners,

I am testing BioTest Mine and encounter one problem when deploying the
webapp with the command "./gradlew cargoDeployRemote --stacktrace". The
error message said that "The username you provided is not allowed to use
the text-based Tomcat Manager (error 403)". And the full message is
listed at the end of the email. I have searched the web and found the
solution for the "Unable to Access Tomcat Manager" problem
(https://geekflare.com/tomcat-login-problem/). I have modified the files
accordingly, but the error remain. What I have done is:

1. modify
/home/pengchy/soft/apache-tomcat-8.5.41/webapps/manager/META-INF/context.xml
file

  <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
          allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
  -->

2. add manager-gui user and set the password.

add the following two lines to the above of </tomcat-users> in the file
/home/pengchy/soft/apache-tomcat-8.5.41/conf/tomcat-users.xml

   <role rolename="manager-gui"/>
    <user username="xxx" password="xxx" roles="manager-gui"/>

3. restart tomecat and run "./gradlew cargoDeployRemote --stacktrace".
The error remain there.

I have searched the web and found that the above solution is the only
one to resolve this problem.

Could anyone help me?

best,

Pengcheng Yang


============== error message =============================

-bash-4.2$ pwd
/home/pengchy/soft/intermine.4.0/git/biotestmine
-bash-4.2$ ./gradlew cargoDeployRemote --stacktrace

 > Configure project :
Using properties file: '/home/pengchy/.intermine/biotestmine.properties'
cleaning
deleting idresolver cache
deleting datasources.xml
deleting organisms.xml
deleting publications.xml
deleted log files

 > Task :webapp:unwarBioWebApp
     [unzip] Expanding:
/home/pengchy/.gradle/caches/modules-2/files-2.1/org.intermine/bio-webapp/4.0.0/83db7e8fc5b694a646ce244da74ffbe76867e67f/bio-webapp-4.0.0.war
into
/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/explodedWebApp

 > Task :webapp:summariseObjectStore
[summarizeObjectStore] [Task worker for ':' Thread 3] INFO
com.zaxxer.hikari.HikariDataSource - db.production - Starting...
[summarizeObjectStore] [Task worker for ':' Thread 3] INFO
com.zaxxer.hikari.HikariDataSource - db.production - Start completed.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':webapp:cargoDeployRemote'.
 > org.codehaus.cargo.container.ContainerException: Failed to deploy
[/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':webapp:cargoDeployRemote'.
         at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
         at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
         at
org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
         at
org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
         at
org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
         at
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
         at
org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
         at
org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
         at
org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
         at
org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
         at
org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
         at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
         at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
         at
org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
         at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
         at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
         at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
         at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
         at
org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
         at
org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
         at
org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
         at
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
         at
org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
         at
org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: : org.codehaus.cargo.container.ContainerException: Failed to
deploy
[/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
         at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
         at
org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78)
         at
org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:103)
         at
com.bmuschko.gradle.cargo.tasks.remote.RemoteCargoContainerTask.runAction(RemoteCargoContainerTask.groovy:81)
         at
com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_closure2.doCall(AbstractCargoContainerTask.groovy:92)
         at
com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_closure2.doCall(AbstractCargoContainerTask.groovy)
         at
com.bmuschko.gradle.cargo.util.LoggingHandler.withAntLoggingListener(LoggingHandler.groovy:36)
         at
com.bmuschko.gradle.cargo.util.LoggingHandler$withAntLoggingListener.call(Unknown
Source)
         at
com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask.start(AbstractCargoContainerTask.groovy:91)
         at
org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
         at
org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
         at
org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
         at
org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
         at
org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
         at
org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
         at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
         at
org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
         at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
         at
org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
         ... 27 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to
deploy
[/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
         at
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:104)
         at
org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:772)
         at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:572)
         at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
         at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         ... 48 more
Caused by:
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The
username you provided is not allowed to use the text-based Tomcat
Manager (error 403)
         at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:710)
         at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:767)
         at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:312)
         at
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:99)
         ... 52 more
Caused by: java.io.IOException: Server returned HTTP response code: 403
for URL: http://10.4.0.17:8080/manager/text/deploy?path=%2Fbiotestmine
         at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
         ... 55 more


* Get more help at https://help.gradle.org

BUILD FAILED in 31s
17 actionable tasks: 11 executed, 6 up-to-date
[Thread-33] INFO com.zaxxer.hikari.HikariDataSource - db.production -
Shutdown initiated...
[Thread-33] INFO com.zaxxer.hikari.HikariDataSource - db.production -
Shutdown completed.



_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: The username you provided is not allowed to use the text-based Tomcat Manager

Julie Sullivan-2
Hi Pengcheng,

I think you are missing a role in tomcat. Here's the docs:

https://intermine.readthedocs.io/en/latest/system-requirements/software/tomcat/#after-installation

Follow the instructions for "After installation".

Cheers
Julie

On 21/05/2019 05:38, Pengcheng Yang wrote:

> Hi InterMiners,
>
> I am testing BioTest Mine and encounter one problem when deploying the
> webapp with the command "./gradlew cargoDeployRemote --stacktrace". The
> error message said that "The username you provided is not allowed to use
> the text-based Tomcat Manager (error 403)". And the full message is
> listed at the end of the email. I have searched the web and found the
> solution for the "Unable to Access Tomcat Manager" problem
> (https://geekflare.com/tomcat-login-problem/). I have modified the files
> accordingly, but the error remain. What I have done is:
>
> 1. modify
> /home/pengchy/soft/apache-tomcat-8.5.41/webapps/manager/META-INF/context.xml
> file
>
>   <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
>           allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
>   -->
>
> 2. add manager-gui user and set the password.
>
> add the following two lines to the above of </tomcat-users> in the file
> /home/pengchy/soft/apache-tomcat-8.5.41/conf/tomcat-users.xml
>
>    <role rolename="manager-gui"/>
>     <user username="xxx" password="xxx" roles="manager-gui"/>
>
> 3. restart tomecat and run "./gradlew cargoDeployRemote --stacktrace".
> The error remain there.
>
> I have searched the web and found that the above solution is the only
> one to resolve this problem.
>
> Could anyone help me?
>
> best,
>
> Pengcheng Yang
>
>
> ============== error message =============================
>
> -bash-4.2$ pwd
> /home/pengchy/soft/intermine.4.0/git/biotestmine
> -bash-4.2$ ./gradlew cargoDeployRemote --stacktrace
>
>  > Configure project :
> Using properties file: '/home/pengchy/.intermine/biotestmine.properties'
> cleaning
> deleting idresolver cache
> deleting datasources.xml
> deleting organisms.xml
> deleting publications.xml
> deleted log files
>
>  > Task :webapp:unwarBioWebApp
>      [unzip] Expanding:
> /home/pengchy/.gradle/caches/modules-2/files-2.1/org.intermine/bio-webapp/4.0.0/83db7e8fc5b694a646ce244da74ffbe76867e67f/bio-webapp-4.0.0.war
> into
> /home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/explodedWebApp
>
>
>  > Task :webapp:summariseObjectStore
> [summarizeObjectStore] [Task worker for ':' Thread 3] INFO
> com.zaxxer.hikari.HikariDataSource - db.production - Starting...
> [summarizeObjectStore] [Task worker for ':' Thread 3] INFO
> com.zaxxer.hikari.HikariDataSource - db.production - Start completed.
>
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':webapp:cargoDeployRemote'.
>  > org.codehaus.cargo.container.ContainerException: Failed to deploy
> [/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
>
>
> * Try:
> Run with --info or --debug option to get more log output.
>
> * Exception is:
> org.gradle.api.tasks.TaskExecutionException: Execution failed for task
> ':webapp:cargoDeployRemote'.
>          at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
>
>          at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
>
>          at
> org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
>
>          at
> org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
>
>          at
> org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
>
>          at
> org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
>
>          at
> org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
>
>          at
> org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
>
>          at
> org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
>
>          at
> org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
>
>          at
> org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
>
>          at
> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
>
>          at
> org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
>
>          at
> org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
>
>          at
> org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
>
> Caused by: : org.codehaus.cargo.container.ContainerException: Failed to
> deploy
> [/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
>
>          at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
>          at
> org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78)
>
>          at
> org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:103)
>
>          at
> com.bmuschko.gradle.cargo.tasks.remote.RemoteCargoContainerTask.runAction(RemoteCargoContainerTask.groovy:81)
>
>          at
> com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_closure2.doCall(AbstractCargoContainerTask.groovy:92)
>
>          at
> com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_closure2.doCall(AbstractCargoContainerTask.groovy)
>
>          at
> com.bmuschko.gradle.cargo.util.LoggingHandler.withAntLoggingListener(LoggingHandler.groovy:36)
>
>          at
> com.bmuschko.gradle.cargo.util.LoggingHandler$withAntLoggingListener.call(Unknown
> Source)
>          at
> com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask.start(AbstractCargoContainerTask.groovy:91)
>
>          at
> org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
>          at
> org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
>
>          at
> org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
>
>          at
> org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
>
>          at
> org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
>
>          at
> org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
>
>          at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
>
>          at
> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
>
>          at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
>
>          at
> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
>
>          ... 27 more
> Caused by: org.codehaus.cargo.container.ContainerException: Failed to
> deploy
> [/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
>
>          at
> org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:104)
>
>          at
> org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:772)
>          at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:572)
>          at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
>          at
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>          ... 48 more
> Caused by:
> org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The
> username you provided is not allowed to use the text-based Tomcat
> Manager (error 403)
>          at
> org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:710)
>
>          at
> org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:767)
>
>          at
> org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:312)
>
>          at
> org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:99)
>
>          ... 52 more
> Caused by: java.io.IOException: Server returned HTTP response code: 403
> for URL: http://10.4.0.17:8080/manager/text/deploy?path=%2Fbiotestmine
>          at
> org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
>
>          ... 55 more
>
>
> * Get more help at https://help.gradle.org
>
> BUILD FAILED in 31s
> 17 actionable tasks: 11 executed, 6 up-to-date
> [Thread-33] INFO com.zaxxer.hikari.HikariDataSource - db.production -
> Shutdown initiated...
> [Thread-33] INFO com.zaxxer.hikari.HikariDataSource - db.production -
> Shutdown completed.
>
>
>
> _______________________________________________
> dev mailing list
> [hidden email]
> https://lists.intermine.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: The username you provided is not allowed to use the text-based Tomcat Manager

Pengcheng Yang
Hi Julie,

Following the instruction, I have successfully deployed the BioTest Mine.

Thank you.

best,

Pengcheng


On 2019-5-21 15:10, Julie Sullivan wrote:

> Hi Pengcheng,
>
> I think you are missing a role in tomcat. Here's the docs:
>
> https://intermine.readthedocs.io/en/latest/system-requirements/software/tomcat/#after-installation 
>
>
> Follow the instructions for "After installation".
>
> Cheers
> Julie
>
> On 21/05/2019 05:38, Pengcheng Yang wrote:
>> Hi InterMiners,
>>
>> I am testing BioTest Mine and encounter one problem when deploying
>> the webapp with the command "./gradlew cargoDeployRemote
>> --stacktrace". The error message said that "The username you provided
>> is not allowed to use the text-based Tomcat Manager (error 403)". And
>> the full message is listed at the end of the email. I have searched
>> the web and found the solution for the "Unable to Access Tomcat
>> Manager" problem (https://geekflare.com/tomcat-login-problem/). I
>> have modified the files accordingly, but the error remain. What I
>> have done is:
>>
>> 1. modify
>> /home/pengchy/soft/apache-tomcat-8.5.41/webapps/manager/META-INF/context.xml
>> file
>>
>>   <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
>>           allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
>>   -->
>>
>> 2. add manager-gui user and set the password.
>>
>> add the following two lines to the above of </tomcat-users> in the
>> file /home/pengchy/soft/apache-tomcat-8.5.41/conf/tomcat-users.xml
>>
>>    <role rolename="manager-gui"/>
>>     <user username="xxx" password="xxx" roles="manager-gui"/>
>>
>> 3. restart tomecat and run "./gradlew cargoDeployRemote
>> --stacktrace". The error remain there.
>>
>> I have searched the web and found that the above solution is the only
>> one to resolve this problem.
>>
>> Could anyone help me?
>>
>> best,
>>
>> Pengcheng Yang
>>
>>
>> ============== error message =============================
>>
>> -bash-4.2$ pwd
>> /home/pengchy/soft/intermine.4.0/git/biotestmine
>> -bash-4.2$ ./gradlew cargoDeployRemote --stacktrace
>>
>>  > Configure project :
>> Using properties file: '/home/pengchy/.intermine/biotestmine.properties'
>> cleaning
>> deleting idresolver cache
>> deleting datasources.xml
>> deleting organisms.xml
>> deleting publications.xml
>> deleted log files
>>
>>  > Task :webapp:unwarBioWebApp
>>      [unzip] Expanding:
>> /home/pengchy/.gradle/caches/modules-2/files-2.1/org.intermine/bio-webapp/4.0.0/83db7e8fc5b694a646ce244da74ffbe76867e67f/bio-webapp-4.0.0.war
>> into
>> /home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/explodedWebApp
>>
>>
>>  > Task :webapp:summariseObjectStore
>> [summarizeObjectStore] [Task worker for ':' Thread 3] INFO
>> com.zaxxer.hikari.HikariDataSource - db.production - Starting...
>> [summarizeObjectStore] [Task worker for ':' Thread 3] INFO
>> com.zaxxer.hikari.HikariDataSource - db.production - Start completed.
>>
>>
>> FAILURE: Build failed with an exception.
>>
>> * What went wrong:
>> Execution failed for task ':webapp:cargoDeployRemote'.
>>  > org.codehaus.cargo.container.ContainerException: Failed to deploy
>> [/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
>>
>>
>> * Try:
>> Run with --info or --debug option to get more log output.
>>
>> * Exception is:
>> org.gradle.api.tasks.TaskExecutionException: Execution failed for
>> task ':webapp:cargoDeployRemote'.
>>          at
>> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
>>
>>          at
>> org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
>>
>>          at
>> org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
>>
>>          at
>> org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
>>
>>          at
>> org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
>>
>> Caused by: : org.codehaus.cargo.container.ContainerException: Failed
>> to deploy
>> [/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
>>
>>          at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
>>          at
>> org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78)
>>
>>          at
>> org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:103)
>>
>>          at
>> com.bmuschko.gradle.cargo.tasks.remote.RemoteCargoContainerTask.runAction(RemoteCargoContainerTask.groovy:81)
>>
>>          at
>> com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_closure2.doCall(AbstractCargoContainerTask.groovy:92)
>>
>>          at
>> com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask$_start_closure2.doCall(AbstractCargoContainerTask.groovy)
>>
>>          at
>> com.bmuschko.gradle.cargo.util.LoggingHandler.withAntLoggingListener(LoggingHandler.groovy:36)
>>
>>          at
>> com.bmuschko.gradle.cargo.util.LoggingHandler$withAntLoggingListener.call(Unknown
>> Source)
>>          at
>> com.bmuschko.gradle.cargo.tasks.AbstractCargoContainerTask.start(AbstractCargoContainerTask.groovy:91)
>>
>>          at
>> org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
>>          at
>> org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
>>
>>          at
>> org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
>>
>>          at
>> org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
>>
>>          at
>> org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:731)
>>
>>          at
>> org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
>>
>>          at
>> org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
>>
>>          at
>> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
>>
>>          ... 27 more
>> Caused by: org.codehaus.cargo.container.ContainerException: Failed to
>> deploy
>> [/home/pengchy/soft/intermine.4.0/git/biotestmine/webapp/build/libs/webapp.war]
>>
>>          at
>> org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:104)
>>
>>          at
>> org.codehaus.cargo.ant.CargoTask.executeActions(CargoTask.java:772)
>>          at org.codehaus.cargo.ant.CargoTask.execute(CargoTask.java:572)
>>          at
>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
>>          at
>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
>>          ... 48 more
>> Caused by:
>> org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
>> The username you provided is not allowed to use the text-based Tomcat
>> Manager (error 403)
>>          at
>> org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:710)
>>
>>          at
>> org.codehaus.cargo.container.tomcat.internal.TomcatManager.deployImpl(TomcatManager.java:767)
>>
>>          at
>> org.codehaus.cargo.container.tomcat.internal.TomcatManager.deploy(TomcatManager.java:312)
>>
>>          at
>> org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:99)
>>
>>          ... 52 more
>> Caused by: java.io.IOException: Server returned HTTP response code:
>> 403 for URL:
>> http://10.4.0.17:8080/manager/text/deploy?path=%2Fbiotestmine
>>          at
>> org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
>>
>>          ... 55 more
>>
>>
>> * Get more help at https://help.gradle.org
>>
>> BUILD FAILED in 31s
>> 17 actionable tasks: 11 executed, 6 up-to-date
>> [Thread-33] INFO com.zaxxer.hikari.HikariDataSource - db.production -
>> Shutdown initiated...
>> [Thread-33] INFO com.zaxxer.hikari.HikariDataSource - db.production -
>> Shutdown completed.
>>
>>
>>
>> _______________________________________________
>> dev mailing list
>> [hidden email]
>> https://lists.intermine.org/mailman/listinfo/dev
>

_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev