The OP installed the Mollom module on Drupal 7.14 with a new free Mollom account, but got an error message after entering the api keys.

It seems this was caused by timeouts contacting the Mollom servers.

A patch was suggested that increases the timeout from 3.0 seconds to 30 seconds. This patch would need rerolling against the current 7.x-2.x-dev version of the module, which stores the timeout in a different file. However, before doing this, a decision is needed as to whether this is the real solution to the problem.

It seems that the release of 7.x-2.8 has made these timeouts more frequent, and they can occur when the Mollom service is used to check for spam, and not only when the admin interface for Mollom is being used.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

shendric’s picture

Somehow, when I cleared the cache in my browser and went back, the error was no longer there, and everything seemed to be working properly.

sun’s picture

Status: Active » Closed (cannot reproduce)

Hm. Not sure what that might have been.

If you can reproduce it somehow, please re-open this issue. Thanks!

mattjbondi’s picture

Version: 7.x-2.1 » 6.x-2.3
Status: Closed (cannot reproduce) » Active

Same problem, but on Drupal 6.28 Installed Mollom 6.x-2.3 with a new free account, entered the keys and receive the message:

The Mollom servers could be contacted, but Mollom API keys could not be verified.

Tried clearing cache but no luck...

sun’s picture

@MattBondi: Can you check your recent Drupal log messages in the mollom category for any potential error messages?

If you find one, can you copy the full message into a text file and attach it here?

Also, when you go to the Mollom settings page, do you see exactly this error message, or a slightly different one?

mattjbondi’s picture

Thanks for the quick response sun...

I copy pasted the message in exactly. I have however, discovered what the issue was! I was doing this work on a client's server and did not know at the time that they have a very strict outbound proxy set. Once I white listed the Mollom API service we were all good to go.

Cheers

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Glad to hear!

Although I'm a little bit confused now. In the case of a firewall blocking outbound requests, you should normally see this error message:

The Mollom servers could not be contacted. Please make sure that your web server can make outgoing HTTP requests.

This means that the error code of the response was not one of the expected.

Could you copy the entire log message of one of the failing API key validation requests, so I can see what the exact response was?

vadim s. sabinich’s picture

i had drupal 7, but..

API keys could not be verified.
Error 900: Network error. (174.37.205.152)

Request: POST http://rest.mollom.com/v1/site/ff4ad11a7499de24d0a2115e15102b36
platformName = 'Drupal'
platformVersion = '7.22'
clientName = 'Mollom'
clientVersion = '7.x-2.6'
Request headers:
Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
Content-Type = 'application/x-www-form-urlencoded'
Authorization = 'OAuth oauth_consumer_key="ff4ad11a7499de24d0a2115e15102b36", oauth_version="1.0", oauth_nonce="d76c8125cdb22816fd2212372246cf66", oauth_timestamp="1366469232", oauth_signature_method="HMAC-SHA1", oauth_signature="O0hmwAvrlu9pHtIOLBKCK%2BPyBSE%3D"'
Response: -1 request timed out

Error 900: Network error. (174.37.205.152)

Request: POST http://rest.mollom.com/v1/site/ff4ad11a7499de24d0a2115e15102b36
platformName = 'Drupal'
platformVersion = '7.22'
clientName = 'Mollom'
clientVersion = '7.x-2.6'
Request headers:
Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
Content-Type = 'application/x-www-form-urlencoded'
Authorization = 'OAuth oauth_consumer_key="ff4ad11a7499de24d0a2115e15102b36", oauth_version="1.0", oauth_nonce="4c98a63fae72fbba556533acf0ec37e9", oauth_timestamp="1366469243", oauth_signature_method="HMAC-SHA1", oauth_signature="%2BgK1BSddgCyLmIu7OJ%2B2PwAI7nY%3D"'
Response: -1 request timed out

API keys could not be verified.

sun’s picture

@vadim: Do you still see this error today? (The log messages are from 2013-04-20, so that's not clear to me.)

bogeyman’s picture

Version: 6.x-2.3 » 7.x-2.7

I got the same problem with my site here is the error log which I copy today when I post this message:

API keys could not be verified.
Error 900: Network error. (174.37.205.152)

Request: POST http://rest.mollom.com/v1/site/7c17471b32e62e14b7a1adc46e81eb91
  platformName = 'Drupal'
  platformVersion = '7.23'
  clientName = 'Mollom'
  clientVersion = '7.x-2.7'
Request headers:
  Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
  Content-Type = 'application/x-www-form-urlencoded'
  Authorization = 'OAuth oauth_consumer_key="7c17471b32e62e14b7a1adc46e81eb91", oauth_version="1.0", oauth_nonce="38e71e8a8329cc4ee24acd0c8315ffa8", oauth_timestamp="1376204591", oauth_signature_method="HMAC-SHA1", oauth_signature="lN6b8z1ta6kdRpXXOTX7btAs4a8%3D"'
Response: -1 request timed out

Error 900: Network error. (174.37.205.152)

Request: POST http://rest.mollom.com/v1/site/7c17471b32e62e14b7a1adc46e81eb91
  platformName = 'Drupal'
  platformVersion = '7.23'
  clientName = 'Mollom'
  clientVersion = '7.x-2.7'
Request headers:
  Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
  Content-Type = 'application/x-www-form-urlencoded'
  Authorization = 'OAuth oauth_consumer_key="7c17471b32e62e14b7a1adc46e81eb91", oauth_version="1.0", oauth_nonce="ab42630bea0ff9e3b3c058cb18b6cc46", oauth_timestamp="1376204596", oauth_signature_method="HMAC-SHA1", oauth_signature="pBfFHzd0gygXe%2FUMekIuNe9Yb%2BQ%3D"'
Response: -1 request timed out

API keys could not be verified.

I'm using free Mollom and I'm sure I have entered the correct Public and Private Key.

tbm13’s picture

I'm getting the same error as bogeyman - same IP address too.

Happy to provide more info. Just let me know what you need. AFAIK the network config on our end didn't change, so I'm not sure why this timed out occurs.

bogeyman’s picture

Status: Postponed (maintainer needs more info) » Active
FileSize
70 bytes
70 bytes
70 bytes

I try to create a PHP file which use the PHP client library which is provided by Mollom. I upload it to the same server, then execute it and I didn't get the request timeout error. My hosting provider also has tried to ping from that server to the Mollom server and the connection was fine.
Here are the attachments from me, I hope they can provide more information.

bogeyman’s picture

Hey, I make it's working after modifying mollom.drupal.inc.

  /**
   * Implements Mollom::request().
   */
  protected function request($method, $server, $path, $query = NULL, array $headers = array()) {
    $request = array(
      'method' => $method,
      'headers' => $headers,
      'timeout' => 30.0, // $this->requestTimeout, // I change the timeout time to 30.0 (Drupal default for HTTP request)
    );

I don't know if this method is recommended or not. But, after seeing the similar issues also exists, I think you should consider to add the configurable timeout in setting page. Three seconds timeout time by default in PHP Mollom library may be too fast for some servers to complete the request-response process to Mollom server.

tbm13’s picture

I can confirm that bogeyman's workaround (changing this->requestTimeout to 30.0) works for me too.

That actually makes sense in my situation because my server has seen a slowdown recently, which would explain why Molloom used to work why it fails with the timeout now.

sun’s picture

Version: 7.x-2.7 » 7.x-2.x-dev

Thanks for the debugging information, that is very helpful.

@bogeyman, I unpublished your comment #11, because it contained the private key for your site, which should never be shared with anyone. If you haven't already, I'd recommend to delete your current key-pair and create a new one. Note that I still have access to the comment, so you don't need to provide the data once more.

The current timeout is 3 seconds, which should normally be sufficient. But yes, the timeout applies to the complete round-trip time for each request, so if a simple ping from your server takes ~300ms already, then the latency alone cuts away a good chunk of time already.

Normally, Mollom servers respond within 100ms; in edge cases up to 500ms.

The client-side timeout is purposively low, to prevent end-users from having to wait too long and experience "inactivity" when e.g. posting comments; 3 seconds are a lot with regard to that already.

The Mollom service for free users underwent a few maintenance updates in the past week, which might have caused the slow response times. Do you still experience the timeout issue today? (when reverting to factory defaults)

bogeyman’s picture

Yes, I just try to revert it to 3 sec (factory default), the error is still shown. The same error also appear when I set the time out to 4 or 5 sec. The error is gone if I set it to 6 sec. In my opinion, the problem is not located in Mollom server, but the connection from my server to Mollom server takes longer time. Maybe some other web servers experienced this too.
And about my private key, sorry that's my bad. I forgot to remove it before upload it and I have changed it to the new key. Thanks for deleting that comment.

Elijah Lynn’s picture

Is the testing API server still down? Is there a way I can test the server on the CLI manually?

I am having a lot of issues connecting to it it seems.

Thanks

sun’s picture

Status: Active » Postponed (maintainer needs more info)

I performed some personal benchmarks in the past weeks and actually measured an average (RTT) response time of ~30ms only.

That said, the server I tested on is located in Germany, and is known to have very fast backbone wires into the entire world.

However, given my results, the difference between 30ms and >3000ms appears to be off...

Do you still experience this issue today?

If so, could you attach the output of a tracert, so we can check where exactly the connection slowdown comes from?

Thanks!

Elijah Lynn’s picture

belong@mywebworkshop.com’s picture

FileSize
16.83 KB
belong@mywebworkshop.com’s picture

I am having this problem as well. What is really irritating is that the keys had been verified and the Mollom module for some reason discarded them and asked anew.

Drupal 6.28, Mollom 6.x-2.5, Apache webserver

My web host sold out, and since I have been changed to new servers by the new owners Mollom has not worked correctly. It has worked occasionally. To my shame I did not notice! But the graph of Mollom activity clearly marks the date the website changed servers.

This is error shown: The Mollom servers could not be contacted. Please make sure that your web server can make outgoing HTTP requests.
The log says (among other things):
Error 900: Network error. (173.193.242.187)
Response: -1 request timed out

There are 2 possibilities I get from reading this thread:

  1. the timeout on the server itself is too short
  2. mollom needs to be whitelisted by the server.

Whitelisting
I can't work out what to ask the server administrators to whitelist.
I found an issue from a couple of years ago that solved their problem by white listing these:

http://xmlrpc1.mollom.com
http://xmlrpc2.mollom.com
http://xmlrpc3.mollom.com
http://82.103.131.136
http://88.151.243.81

But the watchdog error is referring to 173.193.242.187.
I have searched mollom documentation for what should be whitelisted but can't find anything.

I have also had to turn off the Update Status module: with it on I can't get in to any backend pages. Occasionally, a page will load below 50 or so 'MYSQL went away' messages. This points to a timeout problem with the server too, I think. I don't really understand this server stuff.

Help
Help would be appreciated. I changed Molloms settings from deny if you can't reach the server to allow, and had 24 spam registrations in 24 hours. So I need this to be working.

Cheers
Miriam

ju1i3’s picture

I had the Error 9000 Network Error Response: -1 request timed out (3.003s) and added the work-around in #12 (thank you bogeyman) and it worked. I just upgraded to 7.24 and have been having masses of spam attacks so definitely did not want to continue without full Mollom functionality.
thanks

ps I've found this necessary on all 7 sites I look after as I've upgraded to 7.24, all on shared hosting at Heart

guruslot’s picture

Thanks ju1i3! Confirm #12 works.

Yazzbe’s picture

Had the same issue after upgrading to 7.24. #12 fixed it. tx

JamesOakley’s picture

Title: The Mollom API keys could not be verified » Timeout contacting Mollom servers (network error 900)
Issue summary: View changes
Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Needs work
Related issues: +#2141977: Following update Mollom can no longer contact the Mollom server

I've just had the same issue (network error 900 on every Mollom call) since upgrading to 7.x-2.8.

I've changed the timeout from 3.0 to 6.0 in includes/mollom.class.inc (where the timeout is now set), and that seems to have solved it. I have to say, though, that this is definitely a work-around rather than a solution - something has changed to introduce a problem that wasn't there before.

Setting back to "needs work", because the request for more information was in post #6 asking for the full HTTP request and response, and this was answered in #7. If the maintainers still need further information, please specify what further information is needed.

I've changed the issue title, because this is wider than just verifying the API keys. I found that one site has been blocking all comments / contact-form posts because the Mollom servers were unreachable each time. For this reason, I've also changed the priority to Major.

ekidman’s picture

I'm also experiencing this issue - and I haven't updated anything. Still on 7.x-2.7. This leads me to believe something happened over on Mollom's end - there seems to be quite a few comments already today reporting the same issue.

nsjski’s picture

Same here - API keys verified yesterday, not today. I didn't change anything.
Error 900 network error, timed out after 2.999s.
Drupal 7.23, Mollom 7.x-2.8
Will do #12 or #24 - thanks for reporting the workaround.

nsjski’s picture

That worked a treat. Changed timeout from 3 to 6 in
line 126 of sites/all/modules/mollom/includes/mollom.class.inc
Thanks.

graytoby’s picture

I have these errors too, but this is Mollom servers issue. See Mollom's Twitter https://twitter.com/mollom

Nick S’s picture

I have seen a whole bunch of errors relating to Mollom today. At first, I had the same timeout issue as everyone else. This was temporarily fixed by the same workaround (changing timeout to 30s).

However, since then I have seen "Connection Refused" messages, and also "500 Internal Server errors". The config page currently gives the message "The Mollom servers could be contacted, but Mollom API keys could not be verified".

Mollom is whitelisted by my hosting provider and I have never had any issues before. This, plus the flurry of posts on this thread today, leads to me think that there must be a problem at the Mollom end.

Nick S’s picture

Oops...just seen #28. That's a relief. Mollom is a wonderful service that is essential to my site, and I was beginning to panic!

eshta’s picture

With the exception of service disruptions, if this is happening consistently a tracert could help in pinpointing a slow-down. Perhaps a simple way to override the timeout would be helpful?

kruser’s picture

I'm getting this error on a number of sites today - Error 900: Network error. (50.22.200.20), Response: -1 request timed out (15.058s)

It seems like sites running 7.x-1x or 6.x-1x are still working, but the 7.2/6.2 branches are timing out. I tried increasing the requestTimeout but that didn't help, I also disabled the server firewall and that didn't work either.

The only difference between today and a few days ago (when it was working) is our server had a HD failure and we restored everything to a new drive. Since then we've been getting the error. Is there anything server-side that could cause this?

eshta’s picture

kruser - are you still experiencing problems? The 7.2/6.2 branches use the REST API (while the version 1 modules use the old XML-RPC structure). Servers need to be able to access rest.mollom.com (and dev.mollom.com for testing mode).

kruser’s picture

Yes, I'm still having issues. It's strange because I can ping and traceroute to 50.22.200.20

> ping rest.mollom.com
PING rest.mollom.com (50.22.200.20) 56(84) bytes of data.
64 bytes from 50.22.200.20-static.reverse.softlayer.com (50.22.200.20):
icmp_seq=1 ttl=24 6 time=28.5 ms
64 bytes from 50.22.200.20-static.reverse.softlayer.com (50.22.200.20):
icmp_seq=2 ttl=24 6 time=28.6 ms

> traceroute rest.mollom.com
traceroute to rest.mollom.com (50.22.200.20), 30 hops max, 40 byte packets
1 lw-dc3-dist9-vlan515.rtr.liquidweb.com (67.227.236.2) 0.417 ms 0.345 ms
0.315 ms
2 lw-dc3-core6-po9.rtr.liquidweb.com (69.167.128.162) 0.603 ms 0.362 ms
0.405 ms
3 lw-border6-te1-2.rtr.liquidweb.com (209.59.157.227) 6.709 ms 6.729 ms
6.703 ms
4 * * *
5 te1-7.bbr01.eq01.chi01.networklayer.com (206.223.119.63) 6.604 ms * *
6 * * *
7 * * *
8 * ae1.dar02.sr01.wdc01.networklayer.com (173.192.18.189) 25.502 ms
ae1.dar01.sr01.wdc01.networklayer.com (173.192.18.193) 33.043 ms
9 po2.fcr02.sr01.wdc01.networklayer.com (208.43.118.151) 26.434 ms
po1.fcr02.sr01.wdc01.networklayer.com (208.43.118.149) 25.634 ms 26.138 ms
10 50.22.200.20-static.reverse.softlayer.com (50.22.200.20) 28.179 ms
28.552 ms 28.480 ms

eshta’s picture

kruser - what is in your error logs when Mollom tries to connect to the rest endpoint?

kruser’s picture

Here is an example from the error log:
Error 900: Network error. (50.22.200.20)
Error 900: Network error. (50.22.200.20)

Request: POST http://rest.mollom.com/v1/content
authorName = 'aacthlws201m'
authorMail = 'undoadjoiniyr.kl96e@gmail.com'
authorIp = '163.177.132.179'
honeypot = 'http://pil.as/wnh'
checks =
0 = 'spam'
strictness = 'normal'
type = 'user'
Request headers:
Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
Content-Type = 'application/x-www-form-urlencoded'
Authorization = 'OAuth oauth_consumer_key="c0c835c280fa3903dbeb65def0dc8519", oauth_version="1.0", oauth_nonce="4fc455a243e4420df5c109935d103c7f", oauth_timestamp="1389192263", oauth_signature_method="HMAC-SHA1", oauth_signature="wAZGzIT5q1XV%2FW9i7n9Ur%2FOlOko%3D"'
Response: -1 request timed out

Error 900: Network error. (50.22.200.20)

Request: POST http://rest.mollom.com/v1/content
authorName = 'aacthlws201m'
authorMail = 'undoadjoiniyr.kl96e@gmail.com'
authorIp = '163.177.132.179'
honeypot = 'http://pil.as/wnh'
checks =
0 = 'spam'
strictness = 'normal'
type = 'user'
Request headers:
Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
Content-Type = 'application/x-www-form-urlencoded'
Authorization = 'OAuth oauth_consumer_key="c0c835c280fa3903dbeb65def0dc8519", oauth_version="1.0", oauth_nonce="fd0ff944a384cd789e3f4af768512149", oauth_timestamp="1389192284", oauth_signature_method="HMAC-SHA1", oauth_signature="VQWtfEovGbp6Mu8WBn5Vzu%2FAztY%3D"'
Response: -1 request timed out

lifeinpoetry’s picture

I'm also getting a timeout error on my live Drupal 6 site and my test Drupal 7 site. Can ping and traceroute rest.mollom.com. My Mollom control panel shows that it was working up until the past day or two.

Error 900: Network error. (50.22.200.20)

Error 900: Network error. (50.22.200.20)
Request: POST http://rest.mollom.com/v1/captcha/14011135e38e63f981
solution = 'Hsaif'
authorIp = '98.154.31.100'

Request headers:
Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
Content-Type = 'application/x-www-form-urlencoded'
Authorization = 'OAuth oauth_consumer_key="38244abf8030c20a1604bd3d3e5d003c", oauth_version="1.0", oauth_nonce="e1a412071530e2c82e03103201b411d9", oauth_timestamp="1389437934", oauth_signature_method="HMAC-SHA1", oauth_signature="PxAztaiDpce0RyXIDvDCbOuqgD0%3D"'

Response: -1 request timed out (5.083s)
Error 900: Network error. (50.22.200.20)
Request: POST http://rest.mollom.com/v1/captcha/14011135e38e63f981
solution = 'Hsaif'
authorIp = '98.154.31.100'

Request headers:#012 Accept = 'application/xml, application/json;q=0.8, */*;q=0.5'
Content-Type = 'application/x-www-form-urlencoded'
Authorization = 'OAuth oauth_consumer_key="38244abf8030c20a1604bd3d3e5d003c", oauth_version="1.0", oauth_nonce="5d2a0bdf2656de1fa6a37f58784d6439", oauth_timestamp="1389437944", oauth_signature_method="HMAC-SHA1", oauth_signature="szfyecIYR%2BLLhlqJZskxdW3NGPs%3D"'

Response: -1 request timed out (5.083s)

eshta’s picture

Status: Needs work » Closed (fixed)

The next release of the module includes the ability to adjust the timeout used to reach Mollom's servers. This functionality is currently available in the development branch and addresses the initial concern. The network error 900 can be due to many different reasons and should be addressed either in separate support tickets, or by contacting Mollom to troubleshoot (from the website).