Comments (5)
After running my docker compose, the container keeps restarting. Here is my docker-compose file.
Am i doing something incorrect. Please advice.version: '3' services: traccar: image: "traccar/traccar:latest" restart: always entrypoint: - java - -Xms2g - -Xmx2g - -Djava.net.preferIPv4Stack=true ports: - "5000-5150:5000-5150" - "5000-5150:5000-5150/udp" - "8082:8082" volumes: - "/data/traccar/logs:/opt/traccar/logs:rw" - "/data/traccar/data:/opt/traccar/data:rw" - "/root/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro" - "/etc/localtime:/etc/localtime:ro" - "/etc/timezone:/etc/timezone:ro" ulimits: nproc: 65535 nofile: soft: 50000 hard: 50000
In Docker, when you run container with custom ENTRYPOINT, original CMD in image are removed. See docker inspect traccar
after create container.
If you need to change ENTRYPOINT for container in docker-compose, use:
...
entrypoint:
- java
- -Xms2g
- -Xmx2g
- -Djava.net.preferIPv4Stack=true
command:
- -jar
- tracker-server.jar
- conf/traccar.xml
...
or, set start service from entrypoint only
...
entrypoint:
- java
- -Xms2g
- -Xmx2g
- -Djava.net.preferIPv4Stack=true
- -jar
- tracker-server.jar
- conf/traccar.xml
...
For run docker container in raw command:
docker run ... --entrypoint java traccar/traccar:4.1 -Xms2g -Xmx2g -Djava.net.preferIPv4Stack=true -jar tracker-server.jar conf/traccar.xml
This is feature/bug of using java with options in docker and i will be search the best realization of this.
from traccar-docker.
not sure if its related. I'm having the same issue when try to use mysqldb and result in this error.
Exception in thread "main" java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1,
at org.traccar.Main.run(Main.java:152),
at org.traccar.Main.main(Main.java:104),
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1,
at liquibase.datatype.DataTypeFactory.fromDescription(DataTypeFactory.java:251),
at liquibase.change.core.CreateTableChange.generateStatements(CreateTableChange.java:70),
at liquibase.change.AbstractChange.generateStatementsVolatile(AbstractChange.java:287),
at liquibase.change.AbstractChange.warn(AbstractChange.java:358),
at liquibase.changelog.visitor.ValidatingVisitor.visit(ValidatingVisitor.java:109),
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:78),
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:269),
at liquibase.Liquibase.update(Liquibase.java:198),
at liquibase.Liquibase.update(Liquibase.java:179),
at liquibase.Liquibase.update(Liquibase.java:175),
at org.traccar.database.DataManager.initDatabaseSchema(DataManager.java:306),
at org.traccar.database.DataManager.<init>(DataManager.java:91),
at org.traccar.Context.init(Context.java:382),
at org.traccar.Main.run(Main.java:110),
... 1 more,
https://www.traccar.org/forums/topic/another-40-greater41-problem/ has more detail.
in the meantime, use default h2db or use version 4 instead.
from traccar-docker.
I must have mentioned a few more details.
Environment
Type: VM
Virtualization: microsoft
Operating System: Ubuntu 16.04.3 LTS
Kernel: Linux 4.15.0-1025-azure
Architecture: x86-64
CPU. 8 cores. Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
RAM. 28 GB
- Issue is with setting jvm to a higher value (eg. Xms2g Xmx2g).
- If i run with its default jvm settings (Xms512m ,Xmx512m.), then it works perfectly for a while untill the memory fills up.
- I am using its default database h2db.
- Now i've rolled back to an old version but still this new version doesnt work.
from traccar-docker.
This was good. It works now without restarting. I will keep monitoring and get back here for confirmation.
However, the logs aren't being produced. If i run command
"docker-compose logs -f" it returns "Error grabbing logs: EOF"... any ideas please?
from traccar-docker.
This was good. It works now without restarting. I will keep monitoring and get back here for confirmation.
However, the logs aren't being produced. If i run command
"docker-compose logs -f" it returns "Error grabbing logs: EOF"... any ideas please?
For "Error grabbing logs: EOF" can may be many reasons. By closed issue i recommend update docker and docker-compose on latest versions. What versions now?
May be you change log-driver in /etc/docker/daemon.json and docker-compose have not access on this log storage?
from traccar-docker.
Related Issues (20)
- WebUI shows 404 - Not found HOT 3
- Docker-compose support HOT 17
- can't connect to mysql/postgres HOT 3
- Docker-compose path/fiile problem. "Are you trying to mount a directory onto a file?" HOT 3
- MySQL DB is locked HOT 1
- Docker Hub alternative HOT 4
- Cant get traccar.xml HOT 2
- Docker - No Matching Manifest HOT 4
- version 5.8 HOT 1
- MariaDB 11.0.2 connection error - Got an error reading communication packets HOT 3
- Container keeps restarting and udp port not working HOT 1
- Container with the preview version to solve the MariaDB 11 problem HOT 3
- Can't pull image on Raspberry Pi - archive/tar: invalid tar header.
- Update Docker image to OpenJDK 17 HOT 2
- Update to 5.0 HOT 18
- With v5.0: java.util.zip.ZipException: invalid entry CRC HOT 1
- Document logger.console configuration option HOT 1
- How to increase java RAM limit in existing Traccar docker container HOT 2
- Support for environment variables and files HOT 5
- change Java heap size HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traccar-docker.