Page 1 of 2

ModuleManager: Error communicating with server (1.10.2)

Posted: Sun Nov 06, 2011 4:52 pm
by reto
EDIT: Scroll down to the last posts for possible solutions

Hi,

I've gone through the various ModuleManager issues i've found, but none seem to be related to mine. I could really need some help debugging....

This is what I have:
PHP: PHP Version 5.3.3-7+squeeze3
CMSMS: 1.10.1 / plain install (after I found the issue on an upgraded version)
cURL Information: 7.21.0
allow_url_fopen: On

The Problem:
The Start Page of the ModuleManager displays the following error message in the "Available Upgrades" and "Available Modules" tab:
"A problem occurred communicating with the module server"

What I have checked so far:
- wget to the url works from the server
- all 1.9.x installs work just fine
- clearing the cache does not help

This is a var_dump from the $req object within function.newversionstab.php (right after line 79 /$result = $req->getResult();):

Code: Select all

http://www.cmsmadesimple.org/ModuleRepository/request/v2//upgradelistgetall<br>object(cms_http_request)#29 (32) {
  ["target":"cms_http_request":private]=>
  string(75) "http://www.cmsmadesimple.org/ModuleRepository/request/v2//upgradelistgetall"
  ["_socket":"cms_http_request":private]=>
  string(30) "tcp://www.cmsmadesimple.org:80"
  ["host":"cms_http_request":private]=>
  string(21) "www.cmsmadesimple.org"
  ["port":"cms_http_request":private]=>
  int(80)
  ["path":"cms_http_request":private]=>
  string(47) "/ModuleRepository/request/v2//upgradelistgetall"
  ["schema":"cms_http_request":private]=>
  string(4) "http"
  ["method":"cms_http_request":private]=>
  string(4) "POST"
  ["rawPostData":"cms_http_request":private]=>
  NULL
  ["params":"cms_http_request":private]=>
  array(3) {
    ["names"]=>
    string(94) "CMSMailer,CMSPrinting,FileManager,MenuManager,MicroTiny,ModuleManager,News,Search,ThemeManager"
    ["newest"]=>
    string(1) "1"
    ["clientcmsversion"]=>
    string(6) "1.10.1"
  }
  ["cookies":"cms_http_request":private]=>
  array(0) {
  }
  ["_cookies":"cms_http_request":private]=>
  array(1) {
    [0]=>
    array(6) {
      ["name"]=>
      string(17) "CMSSESSIDd01fb6d3"
      ["value"]=>
      string(26) "6nhg4ce521abl2recaorquijn3"
      ["domain"]=>
      string(21) "www.cmsmadesimple.org"
      ["path"]=>
      string(1) "/"
      ["expires"]=>
      string(0) ""
      ["secure"]=>
      int(0)
    }
  }
  ["timeout":"cms_http_request":private]=>
  string(2) "25"
  ["useCurl":"cms_http_request":private]=>
  bool(true)
  ["referrer":"cms_http_request":private]=>
  string(0) ""
  ["userAgent":"cms_http_request":private]=>
  string(90) "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.9"
  ["cookiePath":"cms_http_request":private]=>
  string(82) "/var/www/httpdocs/cmsms/tmp/cache/c53aeb2c4008d315bc06144db7dfbb2bf.dat"
  ["useCookie":"cms_http_request":private]=>
  bool(true)
  ["saveCookie":"cms_http_request":private]=>
  bool(true)
  ["username":"cms_http_request":private]=>
  string(0) ""
  ["password":"cms_http_request":private]=>
  string(0) ""
  ["result":"cms_http_request":private]=>
  string(27) ""ERROR: Invalid Parameters""
  ["headers":"cms_http_request":private]=>
  array(10) {
    ["server"]=>
    string(12) "nginx/0.7.67"
    ["date"]=>
    string(29) "Sun, 06 Nov 2011 16:24:21 GMT"
    ["content-type"]=>
    string(9) "text/html"
    ["transfer-encoding"]=>
    string(7) "chunked"
    ["connection"]=>
    string(10) "keep-alive"
    ["x-powered-by"]=>
    string(20) "PHP/5.3.3-1ubuntu9.3"
    ["set-cookie"]=>
    string(52) "CMSSESSIDd01fb6d3=6nhg4ce521abl2recaorquijn3; path=/"
    ["expires"]=>
    string(29) "Thu, 19 Nov 1981 08:52:00 GMT"
    ["cache-control"]=>
    string(62) "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
    ["pragma"]=>
    string(8) "no-cache"
  }
  ["status":"cms_http_request":private]=>
  string(3) "400"
  ["redirect":"cms_http_request":private]=>
  bool(false)
  ["maxRedirect":"cms_http_request":private]=>
  int(3)
  ["curRedirect":"cms_http_request":private]=>
  NULL
  ["error":"cms_http_request":private]=>
  string(0) ""
  ["nextToken":"cms_http_request":private]=>
  string(0) ""
  ["debug":"cms_http_request":private]=>
  bool(false)
  ["headerArray":"cms_http_request":private]=>
  array(0) {
  }
  ["debugMsg":"cms_http_request":private]=>
  NULL
  ["proxy":"cms_http_request":private]=>
  NULL
}
I have about no clue what parameters should be sent and how I can further debug the situation. Any help is appreciated.

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Sun Nov 06, 2011 5:21 pm
by staartmees
as the errormessage indicates for some reason you had problems connecting to the module server. Just wait and try again later, solved the problem for me.

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Sun Nov 06, 2011 6:05 pm
by reto
Hi staartmees,
Thanks for the feedback. It's definitely not the server that is not available. Else I wouldn't get 400 response, right?

