-
Notifications
You must be signed in to change notification settings - Fork 115
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
m2e can't handle authenticated parallel artifacts transfers #250
Comments
Just a bump message... It took me quite a while to find this issue, and the workaround has worked so far, so thanks. But I wish for other people that it could be dealt with, it's all a bit messy isn't it? |
Unfortunately it looks like no one of the active committers (including myself) is working on this at the moment.
From the linked issue I'm not sure if this is really an m2e issue, but I'm not familiar with that specific topic. |
Right, the issue is on aether connector. Unfortunately, there is no active maintainers. On m2e there is only 3 approaches that I can see:
|
Can you reference the issue there?
You probably could propose a patch then? |
Sure. It's already on first post above.
Despite I know what caused the problem (specific commit), I'm not aware of the real problem. So it's not a simple rollback case, it will be needed to understand how aether works and how credentials are passed on new multithreading management added on referred commit. Even if I understand all this and submit a PR, there is a chance that no one approve and merge this PR! |
Upps, didn't see that :-)
If yo don'T try we never know :-) if this is important enough for people (I have never used that) we can try to adopt it at m2e (but need someone who likes to take care) or fork the project. So most interesting at the momment would be:
|
Um... Maybe someone on m2e-core could answer better, but it is directly used by m2e or indirectly used through Eclipse, for sure it's not used by maven (if you run maven on console, or do not use embedded one in eclipse, it works). |
This comment was marked as outdated.
This comment was marked as outdated.
I have a similar issue with the eclipse plugin. I can not upload artifacts bigger than a few MB(500kB works fine, 8.4Mb does not) to my repo. The message is: Failed to execute goal �[32morg.apache.maven.plugins:maven-deploy-plugin:2.7:deploy�[m �[1m(default-deploy)�[m on project �[36mfacerecognition-module�[m: �[1;31mFailed to deploy artifacts: Could not transfer artifact xxxx:jar:0.0.1 from/to 2fmaven (http://xxx/releases): Access denied to http://xxx.jar. Error code 401, Unauthorized�[m -> �[1m[Help 1]�[m |
Repository https://github.com/takari/aether-connector-okhttp has been archived. No chances of corrections on takari side. |
Then obviously that project is dead and you should look for alternatives... It is completely unclear to me what problem should be solved here as it all refers to some commercial product not working under certain circumstances and some workaround when passing a system property but then something else undesired seem to happen... also it seems this is not really something the usual committer/contributors encounter and thus handled with very low priority, so probably you like to provide a PR to fix that together with a test-case to verify it works? Beside that, sponsoring is a good way to get specific issues fixed, so if this is crucial to your business and you likes to speed up the development of m2e in general a sponsoring would allow me to assign more time-slots to bug fixing or contact me for an individual contract for example fixing a specific issue (not limited to m2e scope). |
Wow @laeubi , sorry! Why that?
I think that the problem is well described, but I will be happy to help on better understand any point that is misunderstood!
This issue can be handled on m2e side. Edited first post.
I understand it, it's ok to me, and I am not making any demands. Just updating de issue.
As the only possible way is to change m2e, I can try to make a PR that just downgrade takari connector version. I'm lame on plugin development, but I think that this can be done, but the side of test-case got me. |
As said, if this is important for m2e (I have no clue where/why this takari connector is used) we can try to get clearance to "adopt" the code into m2e itself. If you think it can work without it ... even better :-) So a standalone test-case would actually be great, it seems the workaround is simply like restoring old behavior (only one thread) so for me that the most unclear part, why the workaround seems not valid. Another option seems to ask jfrog supporting parallel deploys ... the can even simply halt one deploy if currently one is running, so throwing 401 seems not suitable here... |
Right, I can see your misunderstand @laeubi !
This is why you mention "commercial product". This is not an issue on JFrog, or Nexus (other issue linked to this one by @chadj2). Problem is on takari connector, and this problem hit others tools around the internet. JFrog and Nexus handles well parallel deploys or downloads. If you run Maven outside m2e (external maven, or directly on shell) it will use threads (by default: 5) and will work. This issue is primarily detected on deploys because they commonly are authenticated, but authenticated downloads will fail too, its' not so common to protect artifacts downloads to be authenticated. This issue was created referencing JFrog because of first notice. But I can change issue title for something better as "m2e can't handle authenticated parallel artifacts transfers". What you think?
This is the correct behavior, a 401 requesting authentication. The takari connector handles this on 1 thread, but fail to do this on threaded requests. I don't have even a clue why!
Workaround is valid. But users eventually got this error and don't know why this is happening, so handling workaround directly on m2e could avoid this new users that don't even know why this is happening. |
Yes if it is about authentication (and not only jfrog) then the title is a bit confusing. Maybe you can even adjust the summary to explain why it works with one thread but not with multiple ones? |
Ok @laeubi, done! |
With #1513 the takari aether connector has been replaced by the standard maven resolver. This will probably fix this issue. |
Original report with more discussions: https://bugs.eclipse.org/bugs/show_bug.cgi?id=562847
Also: takari/aether-connector-okhttp#29 (this repository has been archived)
This is a problem with takari aether connector breaking change in commit takari/aether-connector-okhttp@32ce3f8#diff-aebbc2275687e86e034ea328845cca1c5b3539ca4f5025680ae1295973f5a188.
By default Maven handles artifacts transfer (downloads, deploys) with 5 threads. When the repository is authenticated takari connector fails to handle the authentication negotiation with multiple threads:
Workaround
-Daether.connector.basic.threads=1
.Obs: Problem with workaround is that downloads is 1 threaded also.
Fix suggestions on m2e side
The issue is on takari aether connector. Unfortunately, there is no active maintainers and the repository is now archived.
On m2e there is some suggestions that I think will handle the problem:
The text was updated successfully, but these errors were encountered: