-
Notifications
You must be signed in to change notification settings - Fork 301
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
Pyarmor in Docker: ERROR invalid license token, try to run pyarmor reg
to register license again
#1542
Comments
pyarmor reg
to register license againpyarmor reg
to register license again
What's the output of |
Try to start docker container with extra options |
And is there |
Hi, I did what you instructed and this is the output. The problem still persists.
|
No
|
How about |
It seems it should be |
And what's the output of |
Here' the
and also maybe this could be useful:
|
But the registration proceeds without fail so it seems that the connectivity to the auth service is there. There's just no call being made to it when I run |
Please correct me if I'm wrong but |
Try this solution, make sure For example, adding one line in
|
Hi, actually in my case on a Mac in the Docker container the |
Well, how about start docker with |
If |
Then the registration fails
and there is no connectivity between the host and the container |
On macOS and Windows for that matter it won't be the case, because contrary to Linux you cannot run Docker natively. Instead you run it on the side in a Linux VM that resides within some kind of a private network (usually 192...). The Docker network 172... will exist only on the Linux VM but will not be present on your macOS/Windows host. Instead the |
Well I need research this to find new solution. |
What's the output of |
Of course. I'm more than happy to offer my help. This is the output on the macOS side:
This is the Docker container
and this is the man-in-between (the Linux VM I mentioned before):
|
And just to reiterate what I've said before. The container can send requests to |
Is it possible to run |
So what's the ip address of |
I've tried it out also setting host.docker.internal to 172.17.0.1 on both the Linux VM and the container. The problem still persists and this is the log from
Requests/responses:
|
The address in the container was 192.x... when we discussed it previously. |
But I think Even it may not be changed in docker host. |
When I worked directly on the Linux VM I've set it to 172.17.0.1 on both the container and the Linux VM |
Or just for a test, patch If docker host |
The result is exactly the same as here:
and this should be the case actually since if I had |
Since Could you run |
Of course. It seems that it works just fine on the Docker host (Linux VM) itself.
|
By editing
|
This patch may fix segmentfault issue --- a/src/cli/docker.py
+++ b/src/cli/docker.py
@@ -53,7 +53,8 @@ class DockerAuthHandler(socketserver.BaseRequestHandler):
def generate_runtime_key(self, userdata):
ctx = CONFIG['ctx']
ctx.cmd_options['user_data'] = userdata
- return Builder(ctx).generate_runtime_key()
+ Pytransform3._pytransform3.init_ctx(ctx)
+ return Pytransform3.generate_runtime_key(ctx) |
A quick fixed version 8.4.1 has been released for this issue |
Hi, thank you for your assistance. It seems that after these changes if one starts the authentication service on the Linux VM that acts as the Docker host and starts the container with |
Great! It's better to use flag |
Hi, I've been trying to run Pyarmor from a Docker container, but even though the registration process was fixed with Pyarmor 8.4.0 when I run code obfuscation with
pyarmor gen
I'm getting the following error:and
pyarmor.error.log
still showing:If I repeat the
pyarmor reg
registration procedure exactly the same thing happens. I'm working on an Apple silicon MacBook Pro.One more thing that may or may not be of importance in this issue is that I can see the communication between the
pyarmor-auth
service and the container when I runpyarmor reg
(I can see packets received and packets sent in the log ofpyarmor-auth
), whereas there is no indication of any communication when I runpyarmor gen
.The text was updated successfully, but these errors were encountered: