TheTransitClock / transitclockDocker

Docker installer for TheTransitClock
MIT License
16 stars 15 forks source link

import_gtfs.sh with maxDistanceBetweenStops parameter problem #10

Open wkulesza opened 3 years ago

wkulesza commented 3 years ago

Trying to correct incorrect way the routes/patterns are displayed on map by modifying the parameter maxDistanceBetweenStops in import_gtfs.sh script in transitclock docker.

After docker exec to instance, i modified the import_gtfs.sh to this (it is default, only the java command is changed: 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

After running the script, it finishes with UPDATE 0 and this is in core.log:

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

scrudden commented 3 years ago

Can you provide the GTFS file?

wkulesza commented 3 years ago

Hey It’s not public but it works as it’s picked up when doing the go.sh

W dniu pon., 23.11.2020 o 14:34 Sean Óg Crudden notifications@github.com napisał(a):

Can you provide the GTFS file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TheTransitClock/transitclockDocker/issues/10#issuecomment-732164797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHXUGEQRS76W6ED6ZDVIJTSRJQE3ANCNFSM4T7OMZSQ .

-- Wojciech Kulesza

Właściciel / Owner

goEuropa Polska Wojciech Kulesza +48616248682 wojciech.kulesza@goeuropa.eu www.goeuropa.eu ul. 28 Czerwca 1956r nr 400 Kiedy przyjedzie autobus? Sprawdż na www.kiedybus.pl https://www.kiedybus.pl/