Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to deploy from devcontainer #2427

Open
vermegi opened this issue Feb 5, 2024 · 1 comment
Open

Unable to deploy from devcontainer #2427

vermegi opened this issue Feb 5, 2024 · 1 comment

Comments

@vermegi
Copy link

vermegi commented Feb 5, 2024

Plugin name and version

I ran through the steps from https://learn.microsoft.com/en-us/azure/app-service/quickstart-java?pivots=java-maven-tomcat and tried with both mvn com.microsoft.azure:azure-webapp-maven-plugin:2.12.0:config and mvn com.microsoft.azure:azure-webapp-maven-plugin:2.13.0:config

Plugin configuration in your pom.xml

        <plugin>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-webapp-maven-plugin</artifactId>
            <version>2.13.0</version>
            <configuration>
                <schemaVersion>v2</schemaVersion>
                <resourceGroup>msal4j-servlet-auth-1707140060326-rg</resourceGroup>
                <appName>msal4j-servlet-auth-1707140060326</appName>
                <pricingTier>P1v2</pricingTier>
                <region>swedencentral</region>
                <runtime>
                    <os>Linux</os>
                    <javaVersion>Java 17</javaVersion>
                    <webContainer>Tomcat 10.0</webContainer>
                </runtime>
                <deployment>
                    <resources>
                        <resource>
                            <directory>${project.basedir}/target</directory>
                            <includes>
                                <include>*.war</include>
                            </includes>
                        </resource>
                    </resources>
                </deployment>
            </configuration>
        </plugin>

Expected behavior

Deploy to app service

Actual behavior

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.491 s
[INFO] Finished at: 2024-02-05T13:45:16Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:2.13.0:deploy (default-cli) on project msal4j-servlet-auth: login with (AUTO): UnsatisfiedLinkError: /usr/lib/jvm/msopenjdk-current/lib/libawt_xawt.so: libXext.so.6: cannot open shared object file: No such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Steps to reproduce the problem

I executed exactly the same steps in a cloud shell and deploy was successful.

So somewhere/somehow this is failing when executed from a devcontainer. I also tried different Java versions/base container image versions, all failed on the same error.

@vermegi
Copy link
Author

vermegi commented Feb 6, 2024

Additionaly, I tested if signing in with Azure Account Extension in VS code would fix the problem. But it's giving me the same error. In previous tests I signed in through az login command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant