@p-oleg

Почему при деплое war на удаленный Tomcat ошибка: Cannot invoke Tomcat manager: Connection reset by peer: socket write error?

Пытаюсь задеплоить war с помощью tomcat7:deploy на Tomcat.
Все делаю по инструкции с сайта https://mkyong.com/maven/how-to-deploy-maven-based...

На локальном компе все деплоится на ура.

А на удаленный сервер возникает ошибка:
Cannot invoke Tomcat manager: Connection reset by peer: socket write error

tomcat-users.xml
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
...
<role rolename="admin"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="user" password="pwd" roles="admin,manager-gui,manager-script,manager-jmx,manager-status"/>
</tomcat-users>


В .m2/settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings>
   <servers>
	  
      <server>
        <id>ds</id>
        <username>user</username>
        <password>pwd</password>
      </server>	  

    </servers>
</settings>


В pom.xm

<build>
    <finalName>telecom</finalName>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.2.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>


       <plugin>
           <groupId>org.apache.tomcat.maven</groupId>
           <artifactId>tomcat7-maven-plugin</artifactId>
           <version>2.2</version>
           <configuration>
             <update>true</update>
             <server>ds</server>
             <url>http://192.168.115.200:8080/manager/text</url>
           </configuration>
         </plugin></b>

       </plugins>
     </pluginManagement>
   </build>


Запускаю:
mvn tomcat7:deploy

Получаю:

[INFO] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ telecom ---
[INFO] Deploying war to 192.168.115.200:8080/telecom
Uploading: 192.168.115.200:8080/manager/text/deploy?path=%2Ft...
2186/26839 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: 192.168.115.200:8080/manager/text/deploy?path=%2Ft...
2184/26839 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: 192.168.115.200:8080/manager/text/deploy?path=%2Ft...
2184/26839 KB
[INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
[INFO] Retrying request
Uploading: 192.168.115.200:8080/manager/text/deploy?path=%2Ft...
2186/26839 KB
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.500 s
[INFO] Finished at: 2020-04-18T01:45:42+03:00
[INFO] Final Memory: 29M/279M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project telecom: Cannot invoke Tomcat manager: Connection reset by peer: socket write error -> [Help 1]

Размер war 27 Mb

Уже не знаю куда куда копать..
Гуглил, все возможные ошибки изучил...
  • Вопрос задан
  • 1296 просмотров
Решения вопроса 1
xez
@xez Куратор тега Java
TL Junior Roo
Проблема с доступом к менеджеру.
Рецепт тут:
https://stackoverflow.com/questions/36703856/acces...
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы