I'm facing a problem since I migrate from Docker Toolbox for windows to Docker Desktop as the old one is now deprecated and not in development.
I created a new Liferay 7.2 workspace and generated a sample mvc portlet module and I'm trying to create a docker container as described in the Help Center. So I did not customize any stuff in Liferay until now, I just try to see how an image would be generated.
I executed the gradle task createDockerContainer and everything went ok until such final step where I got the error below:
...
Step 7/7 : COPY --chown=liferay:liferay 100_liferay_image_setup.sh /usr/local/liferay/scripts/pre-configure/100_liferay_image_setup.sh
Successfully built 18zsebqz71b
Successfully tagged sample-project:7.2.1-ga2
Created image with ID '18zsebqz71b'.
> Task :createDockerContainer FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':createDockerContainer'.
> {"message":"invalid volume specification: '/run/desktop/mnt/host/d/workspaces/sample-project/build/docker/deploy:rw'"}
I have my doubts about windows paths...
My configuration :
Docker desktop 2.4.0
Liferay 7.2.1-ga2
WSL2 enabled
WINDOWS 10 HOME (2004)
Liferay Gradle workspace plugin 3.0.11
gradle properties plugin 1.4.6
Thanks for your help !
I faced the same problem and fixed it following the instructions below from https://liferay.dev/blogs/-/blogs/local-work-with-dxp-cloud:
Q2: Error message
What went wrong:
Execution failed for task ':createDockerContainer'.
{"message":"invalid volume specification: '/host_mnt/d/repos/private/lctgelesis/liferay/build/docker/deploy:rw'"}
A2: Update your Workspace version to at least 3.3.2. If you are using a newly generated workspace, this should not be an issue.
In gradle.settings, update the version number of “com.liferay.gradle.plugins.workspace” to version 3.3.2
Related
I created a build system on windows 2019 server where I installed Jenkins version 2.375.1 and which is running Java 17. I am completely new in this and doing it for first time.
Here is the issue: Whenever I run any job, sometime s(4-6 out of 10) it fails by throwing an exception. See below :
java.nio.channels.ClosedChannelException
at jenkins.agents.WebSocketAgents$Session.closed(WebSocketAgents.java:153)
at jenkins.websocket.WebSockets$1.onWebSocketClose(WebSockets.java:80)
at jenkins.websocket.Jetty10Provider$2.onWebSocketClose(Jetty10Provider.java:149)
at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.notifyOnClose(JettyWebSocketFrameHandler.java:308)
at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.onClosed(JettyWebSocketFrameHandler.java:292)
at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.lambda$closeConnection$0(WebSocketCoreSession.java:272)
at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1450)
at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1487)
at org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker$1.handle(AbstractHandshaker.java:212)
at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.lambda$closeConnection$1(WebSocketCoreSession.java:272)
at org.eclipse.jetty.util.Callback$4.completed(Callback.java:184)
at org.eclipse.jetty.util.Callback$Completing.succeeded(Callback.java:344)
at org.eclipse.jetty.websocket.common.JettyWebSocketFrameHandler.onError(JettyWebSocketFrameHandler.java:268)
at org.eclipse.jetty.websocket.core.internal.WebSocketCoreSession.lambda$closeConnection$2(WebSocketCoreSession.java:284)
at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1468)
at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1487)
............
............
............
And the log I got in node machine on console is :
INFO: Connected
Jan 15, 2023 8:05:02 AM hudson.remoting.UserRequest perform
WARNING: LinkageError while performing
UserRequest:hudson.node_monitors.SwapSpaceMonitor$MonitorTask#4c55cc1c
java.lang.UnsatisfiedLinkError: C:\Users\test*****\AppData\Local\Temp\jna--202642030\jna2121667260400486382.dll: A dynamic link library (DLL) initialization routine failed
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1045)
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:1015)
at com.sun.jna.Native.<clinit>(Native.java:221)
at com.sun.jna.Structure.setAlignType(Structure.java:291)
at com.sun.jna.Structure.<init>(Structure.java:208)
at com.sun.jna.Structure.<init>(Structure.java:204)
at com.sun.jna.Structure.<init>(Structure.java:191)
at com.sun.jna.Structure.<init>(Structure.java:183)
at org.jvnet.hudson.Windows$MEMORYSTATUSEX.<init>(Windows.java:67)
Some more info about configuration :
Both controller and node machine is windows server 2019
Since in latest Jenkins the java web connect(Run Jenkins as service on node) is not available so directly running the agent command in node's CLI.
Both controller and node is running Java v17
I went through couple of links and tried all the possible suggestion provided like power management settings on salve machine, increasing Jenkins build timeout settings etc... but no luck.
Any help on this is highly appreciated.
Thanks.
Not sure if there is a bug in Jenkins itself or something. I could not find the answer of the exact issue but after making some changes in jenkins configuration, now i am able to run all the jobs without getting above exception.
Here it is : Earlier i checked jenkins to use websocket in slave configuration. If i just disable it and run then not getting any issue.
Just disbaling this worked for me.. Thanks.
Created a new .NET CORE 2.1 (preview) web app. Running it in local docker with Linux container
I am getting compiler error:
Error Building blobtest
Service 'blobtest' failed to build: manifest for microsoft/aspnetcore:2.1 not found.
My dotnetversion
C:\WINDOWS\system32>dotnet --version
2.1.300-preview2-008530
They have changed the repo for .NET Core 2.1 onwards to microsoft/dotnet.
Change your FROM statement to reference microsoft/dotnet using the following tags:
2.1-sdk
2.1-aspnetcore-runtime
2.1-runtime
Documentation on how to upgrade can be found here
I had this issue as well. I thought I'd update this post to show the fix here. Thanks to Marius Bidireac for the link to the resource.
Here is an excerpt from the original docker file
FROM microsoft/aspnetcore:2.0 AS base
FROM microsoft/aspnetcore-build:2.0 AS build
Here is an excerpt from the corrected docker file
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
FROM microsoft/dotnet:2.1-sdk AS build
If you are using GitLab CI, then these images don't work—maybe because they changed the names of the images again. See official page on Docker.
If I used the labels suggested by this answer,
image: microsoft/dotnet:2.2
Then, it kept giving the errors,
manifest for microsoft/dotnet:2.2 not found
Solution to this was to use the recent naming convention provided by Microsoft. Please see the Docker link I provided above. In my GitLab CI (.gitlab-ci.yml) file I used the following and it worked,
image: mcr.microsoft.com/dotnet/core/sdk:2.2
Now the build pipeline succeeds just fine.
I followed the link to install kylo with other components mentioned in Docker file.
https://github.com/keven4ever/kylo_docker
But getting below error while running the docker.
java.lang.UnsupportedClassVersionError
Need to understand where is the issue. I have tried the latest version of Kylo 0.9.0.1 also but getting the same error.
I am currently trying to get an ASP.NET Core 1.1 testproject to build within the microsoft/aspnetcore-build:1.1.0-msbuild docker image.
I am running Docker on Windows 10 Pro 64 and have the newest CLI/SDK (1.0.0-preview4-004233) installed. And I think there lies the problem. The current image uses (1.0.0-preview3-004056) and throws an error "error MSB4057: The target Restore does not exist in the project." when I execute "dotnet restore" within the running container in interactive mode.
My question is:
Is it the version mismatch that creates the error or am I missing something? My guess is that it has to do with some msbuild specific changes between preview3 and preview4.
Can I build my own docker image that uses the right SDK version? Links to good tutorials are very appreciated.
Steps to replicate:
Install the newest 1.1 SDK
Open Powershell and navigate in an new and empty project folder
Validate that you have preview4 "dotnet --info"
Create new project "dotnet new -t Web"
Open the *.csproj file change netcoreapp1.0 to netcoreapp1.1 and
Microsoft.NETCore.App Version to "1.1.0".
Restore packages "dotnet restore"
Test with "dotnet run"
Start docker-container in interactive mode
docker run -it --rm -v "$pwd:/sln" --workdir /sln microsoft/aspnetcore-build:1.1.0-msbuild
Within the running container use "dotnet restore" to force the error
Cheers
Martin
Tooling is still in preview, and there are huge movements about xproj/csproj project file format. So it's very probable that differences between preview3 and preview4 are critical for your project.
Install appropriate (preview3) CLI to your computer.
There is no user-friendly listing of al versions on MS site, but in docker image you can see download location like this:
https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-dev-debian-x64.$DOTNET_SDK_VERSION.tar.gz
Replace variables with desired values: 1.0.0-preview3-004056 and dotnet-dev-win-x64.1.0.0-preview3-004056.exe (second is guess using up-to-date file names from download page).
Now you need to set you app to use appropriate tooling version (now you have two installed). Create global.json file with:
{
"sdk": {
"version": "1.0.0-preview3-004056"
}
}
To verify: running dotnet --version from solution dir (or below) will print 1.0.0-preview3-004056, while running from any other folder will print 1.0.0-preview4-004233
I'm having trouble running Grails on my PC (running Windows 7).
It's been a couple of years since I last worked with Grails, and I have a new computer. So I downloaded Grails and NetBeans and followed the instructions. (Grails: version 2.3.7, NetBeans: version 7.4.)
Everything seems to be working. Both the Java JDK and Grails work - I can run "grails" from the command prompt. And it was easy to activate the support for Grails in NetBeans.
I created a very simple "Hello world" application. It compiles fine - and I can run "grails war" to create a War file. But I can't get it to run on my PC. I get the same error using "Run" in NetBeans and when running "grails run-app" at the command prompt:
|Running Grails application
Error opening zip file or JAR manifest missing : C:\Program%20Files\Grails
\lib\org.springframework\springloaded\jars\springloaded-1.1.5.RELEASE.jar
Error occurred during initialization of VM
agent library failed to init: instrument
Error |
Forked Grails VM exited with error
And the program won't start. The jar in question isn't missing, so I can't see what's wrong. Any ideas? I'd be more than grateful for some help! :-)
/Anders from Sweden
Move your copy of grails to C:\ and try again.
There is a known problem with location with space symbol. You can see it in stacktrace:
C:\Program%20Files\...