MySQL won't connect on Centos 7

shawn8088 years ago

Here is my current config file.

<entry key="config.default">./conf/default.xml</entry>

<entry key='database.driver'>com.mysql.jdbc.Driver</entry> 
<entry key='database.url'>jdbc:mysql://localhost:3306/atozws_track?allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>atozws_track</entry> 
<entry key='database.password'>track</entry>

i am running centos 7 on a vps.however getting the mysql has been tricky. it still won't connect. any help?

Anton Tananaev8 years ago

What's the error message?

shawn8088 years ago

the tables are not created. right now i have opened port 3306 and disabled firewall but still nothing. here is the last log i have:

2017-03-14 00:03:52  INFO: [6C48FD86] connected
2017-03-14 00:03:52  INFO: [6C48FD86] disconnected
Anton Tananaev8 years ago

You are looking at the wrong log file.

shawn8088 years ago

In the root folder inside opt. Where are the log files ?

Anton Tananaev8 years ago

You should be looking at the wrapper log file.

shawn8088 years ago

this is my log

FINEST|3393/0|Service traccar|17-03-13 02:28:57|[qtp22782282-5942] WARN org.eclipse.jetty.http.HttpParser - Illegal character 0x16 in state=START for buffer HeapByteBuffer@1731a7a[p=1,l=155,c=16384,r=154]={\x16<<<\x03\x01\x00\x96\x01\x00\x00\x92\x03\x03\x12\xF9\xDd\xD7\x8e\xEc\x9d...\x01\x04\x03\x05\x03\x06\x03\x02\x03\x05\x02\x04\x02\x02\x02>>>ptjs23owub8\r\nPrag...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
FINEST|3393/0|Service traccar|17-03-13 02:28:57|[qtp22782282-5942] WARN org.eclipse.jetty.http.HttpParser - badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@14c824c{r=0,c=false,a=IDLE,uri=}
FINEST|3393/0|Service traccar|17-03-13 02:34:09|[qtp22782282-6688] WARN org.eclipse.jetty.http.HttpParser - Illegal character 0x16 in state=START for buffer HeapByteBuffer@18fdcec[p=1,l=155,c=16384,r=154]={\x16<<<\x03\x01\x00\x96\x01\x00\x00\x92\x03\x03\x13\xDf&u)\xDe\n...\x01\x04\x03\x05\x03\x06\x03\x02\x03\x05\x02\x04\x02\x02\x02>>>lptjs23owub8\r\nCon...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
FINEST|3393/0|Service traccar|17-03-13 02:34:09|[qtp22782282-6688] WARN org.eclipse.jetty.http.HttpParser - badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@1f8e412{r=0,c=false,a=IDLE,uri=}
FINEST|3393/0|Service traccar|17-03-13 02:34:15|[qtp22782282-6688] WARN org.eclipse.jetty.http.HttpParser - Illegal character 0x16 in state=START for buffer HeapByteBuffer@18fdcec[p=1,l=155,c=16384,r=154]={\x16<<<\x03\x01\x00\x96\x01\x00\x00\x92\x03\x03K\xAf!C\x01\xBaN...\x01\x04\x03\x05\x03\x06\x03\x02\x03\x05\x02\x04\x02\x02\x02>>>lptjs23owub8\r\nCon...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
FINEST|3393/0|Service traccar|17-03-13 02:34:15|[qtp22782282-6688] WARN org.eclipse.jetty.http.HttpParser - badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@1c77ab5{r=0,c=false,a=IDLE,uri=}
FINEST|3393/0|Service traccar|17-03-13 02:34:15|[qtp22782282-6688] WARN org.eclipse.jetty.http.HttpParser - Illegal character 0x16 in state=START for buffer HeapByteBuffer@90a089[p=1,l=155,c=16384,r=154]={\x16<<<\x03\x01\x00\x96\x01\x00\x00\x92\x03\x03\x86\xD7\xBc\x87\xE8\xA8\x83...\x01\x04\x03\x05\x03\x06\x03\x02\x03\x05\x02\x04\x02\x02\x02>>>1nwy7omzyxep\r\nPra...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}
FINEST|3393/0|Service traccar|17-03-13 02:34:15|[qtp22782282-6688] WARN org.eclipse.jetty.http.HttpParser - badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@c5ee29{r=0,c=false,a=IDLE,uri=}
Anton Tananaev8 years ago

If you don't want to provide full log file, you should find a relevant fragment.

shawn8088 years ago

that is the full log. see nothing else honestly

Anton Tananaev8 years ago

Have you restarted the service after changing the config to MySQL?

shawn8088 years ago

yes! many times

Anton Tananaev8 years ago

If you did, there should be more info in the log.

shawn8088 years ago

here is the previous one

FINEST|3393/0|Service traccar|17-03-06 01:50:08|[qtp22782282-496] WARN org.eclipse.jetty.servlet.ServletHandler - /api/socket
FINEST|3393/0|Service traccar|17-03-06 01:50:08|java.lang.NullPointerException
FINEST|3393/0|Service traccar|17-03-06 01:50:08|	at org.traccar.api.AsyncSocketServlet$1.createWebSocket(AsyncSocketServlet.java:37)
...
Anton Tananaev8 years ago

Still nothing in the log, which means that either you don't restart the server, or you are looking at the wrong file.

shawn8088 years ago

when i made changes to config file i just ran this on terminal " sudo /opt/traccar/bin/startDaemon.sh"
is this how to restart?