Can't connect Backpack error code 77 .

Can't connect Backpack error code 77 .

Takeshi Matsuzaki -
回帖数:16

Hi, moodlers !

Failed to connect openbadge's backpack.
From Moodle's [Sign in with your Email], login to Moodle was success, but this error message was shown.

You could not be connected to an external backpack for the following reason: The connection request failed (error code 77).

My account is on backpack and I can login there directory.
Moodle version is 2.6.1+(Build: 20140131) and 2.5.2+(Build 20131025)
-------
I searched this message, but can't find the hint.
Anyone can help me, please.

 

回复Takeshi Matsuzaki

Re: Can't connect Backpack error code 77 .

Yuliya Bozhko -

Hi Takeshi,

Haven't seen anything like this before really 糊涂 Is there any chance you can check your web server logs? What kind set up do you have (Apache or IIS, using proxy, any firewalls)? Any more information would be appreciated!

Thanks!

Yuliya

回复Yuliya Bozhko

Re: Can't connect Backpack error code 77 .

Takeshi Matsuzaki -

Hi Yuliya, Thank you for your response. This is the log when the error occured .The IP address and FQDN are changed for security reason.

2xx.1xx.2xx.2xx - - [08/Feb/2014:18:13:33 +0900] "POST /badges/backpackconnect.php HTTP/1.1" 404 164 "http://MYMOODLESERVER/badges/mybackpack.php" "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"

 

And other information.

Server version: Apache/2.2.23 (Unix)
Server built: Oct 21 2012 20:35:32

Firewall
Inbound permit 80, 443, 22(only paticular IP)
Outbound nothing

Thanks !

回复Takeshi Matsuzaki

Re: Can't connect Backpack error code 77 .

Yuliya Bozhko -

Hi Takeshi,

I don't think it's a Badges issue. The only thing I could find on curl error 77 was this:

http://curl.haxx.se/libcurl/c/libcurl-errors.html

CURLE_SSL_CACERT_BADFILE (77)

Problem with reading the SSL CA cert (path? access rights?)

You can have a look at how this issue can be diagnosed/resolved at http://stackoverflow.com/questions/17064601/curl-not-working-error-77-for-ssl-connections-on-centos-for-non-root-users

I don't think I can suggest anything else... Please let me know how it goes and if you discover something else.

Yuliya

回复Yuliya Bozhko

Re: Can't connect Backpack error code 77 .

Takeshi Matsuzaki -

Thank you Yuliya .

This site uses wild card SSL and its not a famous CA . This may be the bad effect .

I will chase this problem and report it  .

Regards

Takeshi Matsuzaki

回复Yuliya Bozhko

Re: Can't connect Backpack error code 77 .

Takeshi Matsuzaki -

Hi Yuliya .

Sorry for tooooo late response.
But the problem was fixed !!

As you mentioned, I check my SSL again. and find out the problem was on ca_bundle.crt .

This command also returned error 77 .
curl -I -v https://google.com

So that I remade ca_bundle.crt as following this page .
http://blog.unixy.net/2013/08/curl-77-problem-with-the-ssl-ca-cert-path-access-rights-resolved/
Notice : RPM location was changed .

After restating httpd, mozilla backpack works well from mooodle.

Thank you for your advice, without you , I still am in confusion .

Takeshi Matsuzaki

回复Takeshi Matsuzaki

Re: Can't connect Backpack error code 77 .

Yuliya Bozhko -

Hey,

Great to hear that! 微笑

Yuliya

回复Yuliya Bozhko

Re: Can't connect Backpack error code 77 .

William Beazley -

I am having almost identical connection problems with error code 60.  Any ideas to pass to my system guy?

回复William Beazley

Re: Can't connect Backpack error code 77 .

Yuliya Bozhko -

Hi William,

You should probably share this thread with him.

Error code 60 for CURL is described as "Peer certificate cannot be authenticated with known CA certificates." This might mean that you are missing some certificates or maybe that they are not on the list of trusted certificates. I am not an admin myself so, can't help much. But I am pretty sure that your system admin will know what to do in this case.

Yuliya

回复Yuliya Bozhko

Re: Can't connect Backpack error code 77 .

William Beazley -

Yuliya,

That was the problem as I understand it:

see the SSL_VERIFYPEER variable in my sys admin's change below

BEFORE

$options = array(
    'FRESH_CONNECT'  => true,
    'RETURNTRANSFER' => true,
    'FORBID_REUSE'   => true,
    'SSL_VERIFYPEER' => true,
    'SSL_VERIFYHOST' => 2,
    'HEADER'         => 0,
    'HTTPHEADER'     => array('Content-type: application/x-www-form-urlencoded'),
    'CONNECTTIMEOUT' => 0,
    'TIMEOUT' => 10, // Fail if data not returned within 10 seconds.
);

AFTER

$options = array(
    'FRESH_CONNECT'  => true,
    'RETURNTRANSFER' => true,
    'FORBID_REUSE'   => true,
    'SSL_VERIFYPEER' => false,
    'SSL_VERIFYHOST' => 2,
    'HEADER'         => 0,
    'HTTPHEADER'     => array('Content-type: application/x-www-form-urlencoded'),
    'CONNECTTIMEOUT' => 0,
    'TIMEOUT' => 10, // Fail if data not returned within 10 seconds.
);

回复William Beazley

Re: Can't connect Backpack error code 77 .

Simon Coggins -

It's not a good idea to do that, you are just disabling the check instead of fixing the problem that is causing the check to fail. I'd recommend this article: 

 
Simon
回复Simon Coggins

Re: Can't connect Backpack error code 77 .

William Beazley -

Simon,

Yes, you are correct and I was about the post that caution to above.  We are going to fix that properly before going live.

Thanks for adding that comment.

Bill

回复William Beazley

Re: Can't connect Backpack error code 77 .

William Beazley -

OK. I've got that pesky error code 60 again.  this time, I can connect to my backpack but a new user cannot.  My system guy found that moodle is trying to find:

https://verifier.login.persona.org/verify

but the site does not exist.

I can log into her backpack fine directly but cannot do it throught the moodle badge backpack interface.

I'm using 2.6.2

Bill Beazley


回复William Beazley

Re: Can't connect Backpack error code 77 .

Yuliya Bozhko -

Hi William,

I just checked myself and verification works fine.

Verifier is not a web site, it is a service and we are posting a request to it.

If your admin guy does 

      curl -X POST 'https://verifier.login.persona.org/verify'

he will see that you are still getting response from the service.

Yuliya

回复Yuliya Bozhko

Re: Can't connect Backpack error code 77 .

William Beazley -

This is very strange.  I can use backpack fine and I can log into her's separately no problem.  But when she tries to upload a badge, we get a connection error.  She is downloading badges and uploading to the backpack OK but not directly upload from moodle.

Bill

回复William Beazley

Re: Can't connect Backpack error code 77 .

William Beazley -

OK.  My system guy resolved it.  It had something to do with certificates, curls and keys but he added something and it is fixed.  I wish I knew more.

Bill

回复William Beazley

Re: Can't connect Backpack error code 77 .

Yuliya Bozhko -

Hi William,

Great news! Thanks for letting us know. I was running out of ideas thinking abut this issue 微笑

Yuliya