REST2 problem, 404 URL not found


I installed rt-extension-rest2 like it is written on git. I do not see any error in syslog.
In RT i can see i have this two plugins enbled:

Plugins [

Token plugin work ok, as token is generated. But problem is with REST2 module.

when I try to do this with my url I get not found from RT.
curl -H ‘Authorization: token XX_TOKEN_XX’ ‘XX_RT_URL_XX/REST/2.0/queues/all’

How to debug this further why this is not working in my case. I have added Plugin(‘RT::Extension::REST2’); to

I am using Debian in RT was installed from repo. Token and REST2 api were compiled from source.


Do you see any errors in the web server logs? Did you clear the Mason cache and restart the web server?


yes, i cleared the cache. I noticed that my link was wrong, i did not use “rt” part. So now I am calling like: “” but I get 500, internal server error.

I do not see anything in syslog and there is nothing in log folder for rt.

One thing, when i cleared chacke i need to add permisson to www-data to obj folder.

        <title>500 Internal Server Error</title>
        <h1>Internal Server Error</h1>
        <p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
        <p>Please contact the server administrator at 
 webmaster@localhost to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
        <p>More information about this error may be available
in the server error log.</p>
        <address>Apache/2.4.25 (Debian) Server at Port 80</address>

Another thing. I noticed in obj folder, that only ls
“plugin-RT::Authen::Token” and “standard” are created. I not not see anything that could be indecation REST2. Plug in added to config file and i have look again in syslog if anything pops out when apache2 is restarted. I do not see any error.

Only this: Any::Moose is deprecated. Please use Moo instead at /usr/local/share/perl/5.24.1/Path/Dispatcher/ line 2.


You need to check the web server logs, not syslog or RT’s log



thank you. @G.Booth i get this: Undefined subroutine &Path::Dispatcher::blessed called at /usr/local/share/perl/5.24.1/Path/ line 65.\n

blessed() should be coming from Scalar::Util which is included in the 6th line of RT::Extension::REST2::Util (not to mention lots of other places in RT), so that’s an odd error.

If you go to (in a normal web browser):


(depending on what your RT config’s WebPath and WebBaseURL settings actually are) do you get the help documentation for the REST 2.0 extension appearing?

If you don’t get anything appearing, find your local/plugins/RT-Extension-REST2/lib/RT/Extension directory and in add the line:

use Scalar::Util qw( blessed );

after the use warnings; line (after line 3 according to my copy of the code). That should ensure that Scalar::Util's blessed() subroutine is available before Path::Dispatcher is called.

Hi @GreenJimll.

I did what you suggested but it is the same. for PATH/REST/2.0 ( for this one is 404 no found )or PATH/RT/REST/2.0 (here is “Internal Server Error” ).

Edited “vim /usr/local/share/request-tracker4/plugins/RT-Extension-REST2/lib/RT/Extension/REST2/”

Now i have like:

use strict;
use warnings;
use Scalar::Unit qw( blessed );

Did you clear the Mason cache and restart the web server after putting that line in? You need to do that after any change to RT code (sorry - I should have been more explicit - I’m just used to doing all the time).

yes, but it is the same :frowning:
is it normal that i have to add persmision to www-data to obj dir every time whay i do that?

Nope - I just installed a fresh RT install on my desktop Debian machine to check (as we use a different Linux distro for our production services) and I can blow away /opt/rt4/var/mason_data/obj and it just recreates it when I restart the web front end. I should note that /opt/rt4/var/mason_data directory is owned by www-data which is why it can regenerate the obj directory OK.


i am getting the same :frowning:

Undefined subroutine &Path::Dispatcher::blessed called at /usr/local/share/perl/5.24.1/Path/ line 65.\n

reinstalling from source could fix this?

OK, i manage to get it working.

I have now response from /rt/REST/2.0/ :slight_smile:

The url that i have to edit was: