Closed jSantiago318 closed 4 years ago
You may be better using the docker example in
https://github.com/TheTransitClock/transitclockDocker/tree/MPK
There is also details around traccar integration in the latest posts on the mailing list.
https://groups.google.com/forum/?hl=en#!forum/thetransitclock
Getting GTFS-realtime AVL data from URL=http://localhost:8082/api/devices ... Exception when reading GTFS-realtime data from URL http://localhost:8082/api/devices java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_252] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_252] at java.net.Socket.connect(Socket.java:607) ~[na:1.8.0_252] at java.net.Socket.connect(Socket.java:556) ~[na:1.8.0_252] at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.New(HttpClient.java:339) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.New(HttpClient.java:357) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) ~[na:1.8.0_252] at java.net.URL.openStream(URL.java:1068) ~[na:1.8.0_252] at org.transitclock.feed.gtfsRt.GtfsRtVehiclePositionsReaderBase.process(GtfsRtVehiclePositionsReaderBase.java:252) ~[Core.jar:na] at org.transitclock.feed.gtfsRt.GtfsRtVehiclePositionsReader.getAvlReports(GtfsRtVehiclePositionsReader.java:71) [Core.jar:na] at org.transitclock.avl.GtfsRealtimeModule.getAndProcessData(GtfsRealtimeModule.java:88) [Core.jar:na] at org.transitclock.avl.PollUrlAvlModule.run(PollUrlAvlModule.java:249) [Core.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_252] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_252] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_252] at org.transitclock.utils.threading.NamedThread.run(NamedThread.java:100) [Core.jar:na]
This error has been constant when I try to run the code. I've changed the link to get the data from traccar, checked that the passwords are right but it hasn't worked
Hi Joshua,
Where do you have traccar running and what version are you using?
I recently upgraded the client for the latest version so Mohamed could connect to Traccar.
Cheers, Sean.
On Thu, Jul 16, 2020 at 1:44 PM Joshua Santiago notifications@github.com wrote:
Getting GTFS-realtime AVL data from URL=http://localhost:8082/api/devices ... Exception when reading GTFS-realtime data from URL http://localhost:8082/api/devices java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_252] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_252] at java.net.Socket.connect(Socket.java:607) ~[na:1.8.0_252] at java.net.Socket.connect(Socket.java:556) ~[na:1.8.0_252] at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.
(HttpClient.java:242) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.New(HttpClient.java:339) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.New(HttpClient.java:357) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) ~[na:1.8.0_252] at java.net.URL.openStream(URL.java:1068) ~[na:1.8.0_252] at org.transitclock.feed.gtfsRt.GtfsRtVehiclePositionsReaderBase.process(GtfsRtVehiclePositionsReaderBase.java:252) ~[Core.jar:na] at org.transitclock.feed.gtfsRt.GtfsRtVehiclePositionsReader.getAvlReports(GtfsRtVehiclePositionsReader.java:71) [Core.jar:na] at org.transitclock.avl.GtfsRealtimeModule.getAndProcessData(GtfsRealtimeModule.java:88) [Core.jar:na] at org.transitclock.avl.PollUrlAvlModule.run(PollUrlAvlModule.java:249) [Core.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_252] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_252] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_252] at org.transitclock.utils.threading.NamedThread.run(NamedThread.java:100) [Core.jar:na] This error has been constant when I try to run the code. I've changed the link to get the data from traccar, checked that the passwords are right but it hasn't worked
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/TheTransitClock/transitime/issues/202#issuecomment-659386328, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPHVTXX7JUWN3G4VQFLPRDR33YZRANCNFSM4O2SQFJQ .
Hi,
Tracacr is running on localhost:8082 and the MPK branch.
Can I see your transitclock.properties file?
`transitclock.autoBlockAssigner.autoAssignerEnabled=true transitclock.autoBlockAssigner.ignoreAvlAssignments=true transitclock.autoBlockAssigner.allowableEarlySeconds=600 transitclock.autoBlockAssigner.allowableLateSeconds=600
transitclock.avl.feedTimeoutInMSecs=30000 transitclock.avl.gtfsRealtimeFeedURI=http://localhost:8082/api/devices transitclock.avl.maxSpeed=50 transitclock.avl.numThreads=1 transitclock.avl.queueSize=2400 transitclock.avl.minLongitude=-65.200 transitclock.avl.maxLongitude=-67.700 transitclock.avl.minLatitude=17.200 transitclock.avl.maxLatitude=19.500
transitclock.blockLoading.agressive=false
transitclock.cache.core.daysPopulateHistoricalCache=0
transitclock.core.agencyId=1 transitclock.core.allowableEarlyDepartureTimeForLoggingEvent=180 transitclock.core.allowableEarlyForLayoverSeconds=1800 transitclock.core.allowableEarlySecondsForInitialMatching=1200 transitclock.core.allowableEarlyTimeForEarlyDepartureSecs=180 transitclock.core.allowableLateAtTerminalForLoggingEvent=240 transitclock.core.allowableLateDepartureTimeForLoggingEvent=360 transitclock.core.allowableLateSeconds=2700 transitclock.core.allowableNumberOfBadMatches=4 transitclock.core.afterStopDistance=50 transitclock.core.beforeStopDistance=66 transitclock.core.cache.tripDataHistoryCache=org.transitclock.core.dataCache.ehcache.scheduled.TripDataHistoryCache transitclock.core.cache.errorCacheClass=org.transitclock.core.dataCache.ehcache.KalmanErrorCache transitclock.core.cache.stopArrivalDepartureCache=org.transitclock.core.dataCache.ehcache.StopArrivalDepartureCache
transitclock.core.distanceFromLayoverForEarlyDeparture=250 transitclock.core.dwelltime.model=org.transitclock.core.predictiongenerator.scheduled.dwell.DwellAverage transitclock.core.dwelltime.headwayGeneratorClass=org.transitclock.core.headwaygenerator.LastArrivalsHeadwayGenerator transitclock.core.exclusiveBlockAssignments=true transitclock.core.fillHistoricalCaches=0 transitclock.core.layoverDistance=1000 transitclock.core.longDistanceDeadheadingSpeed=20 transitclock.core.matchHistoryMaxSize=40 transitclock.core.maxHeadingOffsetFromSegment=200 transitclock.core.maxPredictionTimeForDbSecs=1200 transitclock.core.maxPredictionsTimeSecs=1800 transitclock.core.minDistanceForDelayed=100 transitclock.core.minDistanceForNoProgress=100 transitclock.core.onlyNeedArrivalDepartures=false transitclock.core.predictionGeneratorClass=org.transitclock.core.predictiongenerator.scheduled.traveltime.kalman.KalmanPredictionGeneratorImpl transitclock.core.shortDistanceDeadheadingSpeed=10 transitclock.core.timeForDeterminingDelayedSecs=300 transitclock.core.timeForDeterminingNoProgress=360000 transitclock.core.trackHistoricalCaches=false transitclock.core.useArrivalPredictionsForNormalStops=false
transitclock.db.batchSize=4000 transitclock.db.dbName=AGENCYNAME transitclock.db.dbPassword=PGPASSWORD transitclock.db.dbUserName=postgres transitclock.db.dbHost=POSTGRES_PORT_5432_TCP_ADDR:POSTGRES_PORT_5432_TCP_PORT transitclock.db.storeDataInDatabase=true transitclock.db.dbType=postgresql
transitclock.predAccuracy.stopsPerTrip=1000 transitclock.predAccuracy.maxPredTimeMinutes=30
transitclock.prediction.data.kalman.mindays=3 transitclock.prediction.data.kalman.maxdays=5 transitclock.prediction.data.kalman.maxdaystosearch=21 transitclock.prediction.data.kalman.percentagePredictionMethodDifferencene=50 transitclock.prediction.data.kalman.tresholdForDifferenceEventLog=60000 transitclock.prediction.rls.lambda=0.9
transitclock.timeout.pollingRateSecs=60
transitclock.hibernate.configFile=/usr/local/transitclock/config/hibernate.cfg.xml transitclock.logging.dir=/usr/local/transitclock/logs transitclock.modules.optionalModulesList=org.transitclock.avl.GtfsRealtimeModule;org.transitclock.custom.traccar.TraccarAVLModule transitclock.avl.traccar.email=admin transitclock.avl.traccar.password=admin transitclock.avl.traccar.baseurl=http://localhost:8082 transitclock.web.mapTileUrl=http://tile.openstreetmap.org/{z}/{x}/{y}.png
`
Set this without the GtfsRealtimeModule.
transitclock.modules.optionalModulesList=org.transitclock.custom.traccar.TraccarAVLModule`
This setting is for GTFS realtime vehicle positions, not for Traccar.
transitclock.avl.gtfsRealtimeFeedURI=http://localhost:8082/api/devices`
When you do this can you look in avl.log to see if you are getting data.
I still can't view the program core.log gives this output
Caused by: java.net.ConnectException: Connection refused (Connection refused) at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_252] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_252] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_252] at java.net.Socket.connect(Socket.java:607) ~[na:1.8.0_252] at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.New(HttpClient.java:339) ~[na:1.8.0_252] at sun.net.www.http.HttpClient.New(HttpClient.java:357) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1340) ~[na:1.8.0_252] at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1315) ~[na:1.8.0_252] at org.glassfish.jersey.client.HttpUrlConnector$3.getOutputStream(HttpUrlConnector.java:312) ~[Core.jar:na] at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:200) ~[Core.jar:na] at org.glassfish.jersey.message.internal.CommittingOutputStream.commitStream(CommittingOutputStream.java:194) ~[Core.jar:na] at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:228) ~[Core.jar:na] at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$UnCloseableOutputStream.write(WriterInterceptorExecutor.java:299) ~[Core.jar:na] at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) ~[na:1.8.0_252] at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) ~[na:1.8.0_252] at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295) ~[na:1.8.0_252] at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) ~[na:1.8.0_252] at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) ~[na:1.8.0_252] at java.io.BufferedWriter.flush(BufferedWriter.java:254) ~[na:1.8.0_252] at org.glassfish.jersey.message.internal.ReaderWriter.writeToAsString(ReaderWriter.java:192) ~[Core.jar:na] at org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider.writeToAsString(AbstractMessageReaderWriterProvider.java:129) ~[Core.jar:na] at org.glassfish.jersey.message.internal.AbstractFormProvider.writeTo(AbstractFormProvider.java:116) ~[Core.jar:na] at org.glassfish.jersey.message.internal.FormProvider.writeTo(FormProvider.java:111) ~[Core.jar:na] at org.glassfish.jersey.message.internal.FormProvider.writeTo(FormProvider.java:65) ~[Core.jar:na] at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265) ~[Core.jar:na] at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) ~[Core.jar:na] at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) ~[Core.jar:na] at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154) ~[Core.jar:na] at org.glassfish.jersey.client.ClientRequest.writeEntity(ClientRequest.java:503) ~[Core.jar:na] at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:315) ~[Core.jar:na] at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:227) ~[Core.jar:na] ... 20 common frames omitted Setting up AbstractServer for RMI using secondary port=2098 Setting up AbstractServer for RMI using secondary port=2098 Setting up AbstractServer for RMI using secondary port=2098 Setting up AbstractServer for RMI using secondary port=2098 Setting up AbstractServer for RMI using secondary port=2098 Setting up AbstractServer for RMI using secondary port=2098 Setting up AbstractServer for RMI using secondary port=2098 Setting up AbstractServer for RMI using secondary port=2098 WebLoggingFilter init ApiLoggingFilter init
On the bright side avl appears to be reading the data
processed 0 reports for feed http://localhost:8082/api/devices reading http://localhost:8082/api/devices read complete processed 0 reports for feed http://localhost:8082/api/devices
I found out what I had wrong. When I used localhost it didn't read the vehicles. But I used ngrok to redirect the localhost and it started working. Thank You
When trying to update GTFS, I'm trying to access the data from traccar client which is running and with vehicles. But Transit clock starts running but doesn't show any vehicles.