Network Rail Data Feeds : "..not authorized to read from topic.." problem

491 views
Skip to first unread message

Mike Flynn

unread,
Sep 3, 2013, 1:16:52 PM9/3/13
to openrail...@googlegroups.com
I have a Network Rail Data Feeds account which is active and I can connect to the server okay but am then unable to subscribe to a topic.  I've tried using both Java/Gozirra and PHP/Stomp Pecl Package as per the code examples.  I've also tried subscribing to different topics.  Here's the return message;

'User <<my email address/user id>> is not authorized to read from: topic://TRAIN_MVT_ALL_TOC";

As a further test I'm currently subscribed to everything (at least according to my account at https://datafeeds.networkrail.co.uk/ntrod/myFeeds). I tried contacting support but without reply (since yesterday morning).  Maybe someone on the forum has an answer?  

There's also a Unique Security Token associated with my account which "Should be included in communications with the Network Rail Data Feeds messenger service."  However, I can see no further mention of it in any of the documentation I can find.  

Am I missing something obvious? Any help would be appreciated.

Peter Hicks

unread,
Sep 3, 2013, 1:56:14 PM9/3/13
to openrail...@googlegroups.com
Hi Mike


On 03/09/13 18:16, Mike Flynn wrote:
I have a Network Rail Data Feeds account which is active and I can connect to the server okay but am then unable to subscribe to a topic.  I've tried using both Java/Gozirra and PHP/Stomp Pecl Package as per the code examples.  I've also tried subscribing to different topics.  Here's the return message;

'User <<my email address/user id>> is not authorized to read from: topic://TRAIN_MVT_ALL_TOC";
Have you subscribed through the web interface to the appropriate topic?  I'm not in the office, so I can't check which subscriptions your user has at the moment.

As a further test I'm currently subscribed to everything (at least according to my account at https://datafeeds.networkrail.co.uk/ntrod/myFeeds). I tried contacting support but without reply (since yesterday morning).  Maybe someone on the forum has an answer?
I can't see a support ticket from you - where did you send it and at what time?  Did you get any sort of auto-reply or acknowledgement?

There's also a Unique Security Token associated with my account which "Should be included in communications with the Network Rail Data Feeds messenger service."  However, I can see no further mention of it in any of the documentation I can find.
We deprecated the Developer Pack back in January and replaced it with the Open Data Wiki at http://nrodwiki.rockshore.net - the security token isn't required any more.


Peter

Mike Flynn

unread,
Sep 3, 2013, 3:09:02 PM9/3/13
to openrail...@googlegroups.com
>> the security token isn't required any more.

I vaguely remember reading this somewhere but I only did a search on the forum.  I'll look again for more info

>> where did you send it and at what time

At https://datafeeds.networkrail.co.uk/ntrod/myFeeds there's a black box in the top left corner, 'CONTACT SUPPORT' which sends to nrod.s...@rockshore.net.  Yesterday morning.

>> I'm not in the office

No rush, Peter.  Just glad to hear someone's on the case.  I did only try a few different topics.  I'll try some further testing tomorrow if I don't here back first.   

Thanks

Phil Wieland

unread,
Sep 3, 2013, 3:38:48 PM9/3/13
to openrail...@googlegroups.com
On Tuesday, September 3, 2013 6:16:52 PM UTC+1, Mike Flynn wrote:
I have a Network Rail Data Feeds account which is active and I can connect to the server okay but am then unable to subscribe to a topic.  I've tried using both Java/Gozirra and PHP/Stomp Pecl Package as per the code examples.  I've also tried subscribing to different topics.  Here's the return message;

'User <<my email address/user id>> is not authorized to read from: topic://TRAIN_MVT_ALL_TOC";

I'm not aware of the spec for the packages you're using, but the actual name of the topic in the stomp SUBSCRIBE message is

/topic/TRAIN_MVT_ALL_TOC

Do you perhaps need /topic/ adding, or maybe the php does that for you??

Mike Flynn

unread,
Sep 4, 2013, 5:21:18 AM9/4/13
to openrail...@googlegroups.com
Thanks Phil, but I do try subscribing as below.  It's the 'unauthorized' message which comes back in the different format.

$channel = "TRAIN_MVT_ALL_TOC";
$con->subscribe("/topic/" . $channel);

Trying these

TRAIN_MVT_GENERAL
TRAIN_MVT_PASSENGER_TOC

I also receive the 'unauthorized' message.  My Feeds currently has everything included, that's everything from the left column to the right (including, for example, Train Movements General).

However, I have just this minute tried TRAIN_MVT_EH_TOC and CAN now read frames for Cross Country (and presumably other individual TOCs - I'll test further).  Yeah!  I'm further forward but still hoping to receive for TRAIN_MVT_PASSENGER_TOC.  Maybe it's particular to how I include subscribed feeds on the web interface?

Peter Hicks

unread,
Sep 4, 2013, 5:24:36 AM9/4/13
to openrail...@googlegroups.com
On 04/09/13 10:21, Mike Flynn wrote:
> However, I have just this minute tried TRAIN_MVT_EH_TOC and CAN now
> read frames for Cross Country (and presumably other individual TOCs -
> I'll test further). Yeah! I'm further forward but still hoping to
> receive for TRAIN_MVT_PASSENGER_TOC. Maybe it's particular to how I
> include subscribed feeds on the web interface?
The TRAIN_MVT_ALL_TOC feed is a separate one to the per-TOC feeds.

You can subscribe to *all* train movement data, or just movement
messages for a particular TOC - but you can't subscribe to the all-TOC
feed *and* per-TOC feeds.

Can you email me offlist with a screenshot of the movement feeds you're
subscribed to?

Cheers,


Peter

Mike Flynn

unread,
Sep 4, 2013, 12:16:08 PM9/4/13
to openrail...@googlegroups.com

That's done it, I cam now subscribe to TRAIN_MVT_ALL_TOC or TRAIN_MVT_EH_TOC,  though still not TRAIN_MVT_PASSENGER_TOC.  More than enough to go on.  Yes, it's seems maybe I tried maybe to subscribe to ALL when I only had individual subscriptions and to individual when I only had all.  I was also testing for TRAIN_MVT_GENERAL which I'm now thinking might not happen that often.  And, in my frustration, I realised I'd missed out "/topic/" in one of my test programs.  

Thanks again!
Reply all
Reply to author
Forward
0 new messages