plus-
plus-

Reputation: 46543

Alfresco webscripts: random http 400

It seems that we encounter a lot of random http 400 (bad request) recently

They are all raised from ajax calls in Share through the proxy: "host/share/proxy/alfresco/" They happen most of the time when loading or refreshing a new page. They can happen either in Alfresco existing ajax requests or via our customizations.

Is there any reason that could explain all of a sudden why we can see that?

Here is an example of a failing request:

Request URL:http://foobar.com/share/proxy/alfresco/slingshot/profile/avatar/me%40company.com
Request Method:GET
Status Code:400 Bad Request
Request Headersview parsed
GET /share/proxy/alfresco/slingshot/profile/avatar/me%40company.com HTTP/1.1
Host: test04.componize.com
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
Accept: */*
Referer: http://foobar.com/share/page/site/somesite/somepage?nodeRef=workspace://SpacesStore/85c4f863-343a-4668-b2cc-6338734c6108
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,fr;q=0.6,ja;q=0.4
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: JSESSIONID=7A8588F21E2E1A8D27A67DEFACA688A7; alfLogin=1363695391; alfUsername2="cGF0cmljay5sdXNzYW5AY29tcG9uaXplLmNvbQ=="; SS_MID=92c6f733-7a8a-4fbd-876d-a8d4e85ed663h49mh6mw; __utma=129970003.1515757632.1341479871.1359127257.1360571858.15; __utmz=129970003.1341479871.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Response Headersview parsed
HTTP/1.1 400 Bad Request
Date: Tue, 19 Mar 2013 12:29:06 GMT
Server: Apache-Coyote/1.1
Content-Length: 0
Connection: close
Content-Type: application/x-msdos-program

EDIT: Added screenshot

Avatar not displaying:

enter image description here

Logo not displaying:

enter image description here

Upvotes: 0

Views: 587

Answers (3)

plus-
plus-

Reputation: 46543

In the end it was some server side issue, not related to Alfresco.

Upvotes: 0

Zlatko
Zlatko

Reputation: 19569

One possible cause is your hardware resource usage.

A problem that I faced few years ago was the server setup. I had a quad core opeteron server with 4 GB of RAM and Alfresco + Share + MySQL (+ some linux daemons like apache and stuff) on it. It would often fail, I had to restart the server and generally I had a lot of errors 400 and 500.

When I moved the MySQL to another physical machine, the situation got much much better. Perhaps your problem is similar, and you can upgrade the hardware to resolve the problem.

If you have a spare server to just dump the sql and shut it down on Alfresco server and start it on the spare server, maybe you could test if you get less failed requests.

Upvotes: 1

swemon
swemon

Reputation: 5946

Default url to connect to alfresco from share is

http://localhost:8080/alfresco/ that is your "host/share/proxy/alfresco/"

Make sure your host and port are correct for both alfresco and share.

If you want to change default connection, you can change this in share-config-custom.xml

<config evaluator="string-compare" condition="Remote">
      <remote>
         <endpoint>
            <id>alfresco-noauth</id>
            <name>Alfresco - unauthenticated access</name>
            <description>Access to Alfresco Repository WebScripts that do not require authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://host_name:80/alfresco/s</endpoint-url>
            <identity>none</identity>
         </endpoint>

         <endpoint>
            <id>alfresco</id>
            <name>Alfresco - user access</name>
            <description>Access to Alfresco Repository WebScripts that require user authentication</description>
            <connector-id>alfresco</connector-id>
            <endpoint-url>http://host_name:80/alfresco/s</endpoint-url>
            <identity>user</identity>
         </endpoint>

         <endpoint>
            <id>alfresco-feed</id>
            <name>Alfresco Feed</name>
            <description>Alfresco Feed - supports basic HTTP authentication via the EndPointProxyServlet</description>
            <connector-id>http</connector-id>
            <endpoint-url>http://host_name:80/alfresco/s</endpoint-url>
            <basic-auth>true</basic-auth>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>

In our example, alfresco is running in host_name with port 80. Hope this would help u.

Upvotes: 1

Related Questions