TheTransitClock / transitclockDocker

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

No such container: transitclock-server-instance #6

Closed wowkin2 closed 6 years ago

wowkin2 commented 6 years ago

Got following errors after installation:

Error response from daemon: No such container: transitclock-server-instance
...
docker: Error response from daemon: driver failed programming external connectivity on endpoint transitclock-db (5a1dab74482f7cd6a89957c0eacf0d487545c4a0dfbd736aafbd209fd0298f93): Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use.
docker: Error response from daemon: Cannot link to a non running container: /transitclock-db AS /transitclock-server-instance/postgres.

Installed using following commands:

sudo apt-get install git
git clone https://github.com/scrudden/transitime-docker.git
curl -sSL https://get.docker.com/ | sh
# changed GTFS_URL
# changed GTFSRTVEHICLEPOSITIONS
# changed AGENCYNAME
sudo ./go.sh

But looks like there is some problem with Postresql setup not commands.

scrudden commented 6 years ago

Hi,

Is port 5432 already being used on your host machine?

listen tcp 0.0.0.0:5432: bind: address already in use

I would also suggest trying the MBTA_trial branch as that is the one I have been using most recently.

Cheers,

Sean.

wowkin2 commented 6 years ago

@scrudden you were right, I had Postgres running on my machine, stopped it. But it still doesn't work. docker-machine ls doesn't show any VM running. Used MBTA_trial branch.

Just to double check, all URLs should be updated in go.sh or somewhere in xml files too?

I would be very grateful if you can make fork for me with working version or even test it with my URLs, can I send them via email?

Here are some logs from script if it can be useful:

Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheManager getInstance
INFO: Instance is null, creating with config [/cache.ccf]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheManager configure
INFO: Creating cache manager from config file: /cache.ccf
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.utils.threadpool.ThreadPoolManager loadConfig
INFO: thread_pool.default PoolConfiguration = useBoundary = [false] boundarySize = [2000] maximumPoolSize = [150] minimumPoolSize = [4] keepAliveTime = [300000] whenBlockedPolicy = [RUN] startUpSize = [4]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheManager doConfigure
INFO: Setting default auxiliaries to DC
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheManager doConfigure
INFO: setting defaultCompositeCacheAttributes to [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 0, maxSpoolPerRun = -1, diskUsagePattern = UPDATE, spoolChunkSize = 2 ]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheConfigurator parseElementAttributes
INFO: No special ElementAttribute class defined for key [jcs.default.elementattributes], using default class.
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheManager doConfigure
INFO: setting defaultElementAttributes to [ IS_LATERAL = true, IS_SPOOL = true, IS_REMOTE = true, IS_ETERNAL = true, MaxLifeSeconds = -1, IdleTime = -1, CreateTime = 1531902554352, LastAccessTime = 1531902554352, getTimeToLiveSeconds() = -1, createTime = 1531902554352 ]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheConfigurator parseElementAttributes
INFO: No special ElementAttribute class defined for key [jcs.region.myRegion1.elementattributes], using default class.
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache initialize
INFO: initialized MemoryCache for myRegion1
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCache <init>
INFO: Constructed cache with name [myRegion1] and cache attributes [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 0, maxSpoolPerRun = -1, diskUsagePattern = UPDATE, spoolChunkSize = 2 ]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.AuxiliaryCacheConfigurator parseCacheEventLogger
INFO: No cache event logger defined for auxiliary [jcs.auxiliary.DC]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.AuxiliaryCacheConfigurator parseElementSerializer
INFO: Using standard serializer [org.apache.commons.jcs.utils.serialization.StandardSerializer@4650a407] for auxiliary [jcs.auxiliary.DC]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache initializeFileSystem
INFO: Region [myRegion1] Cache file root directory: /root/jcs_swap
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache initializeKeyMap
INFO: Region [myRegion1] Set maxKeySize to: '10000'
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache <init>
INFO: Region [myRegion1] Indexed Disk Cache is alive.
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheConfigurator parseRegions
INFO: Parsed regions [myRegion1]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheManager doConfigure
INFO: Finished configuration in 68 ms.
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCacheConfigurator parseElementAttributes
INFO: No special ElementAttribute class defined for key [jcs.region.TripDataHistoryCache.elementattributes], using default class.
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.memory.AbstractDoubleLinkedListMemoryCache initialize
INFO: initialized MemoryCache for TripDataHistoryCache
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.engine.control.CompositeCache <init>
INFO: Constructed cache with name [TripDataHistoryCache] and cache attributes [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 0, maxSpoolPerRun = -1, diskUsagePattern = UPDATE, spoolChunkSize = 2 ]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.AuxiliaryCacheConfigurator parseCacheEventLogger
INFO: No cache event logger defined for auxiliary [jcs.auxiliary.DC]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.AuxiliaryCacheConfigurator parseElementSerializer
INFO: Using standard serializer [org.apache.commons.jcs.utils.serialization.StandardSerializer@5467eea4] for auxiliary [jcs.auxiliary.DC]
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache initializeFileSystem
INFO: Region [TripDataHistoryCache] Cache file root directory: /root/jcs_swap
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache initializeKeyMap
INFO: Region [TripDataHistoryCache] Set maxKeySize to: '10000'
Jul 18, 2018 3:29:14 AM org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache <init>
INFO: Region [TripDataHistoryCache] Indexed Disk Cache is alive.
Jul 18, 2018 11:29:14 AM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@e783fd42 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@31cfba5e [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1bqq1hf9w1bv4ni813hpbwo|4cbf4f53, idleConnectionTestPeriod -> 0, initialPoolSize -> 2, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 300, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 50, maxStatementsPerConnection -> 0, minPoolSize -> 2, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@10f2e4d6 [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> ***************, jdbcUrl -> jdbc:postgresql://172.17.0.2:5432/TEST?connectTimeout=60&socketTimeout=60, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, factoryClassLocation -> null, identityToken -> 1bqq1hf9w1bv4ni813hpbwo|15dd5ac2, numHelperThreads -> 3 ]
wowkin2 commented 6 years ago

It works now with the same branch, maybe there is some delay to start all apps. But there are other issues that I'll post as separate GitHub issue.

wowkin2 commented 6 years ago

BTW, how to stop that server?

scrudden commented 6 years ago

You can stop the docker containers by

docker stop transitclock-service-instance
docker stop transitclock-db
wowkin2 commented 6 years ago

Thanks, propose to add it to README.md too