Contentbylabel macro is not working properly. Returning 404 error

Anuj May 8, 2018

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!

2 answers

1 accepted

1 vote
Answer accepted
Anuj Sapate May 9, 2018

'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.

1 vote
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2018

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" 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 

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" />
Anuj May 8, 2018

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. 

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2018

The article Confluence states "There is no Action mapped for namespace X and action name X" 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.

Anuj May 8, 2018

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

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2018

Are all the proxy settings already in the server.xml?

Anuj May 9, 2018

Yes @AnnWorley. 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?

Anuj Sapate May 9, 2018

@AnnWorley 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)

 

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 9, 2018

Great sleuthing! Thanks for sharing the solution. :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events