Skip to content
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

"Failed to connect" v2.99.0 on OSX #110

Closed
cschwarz opened this issue May 1, 2016 · 16 comments
Closed

"Failed to connect" v2.99.0 on OSX #110

cschwarz opened this issue May 1, 2016 · 16 comments

Comments

@cschwarz
Copy link

cschwarz commented May 1, 2016

Trying the latest preview release but getting the following error after entering PAT:

System.TypeInitializationException: The type initializer for 'System.Net.Http.CurlHandler' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Http' threw an exception. ---> System.TypeInitializationException: The type initializer for 'HttpInitializer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at Interop.CryptoInitializer.EnsureOpenSslInitialized()
at Interop.CryptoInitializer..cctor()
--- End of inner exception stack trace ---
at Interop.CryptoInitializer.Initialize()
at Interop.HttpInitializer..cctor()
--- End of inner exception stack trace ---
at Interop.HttpInitializer.Initialize()
at Interop.Http..cctor()
--- End of inner exception stack trace ---
at Interop.Http.GetSupportedFeatures()
at System.Net.Http.CurlHandler..cctor()
--- End of inner exception stack trace ---
at System.Net.Http.CurlHandler..ctor()
at System.Net.Http.HttpClientHandler..ctor()
at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler..ctor(VssCredentials credentials, VssHttpRequestSettings settings)
at Microsoft.VisualStudio.Services.Client.VssConnection..ctor(Uri baseUrl, VssCredentials credentials, VssClientHttpRequestSettings settings)
at Microsoft.VisualStudio.Services.Agent.Util.ApiUtil.CreateConnection(Uri serverUri, VssCredentials credentials)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.d__7.MoveNext()

Are there any prerequisites that needs to be installed?

@chorgo
Copy link

chorgo commented May 2, 2016

Same error here

@bryanmacfarlane
Copy link
Collaborator

bryanmacfarlane commented May 2, 2016

What version of OSX? Any other system info might help us debug. Also clarify if there's any current or legacy core clr tools installations on the box. Our intent is for the OSX drop to be fully self contained ...

@cschwarz
Copy link
Author

cschwarz commented May 2, 2016

OS X 10.11.4
$ mcs --version
Mono C# compiler version 4.2.3.0
$ openssl version
OpenSSL 0.9.8zh 14 Jan 2016

No dotnet CLI installed

Anything else I should check?

@bryanmacfarlane
Copy link
Collaborator

Investigating. Only diff I see is my two OSX machines are 10.11 and 10.11.4

@danbridgellc
Copy link

danbridgellc commented May 2, 2016

For what is worth - I had same issue and after investigating, I found that a pre-req for .Net Core is OpenSSL...I installed OpenSSL via brew and got past that error...unfortunately now I am fighting to get the build process to find xbuild and nuget...I have updated my PATH env variable and verified that I can execute xbuild and nuget from Terminal just fine. Currently stuck with error "nuget was not found in the path."...any suggestions on how to debug the path being searched?

Also - I am running OS X 10.11.4

@bryanmacfarlane
Copy link
Collaborator

@danbridgellc - correct, but @cschwarz noted that he had OpenSSL 0.9.8. What version do you have? Mine works. On our machines, we have:

$ openssl version
OpenSSL 1.0.2f  28 Jan 2016

Regarding PATH (open a separate issue to discuss deeper but quickly) it depends if you are running as a service. When you choose run as a service, we simply generate a plist file. Run ./svc.sh status to see where. In that plist is the path env. You can edit. In node agent, we snapshotted your PATH when writing that. Still not perfect since it doesn't reflect future change (edit it), but better than now. I'm thinking I will output then when configuring. If not running as a svc, we should investigate. Tasks are tool runners and tools are found by running which so they need to be in your path

@bryanmacfarlane
Copy link
Collaborator

I was able to repro on a mac which had 0.9.8.

I updated the instructions here and confirmed it fixed it. I tested on OSX 10.10 and 10.11

https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/latebreaking.md

@danbridgellc
Copy link

Yes I am running OpenSSL 1.0.2g 1 Mar 2016

Regarding PATH - yes I was running as service and found the .plist file where I could modify so I am good for now, thanks!

@JunQianZ
Copy link

same error on my customer's machine. it is
MacOS sierra; 10.12.1.
brew --version: homebrew 1.2.1
openssl version: openSSL 0.9.8zh .

then I tried brew update. brew install openssl as suggested. just below error comes:

uodateing homebrew...
updated fromulae
chakra
Error: your xcode (7.2) is too outdated. please update to Xcode 8.3.2 (or delete it).

my god, it takes so newly version Xcode 8.3.2? the customer didn't want to upgrade to xcode 8.3.2 as they concern the compatible. if we delete the Xcode.I think the build doesn't work, so, what should I do?
thanks.

@TingluoHuang
Copy link
Contributor

@JunQianZ
check this issue #969

@JunQianZ
Copy link

thanks. I solved it. some tricky.
I just uninstall the xcode 7.2. then rerun brew update. brew install openssl. it succeeds.
then, restore xcode;

@mgj
Copy link

mgj commented Jun 10, 2017

I think im seeing this issue on High Sierra 10.13 :

  1. brew install openssl

  2. install dotnet core sdk

  3. install xcode + xcode-select install

  4. Run ./config.sh and observe the CurlHandler error

  5. ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/

  6. ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

  7. ./config.sh

expected output:
build agent is now properly configured

actual output:
[Enter personal access token > **************************************************************
Connecting to server ...
./config.sh: line 19: 34980 Segmentation fault: 11 ./bin/Agent.Listener configure "$@"

@TingluoHuang
Copy link
Contributor

@mgj can you try run ./bin/Agent.Listener configure directly? also, is there any app crash log you can find in OSX ~/Library/Log/...? and can you open a new issue for the problem you hit?

@mgj
Copy link

mgj commented Jun 11, 2017

@TingluoHuang thanks for your response. I can run ./bin/Agent.Listener configure but it fails in the same manner with a segmentation fault after entering my access token.

I have opened #1007 which contains the log you asked for as well as the Agent diag log

@bryanmacfarlane
Copy link
Collaborator

Thanks for opening the other issue. The segmentation fault is not related to this issue.

@mgj
Copy link

mgj commented Jun 11, 2017

Ok. Please let me know if there is any more info you need from me

prebansa pushed a commit to prebansa/azure-pipelines-agent that referenced this issue Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants