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

Improve Vert.x support (Generator + Enricher) #584

Closed
manusa opened this issue Feb 22, 2021 · 1 comment
Closed

Improve Vert.x support (Generator + Enricher) #584

manusa opened this issue Feb 22, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@manusa
Copy link
Member

manusa commented Feb 22, 2021

Description

Current Vert.x support implementation works with io.reactiverse Vert.x Maven Plugin, or with Vanilla Vert.x < 4.

However, when creating a Vert.x application from https://start.vertx.io/ and deploying to Kubernetes, the following error is received:

SEVERE: Failed to create the vert.x instance
java.lang.IllegalStateException: Failed to create cache dir: /tmp-bf04be10-bf2a-455f-b49b-c133796d22b2
at io.vertx.core.file.impl.FileCache.setupCacheDir(FileCache.java:59)
at io.vertx.core.file.impl.FileCache.setupCache(FileCache.java:29)
at io.vertx.core.file.impl.FileResolver.(FileResolver.java:65)
at io.vertx.core.impl.VertxFactory.createFileResolver(VertxFactory.java:164)
at io.vertx.core.impl.VertxFactory.vertx(VertxFactory.java:78)
at io.vertx.core.Vertx.vertx(Vertx.java:86)
  • Apparently, adding the following property -Dvertx.disableFileCPResolving=true to the Java Options fixes the issue.

  • Modifying the temporary directory location configuration solves the problem.
    In Vert.x v4 there is no subdirectory created, the configuration is used as a prefix instead /tmpbf04be10... as opposed to /tmp/bf04be10... which produced the aforementioned issue.
    Changing this configuration to something like /tmp/vertx-cache fixes the issue and doesn't break compatibility with v3.
    It will also preserves the Cache ClassPath resolution features

  • Port inference is something that could be improved too. Still need to find best approach for Vanilla Vert.x projects.

Expected behavior

  • Quick start project via https://start.vertx.io/ with Vert.x Web
  • Compile and Deploy:
    $ mvn clean package k8s:build k8s:push k8s:resource k8s:apply
  • Application is deployed successfully
@manusa manusa added the enhancement New feature or request label Feb 22, 2021
@manusa manusa self-assigned this Mar 4, 2021
@manusa
Copy link
Member Author

manusa commented Mar 5, 2021

As for the port inference, there is not an easy way to infer the exposed ports since in many cases ports are assigned programmatically.
There's already some sort of integration with Vert.x Config and properties files that we may need to revisit in the future.

@manusa manusa closed this as completed Mar 5, 2021
@manusa manusa added this to the 1.2.0 milestone Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant