I have created a sample project and tried the following native build command:
./mvnw package -Pnative -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime=docker -DskipTests -X
It failed with the following.
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /Users/nicholas/dev/code-with-quarkus/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar/code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Using docker to run the native image builder
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildContainerRunner] Checking image status quay.io/quarkus/ubi-quarkus-native-image:22.1-java17
22.1-java17: Pulling from quarkus/ubi-quarkus-native-image
Digest: sha256:4a44a9a2b41eb7c0ed5ba705d33c2a42854b3cc9ad40cfdb4dacf231285b4da0
Status: Image is up to date for quay.io/quarkus/ubi-quarkus-native-image:22.1-java17
quay.io/quarkus/ubi-quarkus-native-image:22.1-java17
[DEBUG] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm --rm quay.io/quarkus/ubi-quarkus-native-image:22.1-java17 --version
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM 22.1.0 Java 17 CE (Java Version 17.0.3+7-jvmci-22.1-b06)
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildRunner] docker run --env LANG=C --rm -v /Users/nicholas/dev/code-with-quarkus/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar:/project:z --name build-native-ElbQw quay.io/quarkus/ubi-quarkus-native-image:22.1-java17 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=3 -J-Duser.language=en -J-Duser.country=CA -J-Dfile.encoding=UTF-8 --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.ResourcesFeature,io.quarkus.runtime.graal.DisableLoggingFeature -H:-ParseOnce -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -J-Djava.awt.headless=true -H:FallbackThreshold=0 --link-at-build-time -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http,https -H:-UseServiceLoaderFeature -H:+StackTrace code-with-quarkus-1.0.0-SNAPSHOT-runner -jar code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
Fatal error: com.oracle.svm.core.util.VMError$HostedError: java.nio.file.FileSystemException: /project: Operation not permitted
at com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:72)
at com.oracle.svm.hosted.NativeImageClassLoaderSupport$ClassInit.loadClassesFromPath(NativeImageClassLoaderSupport.java:644)
at com.oracle.svm.hosted.NativeImageClassLoaderSupport$ClassInit.loadClassesFromPath(NativeImageClassLoaderSupport.java:600)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.nio.file.FileSystemException: /project: Operation not permitted
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
at java.base/sun.nio.fs.UnixException.asIOException(UnixException.java:115)
at java.base/sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.readNextEntry(UnixDirectoryStream.java:168)
at java.base/sun.nio.fs.UnixDirectoryStream$UnixDirectoryIterator.hasNext(UnixDirectoryStream.java:198)
at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:349)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2845)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
at com.oracle.svm.hosted.NativeImageClassLoaderSupport$ClassInit.loadClassesFromPath(NativeImageClassLoaderSupport.java:642)
... 11 more
Error: Image build request failed with exit status 1
I have tried many searches to see if anyone has similar issue but so far I have not find any relevant ones. Hope some expert in the quarkus community can shed some light on this
This problem magically went away for me when I move to 2.13.0.CR1
In the mean time my system rebooted and I restarted colima for macOS (which runs my docker)
Related
My eb-engine.log file says the following:
2022/12/02 09:06:55.661307 [INFO] Executing instruction: RunAppDeployPreBuildHooks
2022/12/02 09:06:55.661326 [INFO] Executing platform hooks in .platform/hooks/prebuild/
2022/12/02 09:06:55.661362 [INFO] Following scripts will be executed in order: [00_npm_install.sh]
2022/12/02 09:06:55.661368 [INFO] Try add execution permission
2022/12/02 09:06:55.661375 [INFO] Running script: .platform/hooks/prebuild/00_npm_install.sh
2022/12/02 09:07:19.325093 [ERROR] An error occurred during execution of command [app-deploy] - [RunAppDeployPreBuildHooks]. Stop running the command. Error: Command .platform/hooks/prebuild/00_npm_install.sh failed with error exit status 244.
I do have permissions set up for the file(s) in question:
$ git ls-files -s .platform
100755 e8c201d7464dcf52ae874bb106de1a0da6a7bd20 0 .platform/confighooks/prebuild/00_npm_install.sh
100755 e8c201d7464dcf52ae874bb106de1a0da6a7bd20 0 .platform/hooks/prebuild/00_npm_install.sh
100644 7744deea7dfdafe4f584e01991cb6e80ee3079b9 0 .platform/nginx/conf.d/proxy.conf
But this error occurs anyway ever since I committed (using github desktop) and pushed from a new device, which was an update that did not tweak my files. Before that commit & push, the output was the following:
2022/11/30 18:56:18.539468 [INFO] Executing instruction: RunAppDeployPreBuildHooks
2022/11/30 18:56:18.539488 [INFO] Executing platform hooks in .platform/hooks/prebuild/
2022/11/30 18:56:18.539521 [INFO] Following scripts will be executed in order: [00_npm_install.sh]
2022/11/30 18:56:18.539527 [INFO] Try add execution permission
2022/11/30 18:56:18.539535 [INFO] Adding execute mode to file, original mode is 436
2022/11/30 18:56:18.539543 [INFO] Running script: .platform/hooks/prebuild/00_npm_install.sh
2022/11/30 18:56:32.415210 [INFO] Finished running scripts in /var/app/staging/.platform/hooks/prebuild
Does anyone know what could have changed or how to fix this?
It turns out something was wrong with my configuration of EB, it later also stopped giving me logs when I requested them. I set up some new configuration and after the environment was rebuilt, everything worked again.
I'm currently learning Quarkus and I have an issue with Native testing.
In this repository (the dev branch), I can package into JAR and binary and run them ([AdinhLux/quarkus-1-intro][https://github.com/AdinhLux/quarkus-1-intro/tree/dev]).
I'm just encountering an issue when running the below command line. It seems my Maven was looking for an information into .target/quarkus.log but nothing is written.
mvn verify -Pnative
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.agoncal.quarkus.starting.BookResourceIT
Jul 20, 2022 4:48:58 PM org.jboss.threads.Version <clinit>
INFO: JBoss Threads version 3.4.2.Final
Executing "/Users/adinhlux/development/IntelliJProjects/rest-book/target/rest-book-1.0.0-SNAPSHOT-runner -Dquarkus.http.port=8081 -Dquarkus.http.ssl-port=8444 -Dtest.url=http://localhost:8081 -Dquarkus.log.file.path=/Users/adinhlux/development/IntelliJProjects/rest-book/target/quarkus.log -Dquarkus.log.file.enable=true"
Waited 60 seconds for target/quarkus.log to contain info about the listening port and protocol but no such info was found
[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 2, Time elapsed: 61.737 s <<< FAILURE! - in org.agoncal.quarkus.starting.BookResourceIT
[ERROR] org.agoncal.quarkus.starting.BookResourceIT.shouldCountAllBooks Time elapsed: 0.012 s <<< ERROR!
java.lang.RuntimeException: java.lang.IllegalStateException: Unable to determine the status of the running process. See the above logs for details
I'm running my project on macOS Monterey M1 with the following settings :
sdk install java 17.0.4-oracle
brew install --cask graalvm/tap/graalvm-ce-java17
sdk install maven 3.8.6
sdk install quarkus 2.10.2.Final
xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.1.0/Contents/Home
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
export PATH=$JAVA_HOME/bin:$PATH
cd $JAVA_HOME/bin
gu install native-image
I resolved my issue .
In application.properties you need this :
quarkus.log.category."org.agoncal".level=DEBUG
I am trying to containerize my application build, though, when running the build that uses bazel with bazel-gazelle inside a container I will get this error:
$ bazel run --spawn_strategy=local //:gazelle --verbose_failures
INFO: Analyzed target //:gazelle (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/BUILD.bazel:43:15: GoToolchainBinary external/go_sdk/builder [for host] failed: (Exit 1): go failed: error executing command
(cd /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/execroot/__main__ && \
exec env - \
GOROOT_FINAL=GOROOT \
external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a)
# Configuration: e0f1106e28100863b4221c55fca6feb935acec078da5376e291cf644e275dae5
# Execution platform: #local_config_platform//:host
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
Target //:gazelle failed to build
INFO: Elapsed time: 2.302s, Critical Path: 0.35s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
I tried to run it standalone:
$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
and still got no success.
Never had this kind of link problem and the linker don't provide much more information. Tried to install all packages I could think of and still no luck.
For context:
Running Ubuntu 20.04 LTS
Docker 20.10.9
Bazel 4.2.2
Rules GO v0.31.0
Bazel Gazelle v0.25.0
Also tried to run it with the strace, though I don't think I am skilled enough to find meaningful information from the tool output.
#edit
For more context:
e$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -v -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
HEADER = -H5 -T0x401000 -R0x1000
searching for runtime.a in /opt/go/pkg/linux_amd64/runtime.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
I am very new to docker so this may be a simple fix.
I am trying to get an instance of sitespeed.io up and running by following their docs on a Windows 10 machine which has a default install of Docker - not using Windows containers, C is shared.. Install steps: https://www.sitespeed.io/documentation/sitespeed.io/installation/#windows-1
Step 1 works fine.
C:\Users\Vicky> docker pull sitespeedio/sitespeed.io
Step 2 does not.
C:\Users\Vicky> docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
This results in an error that I am looking for help with. Specifically:
C:\WINDOWS\system32>docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
docker: Error response from daemon: create $(pwd): "$(pwd)" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'docker run --help'.
So running the command as per suggestion from Tarun: https://stackoverflow.com/users/2830850/tarun-lalwani works.
docker run --rm -v "%cd%":/sitespeed.io sitespeedio/sitespeed.io http: //www.yahoo.com -b firefox (Space added to URL so you can see the full string.)
Now it produces the following error...
docker run --rm -v "%cd%":/sitespeed.io sitespeedio/sitespeed.io https://www.yahoo.com -b firefox
Google Chrome 60.0.3112.78
Mozilla Firefox 54.0
[2017-09-13 22:58:56] INFO: Versions OS: linux 4.9.41-moby nodejs: v6.11.1 sitespeed.io: 5.5.0 browsertime: 1.6.1 coach: 0.36.0
[2017-09-13 22:58:57] INFO: Starting firefox for analysing https://www.yahoo.com 3 time(s)
[2017-09-13 22:58:57] Testing url https://www.yahoo.com run 1
[2017-09-13 22:59:39] Catched a WebDriverError [Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com.]. Try one more time.WebDriverError: Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com.
[2017-09-13 23:00:20] WebDriverError:WebDriverError: Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com.
[2017-09-13 23:00:20] Could not load URLUrlLoadError: Failed to load https://www.yahoo.com, cause: Reached error page: about:neterror?e=dnsNotFound&u=https%3A//www.yahoo.com/&c=UTF-8&f=regular&d=Firefox%20can%E2%80%99t%20find%20the%20server%20at%20www.yahoo.com.
[2017-09-13 23:00:21] ERROR: https://www.yahoo.com generated the following error in Browsertime UrlLoadError: Failed to load https://www.yahoo.com
at BrowsertimeError (/usr/src/app/node_modules/browsertime/lib/support/errors.js:5:5)
at UrlLoadError (/usr/src/app/node_modules/browsertime/lib/support/errors.js:19:5)
at getUrl.then.then.catch.catch.e (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:175:15)
From previous event:
at SeleniumRunner.loadAndWait (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:173:13)
at Promise.resolve.tap.tap.tap.tap.tap (/usr/src/app/node_modules/browsertime/lib/core/engine.js:281:27)
From previous event:
at runIteration (/usr/src/app/node_modules/browsertime/lib/core/engine.js:281:10)
at Promise.reduce (/usr/src/app/node_modules/browsertime/lib/core/engine.js:357:27)
From previous event:
at Promise.resolve.tap.tap.tap.tap.result (/usr/src/app/node_modules/browsertime/lib/core/engine.js:354:17)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
From previous event:
at Engine.run (/usr/src/app/node_modules/browsertime/lib/core/engine.js:353:8)
at engine.start.then (/usr/src/app/lib/plugins/browsertime/analyzer.js:95:26)
From previous event:
at Object.analyzeUrl (/usr/src/app/lib/plugins/browsertime/analyzer.js:95:8)
at storageManager.createDirForUrl.then.then (/usr/src/app/lib/plugins/browsertime/index.js:179:32)
at /usr/src/app/node_modules/mkdirp/index.js:30:20
at FSReqWrap.oncomplete (fs.js:123:15)
From previous event:
at Object.processMessage (/usr/src/app/lib/plugins/browsertime/index.js:179:12)
at queue.process.message (/usr/src/app/lib/support/queueHandler.js:183:32)
at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:92:21)
at Immediate.drain (/usr/src/app/node_modules/concurrent-queue/index.js:73:84)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
[2017-09-13 23:00:21] ERROR: TypeError: Cannot read property 'getItems' of undefined
at Object.summarize (/usr/src/app/lib/plugins/assets/aggregator.js:103:49)
at Object.processMessage (/usr/src/app/lib/plugins/assets/index.js:40:36)
at queue.process.message (/usr/src/app/lib/support/queueHandler.js:183:32)
at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:92:21)
at Immediate.drain (/usr/src/app/node_modules/concurrent-queue/index.js:73:84)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
[2017-09-13 23:00:21] INFO: Render HTML for 1 page(s)
[2017-09-13 23:00:21] INFO: HTML stored in /sitespeed.io/sitespeed-result/www.yahoo.com/2017-09-13-22-58-56
[2017-09-13 23:00:21] INFO: Finished analysing https://www.yahoo.com
Try use "." instead which means to use the current directory. The updated example then looks like:
docker run --rm -v .:/sitespeed.io sitespeedio/sitespeed.io https://www.yahoo.com -b firefox
It is because in your present working directory the command is unable to find the folder "sitespeed.io". Run the command like below:
docker run --rm -v "$(pwd)" sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
And if you are using a windows machine, try doing the below
docker run --rm -v "${pwd}":/sitespeed.io sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
Please try below :
C:\Users\Vicky> docker run --shm-size=1g --rm -v "$(pwd)":/Users/Vicky sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
You need to provide the present working directory path in place of sitespeed.io
C:\Users\Vicky> docker run --shm-size=1g --rm -v "$(pwd)":/Users/Vicky sitespeedio/sitespeed.io https://www.sitespeed.io -b firefox
I am trying to script the IPA creation process for Appcelarator Alloy project with grunt using the grunt-appc-cli plugin.
My target config looks like below:
'dist-prod': {
'command': "run",
'args': [
'-p', 'ios',
'-T', 'dist-adhoc',
'-R', '<Dev Cert Name>',
'-P', '<Provisioning Profile UUID>',
'-O', './dist/prod/',
'--log-level', 'trace'
]
},
Running this grunt target gets stuck at following:
>> [INFO] JavaScript files need to be encrypted
>> [INFO] Creating Xcode project
>> [TRACE] Removing pre-compile phase
>> [TRACE] Adding 3 native module libraries
>> [TRACE] No extensions to add
>> [INFO] Creating Entitlements.plist
>> [INFO] Creating Info.plist
>> [INFO] Disabling ATS
>> [INFO] Creating main.m
>> [INFO] Creating Xcode config files
>> [INFO] Copying Titanium libraries
>> [INFO] Copying Titanium iOS files
>> [TRACE] Skipping Classes/ApplicationRouting.m, it'll be processed later
After a while I have to Ctrl+C to kill without generating an IPA.
Any pointers to debug this issue?
**** More Info ****
I tried to run the appc run cmd directly and end up with the following error message:
$ appc run -p ios -T dist-adhoc -R "<Dev Cert Name>" -P "<Provisioning Profile UUID>" -O ../Svc --log-level trace
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR] CompileC build/Intermediates/FSM.build/Release-iphoneos/FSM.build/Objects-norm
al/armv7/TiUIiOSProxy.o Classes/TiUIiOSProxy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] (1 failure)
Make sure you are running on Xcode 7.3.1 and above and Titanium SDK 5.4 GA - That should address your problem.
Check more details here - https://jira.appcelerator.org/browse/TIMOB-23674
If you still see the problem with the above environment, please provide more details in the JIRA ticket.