Reto

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Sun Nov 06, 2011 7:17 pm
by staartmees
you have an error in the settings of your Module Manager.
correct url = http://www.cmsmadesimple.org/ModuleRepo ... equest/v2/
you have http://www.cmsmadesimple.org/ModuleRepo ... quest/v2//

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Sun Nov 06, 2011 8:53 pm
by reto
Hi,

Unfortunately this is another bug in the ModuleManager. But because servers tend to be tolerant regarding double slashes, this should not be the error.

I have reset the ModuleManager to the default URL many times. It is:

Code: Select all

http://www.cmsmadesimple.org/ModuleRepository/request/v2/
the second slash comes from the code, where

Code: Select all

/upgradelistgetall
is added.

But thanks anyway! Feedback is very much appreciated.

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Mon Nov 07, 2011 6:13 am
by staartmees

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Mon Nov 07, 2011 7:44 pm
by reto
... throws an error on the first check... (you can try yourself)

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Mon Nov 21, 2011 9:19 pm
by reto
Another update to this issue: Upgraded to 1.10.2 - did not solve the problem. It really ugly. No clue whatsoever... :(
taking another dive deep into the module right now.

Re: ModuleManager: Error communicating with server (1.10.x)

Posted: Mon Nov 21, 2011 10:07 pm
by reto
Ok, some more debugging information:
Right now I think it's not curl causing troubles. I can dump the json response and I get the full list of modules. I can even search for modules and the expected modules get listet.

But what does not work is "Available Upgrads" tab and "Available Modules". As mentioned the first one fails with the error "A problem occurred communicating with the module server" the second fails to filter the Modules according to the A-Z list. It always displays all the modules.

And I cannot download and/or install modules. It fails with for example "A problem occurred downloading the XML FILE: AdvancedContent-0.9.1.xml"

Update:
I have not a (working) local plain installation and a (not working) plain server installation. I've replaced the execute method the modmgr_cached_request class in the file /modulemanager/lib/class.modmgr_cached_request.php to output some dumps:

Code: Select all

    if( $mod->GetPreference('disable_caching',0) || !file_exists($fn) || filemtime($fn) <= $atime )
    {
      // execute the request
      $req = new cms_http_request();
      if( $this->_timeout ) $req->setTimeout($this->_timeout);
      $req->execute($target,'','POST',$data);
      $this->_status = $req->getStatus();
      $this->_result = $req->getResult();
      echo "<br>----- status<br><br>";
      var_dump($this->_status);
      echo "<br>----- status end<br><br>";
      echo "<br>----- result<br><br>";
      var_dump($this->_result);
      echo "<br>----- result end<br><br>";
      @unlink($fn);
Of course these dumps only require the caching to be disabled. Now, I do get exactly the same result responses from the working and the non-working installation. the only differences are the above mentioned errors and problems (A-Z Listing, Error on Upgrad Tab and non-working "Download&Install process")

Any ideas?

Re: ModuleManager: Error communicating with server (1.10.2)

Posted: Fri Nov 25, 2011 12:05 pm
by reto
Hi Jan

Good point! the (working) local setup is with a locale setting of en_US and the root server I have the troubles with has de_DE.

this is a really ugly one...

regards,
Reto

Re: ModuleManager: Error communicating with server (1.10.2)

Posted: Mon Dec 05, 2011 10:24 pm
by nidus
"A problem occurred communicating with the module server"
problem still there - upgraded few websites and the same problem on all of them. Websites with version 1.9.4.3 on the same server have no problems with module manager.
Checked system information - reports no problems
Test for remote URL (test_remote_url)
fsockopen: Connection ok!
fopen: Connection ok!

Re: ModuleManager: Error communicating with server (1.10.2)

Posted: Sat Dec 17, 2011 12:09 pm
by croontje
I have the same problem here. After upgrade to 1.10.2 I get this error and:


fsockopen: Connection ok! Success
fopen: Connection ok! Success

(before upgrade the module manager worked perfectly :) )

Re: ModuleManager: Error communicating with server (1.10.2)

Posted: Sat Dec 17, 2011 1:32 pm
by croontje
Ok,

I changed:
arg_separator.output = "&"

to

arg_separator.output = "&"

in my php.ini and the problem is gone :)

(I just want to post a solution here to show other people a solution without changing anything in CMSMS)

Re: ModuleManager: Error communicating with server (1.10.2)

Posted: Mon Dec 19, 2011 4:39 pm
by croontje
No problem.

I just discovered the bugreport about this issue but I don't think the devs will fix it :)

http://dev.cmsmadesimple.org/bug/view/7290

Re: ModuleManager: Error communicating with server (1.10.2)

Posted: Mon Dec 19, 2011 5:58 pm
by Dr.CSS
They don't consider this a CMSMS bug but a problem with non standard server configuration...
put your system back to a standard configuration.