Contentbylabel macro is not working properly. Returning 404 error
Asked by Anuj:

Hello guys,

I'm facing some weird issue with Content by label macro in Confluence. Below action returning 404 Not Found error for all the time

```
/labels/autocompletelabel.action?query=test&ignoreRelated=true&maxResults=10
```

And following error I got in the log file

```
ERROR [atlassian.confluence.servlet.ConfluenceServletDispatcher] serviceAction There is no Action mapped for namespace /labels and action name autocompletelabel
 -- referer: https://myconfluence.com/ | url: /labels/autocompletelabel.action | traceId: e0dbb26cd38d8664 | userName: me
```

The issue is only with this macro and others are working fine.

As of now, I have tried to run confluence in Safe Mode but the issue still persists. It works fine with cleaned instance.

Any pointers/suggestions would be greatly appreciated!

Thank you!


Answers:
author: Anuj Sapate
body: 'Content By Label' macro from **Advanced Macros** plugin depends on the **Confluence Labels UI** plugin (both are system plugins). So enabling the module named **labels-actions** from 'Confluence Labels UI' plugin helps me to resolve this issue with particular URL */labels/autocompletelabel.action*.


author: AnnWorley
body: Since you still experience the error in plugin safe mode, you eliminated user-installed plugins as the issue. According to [Confluence states "There is no Action mapped for namespace X and action name X"](https://confluence.atlassian.com/confkb/confluence-states-there-is-no-action-mapped-for-namespace-x-and-action-name-x-296911093.html) that leaves us with proxy/network issues, if your definition of cleaned instance includes not using a proxy.

Please check your proxy configuration. One common proxy omission is to leave out the proxyName, proxyPort and scheme from the server.xml. These purpose of these settings are documented here: [Proxy Support](https://tomcat.apache.org/tomcat-8.5-doc/config/http.html#Proxy_Support)
> The proxyName and proxyPort attributes can be used when Tomcat is run behind a proxy server. These attributes modify the values returned to web applications that call the request.getServerName() and request.getServerPort() methods, which are often used to construct absolute URLs for redirects. Without configuring these attributes, the values returned would reflect the server name and port on which the connection from the proxy server was received, rather than the server name and port to whom the client directed the original request.

An example of a connector directive in your \<confluence_install\>/conf/server.xml with proxy support (with SSL terminated at proxy) would be:

```
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="Your_instance_DNS_Name" proxyPort="443" scheme="https" />
```

comments: author: Anuj
body: Thank you for your swift reply Ann. Just wanted to know that will it impact only for this Content by label Macros? Because all other Macros and plugins are working absolutely fine.


author: AnnWorley
body: The article [Confluence states "There is no Action mapped for namespace X and action name X"](https://confluence.atlassian.com/confkb/confluence-states-there-is-no-action-mapped-for-namespace-x-and-action-name-x-296911093.html) reports the cause of the error,

```
There is no Action mapped for namespace
```

is Confluence attempting to access a null URL.
> Cause  
> We are trying to access a vacant Url.

That URL is getting directed to a null value somehow, the proxy is the usual culprit.

The dev tools in Chrome may be able to shed some light as well. Check the network tab to see where the request is throwing errors.


author: Anuj
body: Exactly. I've checked in the network panel and it shows **404 Not Found** error only for this particular action URL.


author: AnnWorley
body: Are all the proxy settings already in the server.xml?


author: Anuj
body: Yes [@AnnWorley](/t5/user/viewprofilepage/user-id/502040). All settings are there in server.xml. I have already gone through the KB article which you have provided and tried to solve the issue before raising this question. But no luck. Issue still persists.

My server.xml somewhat looks like this:

```
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="myconfluence.com" proxyPort="443" scheme="https"/>

<Connector port="8092" connectionTimeout="20000" redirectPort="8443"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="myconfluence1.com" proxyPort="443" scheme="https"/>

<Connector port="8098" connectionTimeout="20000" redirectPort="8443"
 maxThreads="48" minSpareThreads="10"
 enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
 protocol="org.apache.coyote.http11.Http11NioProtocol" proxyName="myconfluence2.com" proxyPort="443" scheme="https"/>
```

Is there anything wrongly written here which can cause this issue?


author: Anuj Sapate
body: [@AnnWorley](/t5/user/viewprofilepage/user-id/502040) The issue was with only this action hence I started checking out all the System plugins one by one and found that **labels-actions** module was somehow disabled which belongs to **Confluence Labels UI**plugin.

And after enabling it, all functionality started working as per the expectation.

Thanks for your support. (Y)


author: AnnWorley
body: Great sleuthing! Thanks for sharing the solution. :)


Tags: content-by-label