Keep getting ´502 Bad Gateway´ when build from source using Netbeans

gpsuser7 years ago

Hi,

Im trying to build from source using Netbeans but keep getting the ´502 Bad Gateway´ message.

What I do is downloading the source code as zip to my windows machine and then unzip. Then I follow the steps on how to compile on Netbeans. Then instedt of ´run´ I pick ´build from source´ since Traccar should not run on the windows machine. When the compiling has finished I transfer the jar file back to the linux server and restart service.

Can anybody see that im doing wrong ?

All suggestions is really appreciated, thanks

Anton Tananaev7 years ago

I don't think it's an error coming from Traccar. It must be your proxy service.

gpsuser7 years ago

Hi Anton,

I have the 3.10 already running behind a proxy and works fine. I downloaded and installed.

Problem is only when I compile and upload the traccar-server.jar. I havent changed any other files.

Just wanted your latest version when the reverse ignintion on the H02 protocol. and of cause learn how to compile my own project :)

Do I need to add some paths before compiling since I compile on a different machine.

Thanks

Anton Tananaev7 years ago

No, but you might need to take new libraries as well. Possibly some other files, like database schema, config etc.

gpsuser7 years ago

When I compare the working jar fil(yours) to mine then all files seems to be there.

Does it make sence to post the log here?

gpsuser7 years ago

Anyway here it is.

INFO|wrapper|Service traccar|17-03-06 17:54:49|posix_spawn pid 9897
INFO|wrapper|Service traccar|17-03-06 17:54:49|started process 9897
INFO|wrapper|Service traccar|17-03-06 17:54:49|started process with pid 9897
INFO|9897/0|Service traccar|17-03-06 17:54:50|[INFO] StandardFileSystemManager - Using "/tmp/vfs_cache" as temporary files store.
INFO|9897/0|Service traccar|17-03-06 17:54:50|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
INFO|9897/0|Service traccar|17-03-06 17:54:51|[main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
INFO|9897/0|Service traccar|17-03-06 17:54:51|INFO 3/6/17 5:54 PM: liquibase: Clearing database change log checksums
INFO|9897/0|Service traccar|17-03-06 17:54:51|INFO 3/6/17 5:54 PM: liquibase: Successfully acquired change log lock
INFO|9897/0|Service traccar|17-03-06 17:54:51|INFO 3/6/17 5:54 PM: liquibase: Successfully released change log lock
INFO|9897/0|Service traccar|17-03-06 17:54:51|INFO 3/6/17 5:54 PM: liquibase: Successfully acquired change log lock
INFO|9897/0|Service traccar|17-03-06 17:54:52|INFO 3/6/17 5:54 PM: liquibase: Reading from gpstrack.DATABASECHANGELOG
INFO|9897/0|Service traccar|17-03-06 17:54:52|INFO 3/6/17 5:54 PM: liquibase: Reading from gpstrack.DATABASECHANGELOG
INFO|9897/0|Service traccar|17-03-06 17:54:52|INFO 3/6/17 5:54 PM: liquibase: ./schema/changelog-master.xml: changelog-3.8::changelog-3.8-dropuniquetoken::author: Change set changelog-3.8::changelog-3.8-dropuniquetoken::author failed, but failOnError was false.  Error: Can't DROP 'uk_user_token'; check that column/key exists [Failed SQL: ALTER TABLE gpstrack.users DROP KEY uk_user_token]
INFO|9897/0|Service traccar|17-03-06 17:54:53|INFO 3/6/17 5:54 PM: liquibase: Successfully released change log lock
INFO|9897/0|Service traccar|17-03-06 17:54:53|[main] INFO org.eclipse.jetty.util.log - Logging initialized @3165ms
INFO|9897/0|Service traccar|17-03-06 17:54:53|[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.21.v20170120
INFO|9897/0|Service traccar|17-03-06 17:54:53|[main] WARN org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED o.e.j.s.ServletContextHandler@5a75ec37{/api,null,STARTING}: java.lang.NoClassDefFoundError: com/cloudhopper/smpp/type/RecoverablePduException
INFO|9897/0|Service traccar|17-03-06 17:54:53|java.lang.NoClassDefFoundError: com/cloudhopper/smpp/type/RecoverablePduException
INFO|9897/0|Service traccar|17-03-06 17:54:53|	at java.lang.Class.getDeclaredMethods0(Native Method)
INFO|9897/0|Service traccar|17-03-06 17:54:53|	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
INFO|9897/0|Service traccar|17-03-06 17:54:53|	at java.lang.Class.getDeclaredMethods(Class.java:1975)
...
Anton Tananaev7 years ago

The error means that you are missing a library. Not sure how you compared files.

gpsuser7 years ago

hm, ok I just viewed the archives/jars using winrar.

Anton Tananaev7 years ago

So you didn't actually check what I asked you to check. Libraries are in the "lib" folder. You don't need to check the content on the JAR files themselves.

gpsuser7 years ago

Sorry didnt unterstand. im going to check the content of the lib folder tonight and let you know.

Thanks

gpsuser7 years ago

Hi Anton,

Just tested and only needed some files in the lib folder as you said. Works fantastic now :)

Thanks