The main issue is that we cannot get the container to run locally in release mode. While the container environmental variables indicate it should be running in release mode, a license check always occurred on startup.
I believe the issue is that the application discussed here has a dependency on several other projects and it seems we'd have to get all those projects configured to run in release mode in Docker also.
An alternative solution was to solve the license check issue and let the app run in debug mode. My confusion about how the license check works has been cleared up for me, so I marked this ticket as resolved.
We will work on moving our entire microservice solution for local development to Docker and compose files, but that is separate work. If we get stuck later with the issue of running containers in Release mode, we'll open another ticket.
Ahhh. Okay it finally makes sense for me. To get the project to run in the container you need two things:
AbpLicenseCode
in the app configurationI was interpreting the requirements as doing option 1 **OR ** 2, but I have to do both things.
We have eight solutions with licenses and they all have invalid license codes now for some reason. I regenerated one project to generate a valid license code and successfully started in a container. I didn't want to do that for our 7 other solutions, but it appears I will have to if I want to run them in debug mode in containers.
System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile), ".abp", "cli", "access-token.bin");
I confirmed this just prints the path to the correct location of the access-token.bin
file.
I was able to properly transfer the token from the host to the Docker container. The file is indeed in the container's file system in the location noted in previous links. But startup always fails due to license check error despite the token being present in the container.
We are trying to debug in Development environment using Docker. That is the only goal here.
We can use the AbpLicenseCode
value, but we have 8 solutions which means we have to go back and regenerate 8 projects in Suite to have a correct code generated. We've never had to deal with this value before because we've always just used the CLI to login and that just works.
Can you confirm whether the alternative approach documented in other support tickets should or should not work: https://gist.github.com/ebicoglu/f7cd77069fa053cbe9cf9e9ffcc2f2d2
We don't have any issues with our production deployments. The issue is that we are having trouble launching in a Docker container for debugging. Additionally, our AbpLicenseCode
values were invalid. As mentioned, I was able to regenerate a new project with the same name and include in appsettings and this worked.
We did get the app to run with the "Release" environment variable, but the license check still occurred. Is ABP looking at something other than just the ASPNETCORE_ENVIRONMENT
to determine if a license check should occur?
I couldn't get this process to work (is this still a valid option): https://gist.github.com/ebicoglu/f7cd77069fa053cbe9cf9e9ffcc2f2d2
So I did finally get the right AbpLicenseCode
value generated and I was able to start the application by copying that value from a the new ABP project to our existing project. This process was not clearly documented anywhere, but I finally pieced it together from comments from many places.
I do still wonder why I can't get the other approach to work where the access token is copied into the Docker container. I've tried multiple directories. I can confirm the token is copied to the container, but startup always fails the license check with a message that the AbpLicensecode
is missing.
Example comment (though it's a bit old): https://support.abp.io/QA/Questions/69/#answer-00f7ebd2-d7c6-5c6b-e952-39f7557f2968
I'm currently copying the token into two separate locations:
COPY ["access-token.bin", "/root/.abp/cli/"]
COPY ["access-token.bin", "/home/user/.abp/cli/"]
Can anyone explain how to use this access token method of passing the license check?
Hi
Can you set
ASPNETCORE_ENVIRONMENT
to Release and then try?
The container shows "Release" for ASPNETCORE_ENVIRONMENT
value, but I still get:
2023-09-26 13:39:29 [18:39:29 ERR] ABP-LIC-0020 - License code not found! Ensure that your appsettings.json or appsettings.secrets.json has "AbpLicenseCode" key with your license code. 2023-09-26 13:39:29 [18:39:29 ERR] ABP-LIC-ERROR - License check failed for 'Volo.Saas.Domain-v7.0.1.0'. 2023-09-26 13:39:29 2023-09-26 13:39:29 For more information, contact to license@abp.io.
I should note that we have many dependencies. For instance, we've extended the Saas, Identity, and Administration modules. Do all of those need to be built in release also?
Can you share a project that can reproduce the problem? thanks, shiwei.liang@volosoft.com
We can't share the project, but it also can't be reproduced locally. I probably should have mentioned that this is only happening in a hosted environment (Kubernetes cluster on Azure).
We followed: https://docs.abp.io/en/commercial/latest/startup-templates/microservice/synchronous-interservice-communication
I'm really just looking for information about what exactly is happening to get this exception? Is the endpoint simply not found? The not found response always comes back immediately, it's never a timeout situation.
Hey, that was easy! Thank you so much. I have the validation working as desired now.
Hello,
I created a project with ABP Suite in version 6.0.2. And I created an entity with CRUD Page generator. There was no error.
Can you send the project with created in 6.0.2 version via email? Please don't apply workarounds. Please don't upload public platforms.
I created multiple projects last week and none of them worked when trying to generate Angular code. I tried generating code for our existing projects, none of it worked.
But yesterday I generated a new project to provide the information requested (without applying workarounds) and ABP Suite kicked off a new download of packages. And now it all works. It appears generating Angular code for my existing project now works also.
My two colleagues and I have been fighting this for 2 months. Was there an update to ABP Suite published on or after Dec 14?