Traccar sever on CentOS, Amazon AWS

sbandaru9 years ago

Hi

I have successfully followed the tutorial at
https://www.traccar.org/forums/topic/how-to-install-traccar-server-on-aws-amazon-step-by-step-tutorial/
and I came to the point of starting the server. The server starts but I cannot get to the web page even when I open up all the ports in the security settings.

What is missing.

Regards,
Shankar.

Anton Tananaev9 years ago

Are you sure Traccar server is running? Check the port locally first. If it is, then there must be some firewall issue.

dsmith9 years ago

What specific URL are you using to access the app/web page?

sbandaru9 years ago

Yes traccar is running, here is the output from the console

Using username "root".
Authenticating with public key "imported-openssh-key"
Last login: Fri Feb 19 04:27:01 2016 from 103.19.100.10
[root@ip-172-31-27-143 ~]# sudo ./traccar.run
sudo: ./traccar.run: command not found
[root@ip-172-31-27-143 ~]# sudo /opt/traccar/bin/traccar start
Starting traccar...
traccar is already running.
[root@ip-172-31-27-143 ~]#

Firewall settings on AWS:

All traffic All All 0.0.0.0/0
SSH TCP 22 0.0.0.0/0
Custom UDP Rule UDP 8082 0.0.0.0/0
Custom TCP Rule TCP 8082 0.0.0.0/0
Custom TCP Rule TCP 5055 0.0.0.0/0

My public IP is 54.88.41.43, the URL is http://54.88.41.43:8082/

Traccar.xml:

<!-- SERVER CONFIG -->

<entry key='web.enable'>true</entry>
<entry key='web.port'>8082</entry>
<entry key='web.path'>/opt/traccar/web</entry>

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>google</entry>

<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
<entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry>

Please let me know if anything is missing.

Thanks,
Shankar.

Anton Tananaev9 years ago

The port appears to be closed, so we must be missing something. Are you sure ports are not blocked by server's own firewall?

sbandaru9 years ago

Hi Anton,

Any specific command I can use to check for the ports. I am new to Linux environment. I did google and ran this command netstat -l | grep 8082, which doesn't come up with any results. This tells me that it isn't listening.

There isn't any error log showing about the firewall issue.

I don't think we would have any firewalls to the AWS instance itself, anyway I will reconfirm it later.

Thanks,
Shankar.

Anton Tananaev9 years ago

It means nothing is listening on the port. Check Traccar logs (mostly wrapper.log) for any errors.

sbandaru9 years ago

Hi Anton,

Thanks for quick responses, really appreciate it. Here is my wrapper log, can you see any error here. I have a warn message highlighted in block quotes.

STATUS | wrapper  | 2016/02/21 21:53:27 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2016/02/21 21:53:27 | Java Service Wrapper Community Edition 64-bit 3.5.27
STATUS | wrapper  | 2016/02/21 21:53:27 |   Copyright (C) 1999-2015 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2016/02/21 21:53:27 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2016/02/21 21:53:27 | 
STATUS | wrapper  | 2016/02/21 21:53:27 | Launching a JVM...
INFO   | jvm 1    | 2016/02/21 21:53:27 | WrapperManager: Initializing...
INFO   | jvm 1    | 2016/02/21 21:53:28 | [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
INFO   | jvm 1    | 2016/02/21 21:53:28 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
INFO   | jvm 1    | 2016/02/21 21:53:31 | INFO 2/21/16 9:53 PM: liquibase: Successfully acquired change log lock
INFO   | jvm 1    | 2016/02/21 21:53:35 | INFO 2/21/16 9:53 PM: liquibase: Reading from PUBLIC.DATABASECHANGELOG
INFO   | jvm 1    | 2016/02/21 21:53:36 | INFO 2/21/16 9:53 PM: liquibase: Successfully released change log lock
INFO   | jvm 1    | 2016/02/21 21:53:36 | [WrapperSimpleAppMain] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1br9uvj9f1m5ybdijy580|57ae046b, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.h2.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1br9uvj9f1m5ybdijy580|57ae046b, idleConnectionTestPeriod -> 600, initialPoolSize -> 3, jdbcUrl -> jdbc:h2:/opt/traccar/data/database, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
INFO   | jvm 1    | 2016/02/21 21:53:36 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.util.log - Logging initialized @8957ms
INFO   | jvm 1    | 2016/02/21 21:53:37 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.Server - jetty-9.2.14.v20151106
INFO   | jvm 1    | 2016/02/21 21:53:39 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@749b670c{/api,null,AVAILABLE}
INFO   | jvm 1    | 2016/02/21 21:53:39 | [WrapperSimpleAppMain] WARN org.eclipse.jetty.server.handler.AbstractHandler - No Server set for org.traccar.web.WebServer$1@68a80a3
INFO   | jvm 1    | 2016/02/21 21:53:39 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@33c202{HTTP/1.1}{0.0.0.0:8082}
INFO   | jvm 1    | 2016/02/21 21:53:39 | [WrapperSimpleAppMain] INFO org.eclipse.jetty.server.Server - Started @11884ms

Thanks,
Shankar

Anton Tananaev9 years ago

That's normal. I have same warning in my log. Your log looks fine. Not sure why "netstat -l | grep 8082" doesn't work.

charlymanja9 years ago

Hi, your ports are filtered by a firewall, maybe you have well configured your server, but not your router firewall, some server providers don't keep open all tcp ports, you have to contact to your provider to request to open the traccar web port and protocol listeners

nmap 54.88.41.43 -Pn -p 8082

Starting Nmap 6.40 ( http://nmap.org ) at 2016-02-25 12:14 CST
Nmap scan report for ec2-54-88-41-43.compute-1.amazonaws.com (54.88.41.43)
Host is up (0.083s latency).
PORT STATE SERVICE
8082/tcp filtered blackice-alerts

=====================

nmap 54.88.41.43 -Pn -p 5001-5100

Starting Nmap 6.40 ( http://nmap.org ) at 2016-02-25 12:17 CST
Nmap scan report for ec2-54-88-41-43.compute-1.amazonaws.com (54.88.41.43)
Host is up (0.10s latency).
All 100 scanned ports on ec2-54-88-41-43.compute-1.amazonaws.com (54.88.41.43) are filtered

Nmap done: 1 IP address (1 host up) scanned in 12.27 seconds

Best regards