traccar implementation

783 views
Skip to first unread message

Mohamed Jamel

unread,
Jun 18, 2020, 12:34:08 PM6/18/20
to TheTransitClock
Hi,
I would like to create my own gtfs realtime feed. i  already have a gps that connect to my traccar server a beside  my gtfs feed.
so i want to implement it to transitime  . and create my gtfs rt feed.

Óg Crudden

unread,
Jun 18, 2020, 12:51:40 PM6/18/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

Are you going to set up your own transitclock instance?

Cheers,
Sean.

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thetransitclock/f0eda14e-eac1-44f9-bb1c-9035e473f152o%40googlegroups.com.

Mohamed Jamel

unread,
Jun 18, 2020, 12:59:18 PM6/18/20
to TheTransitClock
Hi,

yes i would like to set up my own transitclock instance

best regards

Mohamed Jamel

unread,
Jun 19, 2020, 5:50:01 AM6/19/20
to TheTransitClock
 
Hi,
 
So I tried transitclockdocker and it's working fine. But I couldn't add my traccar information to it.

   best regards  
 
 

Óg Crudden

unread,
Jun 19, 2020, 6:06:04 AM6/19/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

This line has a list of optional modules that can be run in TheTransitClock. In MPK it reads the data from a GTFS vehicle positions feed which is done with the GtfsRealtimeModule


You need to replace this module with the org.transitclock.custom.traccar.TraccarAVLModule module and then set the following parameters in the transitclock.properties file.

transitclock.avl.traccar.email
transitclock.avl.traccar.password
transitclock.avl.traccar.baseurl

You will then need to turn on the autoassigner as there will be no assignment information in your traccar feed. This can be done by setting this value in transitclock.properties.


Hope this helps.

Cheers,
Sean.



--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 19, 2020, 10:33:39 AM6/19/20
to TheTransitClock
 
Hi Óg,


i added those lines in my transitclock.proerties file :
transitclock.modules.optionalModulesList=org.transitclock.custom.traccar.TraccarAVLModule
transitclock.avl.traccar.email=email
transitclock.avl.traccar.password=pass
transitclock.avl.traccar.baseurl=http://@traccar:port    
and i changed autoassigned to true 
transitclock.autoBlockAssigner.autoAssignerEnabled=true
but unfortunately when i visit transitclock's api vehicles i don't find any vehicle
  

   
 
 
 

Óg Crudden

unread,
Jun 19, 2020, 10:49:04 AM6/19/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

Can you check the avl.log file within the docker container and see if it is giving a reason. I suspect it is these settings that may not be valid for your location.

transitclock.avl.minLongitude=10.725
transitclock.avl.maxLongitude=25.35
transitclock.avl.minLatitude=51.35
transitclock.avl.maxLatitude=55.45


Cheers,
Sean.

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 19, 2020, 1:08:02 PM6/19/20
to TheTransitClock
 
Hi Óg,
 
In my avl log file i didn't find anything useful it's started by 

Started module org.transitclock.avl.GtfsRealtimeModule for agencyId=1
reading file:///C:/Users/Mike/gtfsRealtimeData
read complete
processed 0 reports for feed file:///C:/Users/Mike/gtfsRealtimeData
reading file:///C:/Users/Mike/gtfsRealtimeData
read complete 

And i already fixied minLongitude,maxLongitude,minLatitude,maxLatitude in transitclock.properties

    
     

 
 

Óg Crudden

unread,
Jun 19, 2020, 1:16:47 PM6/19/20
to Mohamed Jamel, TheTransitClock
Did you run go.sh after changes to properties?

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 19, 2020, 1:25:14 PM6/19/20
to TheTransitClock


          yes i did  
 

Óg Crudden

unread,
Jun 19, 2020, 1:41:37 PM6/19/20
to Mohamed Jamel, TheTransitClock
Is there any info in core.log?

On Fri, 19 Jun 2020, 18:25 Mohamed Jamel, <khiared...@gmail.com> wrote:


          yes i did  
 

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 22, 2020, 6:31:40 AM6/22/20
to TheTransitClock
 
Hi Óg,

thank you  for helping me. I check my core.log file and it said that traccar url missing /api in the end . so i fixed it  and now i  can see my vehicle as Unassigned Vehicles in the map.
But it get to long to update the vehicle  position.
So is there any configuration to make the update at the moment? 
And how to assign a vehicle to a trip?

   best regards  


  
 
 

Óg Crudden

unread,
Jun 22, 2020, 7:18:30 AM6/22/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

Glad to hear you are making progress. Are the vehicle positions updating on the map even though they are taking some time?

Cheers,
Sean.

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 22, 2020, 7:33:03 AM6/22/20
to TheTransitClock
Hi Óg,

       yes the vehicle positions are updating in the map but they take 3 to 7 minutes to re update 

Óg Crudden

unread,
Jun 22, 2020, 7:35:19 AM6/22/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,
Can you look in avl.log and see how often you are getting an avl update into TheTransitClock? I want to understand if the delay is in the traccar or in the clock.
Cheers,
Sean.

On Mon, Jun 22, 2020 at 12:33 PM Mohamed Jamel <khiared...@gmail.com> wrote:
Hi Óg,

       yes the vehicle positions are updating in the map but they take 3 to 7 minutes to re update 

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 22, 2020, 7:46:39 AM6/22/20
to TheTransitClock
Hi Óg,

In my avl.log file there are some errors :
 
1/Error accessing AVL feed using URL=null.

2/Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@7d7f1e31; line: 1, column: 535] (through reference chain: java.util.ArrayList[0]->io.swagger.client.model.Position["network"])

Óg Crudden

unread,
Jun 22, 2020, 7:52:32 AM6/22/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

Could you send me the avl.log file?

Cheers,
Sean.

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 22, 2020, 8:17:30 AM6/22/20
to TheTransitClock
Hi Óg,
  
This is my avl.log file  
avl.log

Óg Crudden

unread,
Jun 22, 2020, 8:22:42 AM6/22/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

This seems to be an issue that will need further investigation. The api from traccar may have changed or a recent change to the code in TheTransitClock may have affected this. 

For me to look at this further I would need to test against the traccar api you are using and the GTFS file you are using. 

Cheers,
Sean.

On Mon, Jun 22, 2020 at 1:17 PM Mohamed Jamel <khiared...@gmail.com> wrote:
Hi Óg,
  
This is my avl.log file  

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Óg Crudden

unread,
Jun 22, 2020, 9:43:05 AM6/22/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

I ran a test against your traccar server and it failed on the old traccar api swagger file. On the latest api swagger file from traccar it seems to work. I will raise an issue on Github and fix.

Cheers,
Sean.


Mohamed Jamel

unread,
Jun 22, 2020, 11:56:11 AM6/22/20
to TheTransitClock
 
Hi Óg,

I think it works . In my avl.log file it update the vehicle  position every 10 second .But in the map it get longer than that .
and another question  i created my gtfs file with static gtfs manager and the shape there was very clear and right but in transitclock the shape was different 

best regards

Óg Crudden

unread,
Jun 22, 2020, 12:19:40 PM6/22/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,
Can you show me an image of the two side by side?
Thanks,
Sean.

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 22, 2020, 12:51:14 PM6/22/20
to TheTransitClock
Hi Óg,

this is transitclock image :
 
and those images from static gtfs manager.

ps: my gtfs feed has 1 route and 48 trips every trip has onward and return journey


   Best regards
Screenshot from 2020-06-22 17-31-59.png
Screenshot from 2020-06-22 17-31-37.png
Screenshot from 2020-06-22 17-39-02.png

Vicente Pérez

unread,
Jun 23, 2020, 9:58:18 AM6/23/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

GTFSFilePorcessor assumes that bus stops are quite close. I had some similar issue, so I had to add two parameters: maxDistanceBetweenStops and disableSpecialLoopBackToBeginningCase. 
When you load the GTFS file (remember to change the date of the file or to remove previous data) try with different combinations of them. Particularly  try  with a larger number for maxDistanceBetweenStops: more than the distance between the first two stops that looks large.

Best regards
Vicente



--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jun 24, 2020, 7:11:33 PM6/24/20
to TheTransitClock

 Hi,

It works. i added  maxDistanceBetweenStops and disableSpecialLoopBackToBeginningCase to import_gtfs.sh file. and voila ! my  shape looks prettier.thank you Vicente for helping .
But I still  wonder how does transitclock assign a vehicle to a  trip cause i have 2 vehicles and it only assigned one .

 Best regards 

Mohamed Jamel

unread,
Jul 6, 2020, 8:25:37 AM7/6/20
to TheTransitClock
Hi Óg, 
 
I hope you are doing great.

So thank to you my transitclock instance works fine in the localhost. But when i use it in the server it telling me 400 bad request

Ps  i have traccar installed in the server  

Best regards

Óg Crudden

unread,
Jul 6, 2020, 3:22:25 PM7/6/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

Sorry, I do not have enough information on how you have set it up on your server to be of assistance. Is there any information in the tomcat log files? 

Cheers,
Sean.



--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jul 12, 2020, 2:49:39 PM7/12/20
to TheTransitClock

Hi Óg,

I did  implement  transitclock instance  in an azure VM.i had an error 400 bad request in the api . and it was caused by  a low memory space . so i increase my VM resourse.
and i fixed it.
But i was wondering is there any way to improve the prediction in transitclock cause sometimes there is no predictions or there is no  Vehicles assigned

Best regards 

Óg Crudden

unread,
Jul 12, 2020, 3:03:54 PM7/12/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

If there are no vehicles assigned this can be because the Auto Assigner is not able to assign them. You have two paths to resolving this. One is to have the assignment provided to the transitclock and the other is to look at changing the configuration options used by the Auto Assigner and see if changing these results in your vehicles being more often assigned. 

Is there any data source where you could get access to the vehicle assignment? If not, then I think the later option is worth you investigating further.

Cheers,
Sean Óg.




--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jul 13, 2020, 7:52:27 AM7/13/20
to TheTransitClock
   
  Hi Óg,

Thank you for helping i really appreciate it . 
So i will try to change the configuration options of the auto assigner. and i hope i find a better result .
But what do you mean by vehicle assignment data  source 

Best regards 
 

Óg Crudden

unread,
Jul 13, 2020, 7:56:18 AM7/13/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

In some bus companies the driver signs into the vehicle for their work roster which has a list of trips  that they are meant to run that day. This set of trips is known as a block. If we know the block for the bus then we can assign it correctly while it is running. This data from this sign in is what I am thinking about. Does that make sense?

Cheers,
Sean Óg

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Mohamed Jamel

unread,
Jul 13, 2020, 11:28:03 AM7/13/20
to TheTransitClock
 
Hi Óg,

Okay that make sense.but it's little complicated.
the vehicle has a list of trips known as a block. the driver has to signs into the vehicle that has his block.and we need the block to assign the bus correctly .
so how i can create this block and what type of data it is (file /api)? 
Best regards

Óg Crudden

unread,
Jul 13, 2020, 3:59:39 PM7/13/20
to Mohamed Jamel, TheTransitClock
Hi Mohamed,

block_id can be set on the GTFS static file. See link below for more information.


Cheers,
Sean Óg.




--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

khiared...@gmail.com

unread,
Jul 14, 2020, 6:06:53 PM7/14/20
to TheTransitClock
Hi Óg,

Okay that interesting.So i added block_id into my trips file.and the transitclock'api for the blocks are working fine.
 but nothing change in the Vehicles assignment 

Best regards 

Óg Crudden

unread,
Jul 16, 2020, 8:30:18 AM7/16/20
to khiared...@gmail.com, TheTransitClock
Hi Mohamed,

There are two sides to this. You need a block id (or trip id) in the GTFS static file but you also need a matching block id (or trip id) in the AVL real time data source.

Traccar does not provide this which is why I asked if you have an alternative AVL data source that has this data?

Hope this helps.

Cheers,
Sean.

Joshua R Santiago-Ibarra

unread,
Jul 16, 2020, 8:40:59 AM7/16/20
to TheTransitClock
Hi,

I've followed the steps into implementing traccar. Yet, I can't get access to it. The program can't is always unauthorized to get the data from traccar. I've checked the passwords are right but it doesn't work.

Thanks,

Joshua

Óg Crudden

unread,
Jul 16, 2020, 8:44:15 AM7/16/20
to Joshua R Santiago-Ibarra, TheTransitClock
Hi Joshua,

Where are you seeing the message that it is unauthorized? 

Cheers,
Sean.

Joshua R Santiago-Ibarra

unread,
Jul 16, 2020, 8:45:28 AM7/16/20
to TheTransitClock
Hi Óg,

In the core.log

Joshua R Santiago-Ibarra

unread,
Jul 16, 2020, 11:14:07 AM7/16/20
to TheTransitClock
Hi Óg,

Thanks for the help in the GitHub issue. It's up and running. I only have one doubt, how do I view the website?
Do I have to start transit clock quick start simultaneously or not?

Thanks for the help

Joshua R Santiago-Ibarra

unread,
Jul 16, 2020, 1:51:52 PM7/16/20
to TheTransitClock
Hi,
I'm having the same problem with the GTFS file. Where did you add maxDistanceBetweenStops and SpecialLoopBack?

Thank you,

khiared...@gmail.com

unread,
Jul 16, 2020, 4:01:20 PM7/16/20
to TheTransitClock
Hi Joshua,

You can add maxDistanceBetweenStops and  SpecialLoopBack at the java command  in the import_gtfs.sh file. 

Best regards

khiared...@gmail.com

unread,
Jul 16, 2020, 4:14:52 PM7/16/20
to TheTransitClock

Hi Óg,

I already added the block_id into my gtfs static file.But actually i don' t have  an alternative AVL data source for traccar .
Is there anything that i can do to provide this data ?

Best regards 

Óg Crudden

unread,
Jul 16, 2020, 4:21:31 PM7/16/20
to khiared...@gmail.com, TheTransitClock
Hi Mohamed,

The ideal input for TheTransitClock is a GTFS realtime vehicle position feed with assignment information provided in this feed. The Traccar data does not have any assignment information, only positions. So in this case the autoassigner is required, and the appropriate configuration of it needs to be considered.

Hope this helps.

Cheers,
Sean.




--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

khiared...@gmail.com

unread,
Jul 22, 2020, 6:56:22 AM7/22/20
to TheTransitClock
Hi Óg,

So how to configure the autoassigner in the transitclock

Best regards  

Óg Crudden

unread,
Jul 22, 2020, 10:10:58 AM7/22/20
to khiared...@gmail.com, TheTransitClock
Hi Mohamed,

If you search for autoBlockAssigner in the code or in the coreconfig.log file you will see the set of parameters that can be set for the autoassigner. The one to turn it on is 

transitclock.autoBlockAssigner.autoAssignerEnabled

which needs to be set to true. 

If you have issues with assigning vehicles from the first stops of a block or trip you could also run the SchedBasedPredsModule.

Cheers,
Sean.

Cheers,
Sean.


Joshua R Santiago-Ibarra

unread,
Jul 22, 2020, 10:58:18 AM7/22/20
to TheTransitClock
Hi Óg,

When I'm running transit clock and the bus matches with a route the following error appears. I've runned the program various times and it's the same error. I have auto assigner enabled

Thanks for the help

Joshua R Santiago-Ibarra

unread,
Jul 22, 2020, 10:59:11 AM7/22/20
to TheTransitClock
java.lang.NullPointerException: null
at org.transitclock.core.RealTimeSchedAdhProcessor.generateEffectiveScheduleDifference(RealTimeSchedAdhProcessor.java:185) ~[Core.jar:na]
at org.transitclock.core.PredictionGeneratorDefaultImpl.generate(PredictionGeneratorDefaultImpl.java:423) ~[Core.jar:na]
at org.transitclock.core.MatchProcessor.processPredictions(MatchProcessor.java:80) ~[Core.jar:na]
at org.transitclock.core.MatchProcessor.generateResultsOfMatch(MatchProcessor.java:200) ~[Core.jar:na]
at org.transitclock.core.AvlProcessor.lowLevelProcessAvlReport(AvlProcessor.java:1425) ~[Core.jar:na]
at org.transitclock.core.AvlProcessor.processAvlReport(AvlProcessor.java:1619) ~[Core.jar:na]
at org.transitclock.avl.AvlClient.run(AvlClient.java:163) ~[Core.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_262]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_262]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_262]
at org.transitclock.utils.threading.NamedThread.run(NamedThread.java:100) [Core.jar:na]

khiared...@gmail.com

unread,
Jul 24, 2020, 10:36:34 AM7/24/20
to TheTransitClock

Hi Óg,

in the transitclock.properties  i found these params:
transitclock.autoBlockAssigner.ignoreAvlAssignments=false
transitclock.autoBlockAssigner.allowableEarlySeconds=1200
transitclock.autoBlockAssigner.allowableLateSeconds=1200
i already  increment the allowableLate/EarlySeconds value and nothing has been changed beside i added 
transitclock.modules.optionalModulesList=org.transitclock.core.schedBasedPreds.SchedBasedPredsModule
some stops has no prediction

Best regards 


Óg Crudden

unread,
Jul 24, 2020, 1:51:15 PM7/24/20
to khiared...@gmail.com, TheTransitClock
Hi Mohamed,
Not sure I understand what you are asking me in this post. Could you elaborate?
Thanks,
Sean.

khiared...@gmail.com

unread,
Jul 24, 2020, 4:04:42 PM7/24/20
to TheTransitClock
Hi Óg,
I want to configure the transitclock autoassigner and i don't know how to do it 
Best regards 

Óg Crudden

unread,
Jul 24, 2020, 4:09:48 PM7/24/20
to khiared...@gmail.com, TheTransitClock
Hi Mohamed,

Are any of your vehicles assigned at any time? Can you see this on the map or in the autoAssigner.log file. 

It is hard to diagnose just by email. 

Cheers,
Sean.



khiared...@gmail.com

unread,
Jul 24, 2020, 4:18:28 PM7/24/20
to TheTransitClock
Hi Óg,

Right now i have 3 vehicles and only one is assigned.But i don't know how it's work cause this morning i checked out and there  were all assigned vehicle  i think in every trip it reassigned 

Best regards 

Óg Crudden

unread,
Jul 24, 2020, 4:23:04 PM7/24/20
to khiared...@gmail.com, TheTransitClock
Hi Mohamed,
Are the vehicles servicing active trips (on route) or are they waiting to start their trips?
Cheers,
Sean.


khiared...@gmail.com

unread,
Jul 24, 2020, 4:46:16 PM7/24/20
to TheTransitClock

Hi Óg,
One is waiting to start the trip and the other is servicing another trip 
Best regards 

wojciech...@goeuropa.eu

unread,
Nov 23, 2020, 5:58:46 AM11/23/20
to TheTransitClock
Hey guys,
i tried adding - maxDistanceBetweenStops 100 and run import_gtfs when logged in to docker but i got:UPDATE 0 in the end of the process.
See the map of schedules, and still a lot of long straight lines.

Am i doing something wrong ?

I don't have disableSpecialLoopBackToBeginningCase anywhere in import_gtfs and my line looks like this:

java -Xmx4g -Dtransitclock.core.agencyId=$AGENCYID -Dtransitclock.configFiles=/usr/local/transitclock/config/transitclock.properties -Dtransitclock.logging.dir=/usr/local/transitclock/logs/ -Dlogback.configurationFile=$TRANSITCLOCK_CORE/transitclock/src/main/resouces/logbackGtfs.xml -cp /usr/local/transitclock/Core.jar org.transitclock.applications.GtfsFileProcessor -gtfsUrl $GTFS_URL  -maxDistanceBetweenStops 100 -maxTravelTimeSegmentLength 100

Regards,
Wojciech

Óg Crudden

unread,
Nov 23, 2020, 6:53:54 AM11/23/20
to wojciech...@goeuropa.eu, TheTransitClock
Hi Wojciech,

The gtfs import failed so there may be more detail in core.log.

Cheers,
Sean.

--
www.thetransitclock.org
---
You received this message because you are subscribed to the Google Groups "TheTransitClock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thetransitclo...@googlegroups.com.

Wojciech Kulesza

unread,
Nov 23, 2020, 7:24:39 AM11/23/20
to Óg Crudden, TheTransitClock
Hi,
here is log immediately after update 0:

root@5e36cee436b0:/usr/local/transitclock/logs/1211/core/2020/11/23# tail -n 100 core.log
  Detail: Key (tripid, starttime, configrev)=(501, 60900, 0) is still referenced from table "trip_scheduledtimeslist".
Error writing GTFS configuration data to db.
org.hibernate.exception.ConstraintViolationException: could not execute statement
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ~[Core.jar:na]
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211) ~[Core.jar:na]
        at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:211) ~[Core.jar:na]
        at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1346) ~[Core.jar:na]
        at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:389) ~[Core.jar:na]
        at org.transitclock.db.structs.Block.deleteFromRev(Block.java:285) ~[Core.jar:na]
        at org.transitclock.gtfs.DbWriter.actuallyWriteData(DbWriter.java:104) ~[Core.jar:na]
        at org.transitclock.gtfs.DbWriter.write(DbWriter.java:222) ~[Core.jar:na]
        at org.transitclock.gtfs.GtfsData.processData(GtfsData.java:2743) [Core.jar:na]
        at org.transitclock.applications.GtfsFileProcessor.process(GtfsFileProcessor.java:306) [Core.jar:na]
        at org.transitclock.applications.GtfsFileProcessor.main(GtfsFileProcessor.java:677) [Core.jar:na]
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "trips" violates foreign key constraint "fk_n5et0p70cwe1dwo4m6lq0k4h0" on table "trip_scheduledtimeslist"
  Detail: Key (tripid, starttime, configrev)=(501, 60900, 0) is still referenced from table "trip_scheduledtimeslist".
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198) ~[Core.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927) ~[Core.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:562) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366) ~[Core.jar:na]
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:147) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) ~[Core.jar:na]
        ... 9 common frames omitted
Exception when writing data to db
org.hibernate.exception.ConstraintViolationException: could not execute statement
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ~[Core.jar:na]
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211) ~[Core.jar:na]
        at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:211) ~[Core.jar:na]
        at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1346) ~[Core.jar:na]
        at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:389) ~[Core.jar:na]
        at org.transitclock.db.structs.Block.deleteFromRev(Block.java:285) ~[Core.jar:na]
        at org.transitclock.gtfs.DbWriter.actuallyWriteData(DbWriter.java:104) ~[Core.jar:na]
        at org.transitclock.gtfs.DbWriter.write(DbWriter.java:222) ~[Core.jar:na]
        at org.transitclock.gtfs.GtfsData.processData(GtfsData.java:2743) ~[Core.jar:na]
        at org.transitclock.applications.GtfsFileProcessor.process(GtfsFileProcessor.java:306) [Core.jar:na]
        at org.transitclock.applications.GtfsFileProcessor.main(GtfsFileProcessor.java:677) [Core.jar:na]
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "trips" violates foreign key constraint "fk_n5et0p70cwe1dwo4m6lq0k4h0" on table "trip_scheduledtimeslist"
  Detail: Key (tripid, starttime, configrev)=(501, 60900, 0) is still referenced from table "trip_scheduledtimeslist".
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198) ~[Core.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927) ~[Core.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:562) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366) ~[Core.jar:na]
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:147) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) ~[Core.jar:na]
        ... 9 common frames omitted
could not execute statement
org.hibernate.exception.ConstraintViolationException: could not execute statement
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129) ~[Core.jar:na]
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211) ~[Core.jar:na]
        at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:211) ~[Core.jar:na]
        at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1346) ~[Core.jar:na]
        at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:389) ~[Core.jar:na]
        at org.transitclock.db.structs.Block.deleteFromRev(Block.java:285) ~[Core.jar:na]
        at org.transitclock.gtfs.DbWriter.actuallyWriteData(DbWriter.java:104) ~[Core.jar:na]
        at org.transitclock.gtfs.DbWriter.write(DbWriter.java:222) ~[Core.jar:na]
        at org.transitclock.gtfs.GtfsData.processData(GtfsData.java:2743) ~[Core.jar:na]
        at org.transitclock.applications.GtfsFileProcessor.process(GtfsFileProcessor.java:306) ~[Core.jar:na]
        at org.transitclock.applications.GtfsFileProcessor.main(GtfsFileProcessor.java:677) ~[Core.jar:na]
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "trips" violates foreign key constraint "fk_n5et0p70cwe1dwo4m6lq0k4h0" on table "trip_scheduledtimeslist"
  Detail: Key (tripid, starttime, configrev)=(501, 60900, 0) is still referenced from table "trip_scheduledtimeslist".
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198) ~[Core.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927) ~[Core.jar:na]
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:562) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420) ~[Core.jar:na]
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366) ~[Core.jar:na]
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:147) ~[Core.jar:na]
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) ~[Core.jar:na]
        ... 9 common frames omitted
====================================================AvlProcessor processing AvlReport [vehicleId=6, time=11-23-2020 12:59:17.000 CET, location=[52.38586, 16.90274], speed=NaN, heading=NaN, source=This is th, assignmentId=null, assignmentType=UNSET]
No assignment info for vehicleId=6 so trying to assign vehicle without it.
Trying to automatically assign vehicleId=6


Can you advice ?

Wojciech
--

Wojciech Kulesza

Właściciel / Owner

goEuropa Polska Wojciech Kulesza

+48616248682
wojciech...@goeuropa.eu
www.goeuropa.eu
ul. 28 Czerwca 1956r nr 400
Kiedy przyjedzie autobus? Sprawdż na www.kiedybus.pl

Óg Crudden

unread,
Nov 23, 2020, 7:48:04 AM11/23/20
to Wojciech Kulesza, TheTransitClock
Hi Wojciech,
Could you create a github issue with this detail and attach the gtfs file?
Thanks,
Sean.

Wojciech Kulesza

unread,
Nov 23, 2020, 7:54:16 AM11/23/20
to Óg Crudden, TheTransitClock

Joshua R Santiago-Ibarra

unread,
Feb 11, 2021, 3:35:01 PM2/11/21
to TheTransitClock
Hello, 
I hope you are all in good health. I'm writing because I've been using Transit Clock with Traccar and passing it on to One Bus Away. Some days ago I switched from the 5 device server in Traccar to the 20 device server and from that moment I haven't been able to see the GPS in the transit clock. 

The following shows the Avl file. And the core file, the last logs on the core.log are from me checking if the GPS is visible on the map. I only have one vehicle en route. 

core.log
avl.log

Óg Crudden

unread,
Feb 11, 2021, 3:44:08 PM2/11/21
to Joshua R Santiago-Ibarra, TheTransitClock
Hi Joshua,

From the avl log file it looks like the permissions are not set on traccar. The user you use for TheTransitClock to talk to traccar needs admin access to traccar.

Cheers,
Sean.

Reply all
Reply to author
Forward
0 new messages