[OSM-dev] OSMOSIS Mysql-export error: Unable to move to next record

Brett Henderson brett at bretth.com
Thu Jan 8 10:44:36 GMT 2009


The following message indicates some form of connectivity problem with 
the server.

java.io.EOFException: Can not read response from server. Expected to read 4
bytes, read 2 bytes before connection was unexpectedly lost.

The fact that it read 2 bytes instead of 0 bytes is slightly unusual, 
most examples of this type of error on google show 0 bytes read.  
Regardless, are you sure the connection details are correct?  And are 
you sure the database is accessible?  Are you able login using the mysql 
command line tool?  I assume you've set the database, user and password 
options correctly (ie. they're not set to "xxx" like in your example).  
The error is originating within the mysql jdbc driver so it is unlikely 
to be a problem with osmosis itself.


Stefan Krampe wrote:
> Hi, 
>
> I'm a new member here. Hello to everybody! My problem:
> I have set up a local OSM-server with a MySql-Database and imported an
> OSM-file (germany) by using OSMOSIS without any problems. After editing the
> local OSM-Data (JOSM) I wanted to export the modified data. But I have
> received an error:  
>
> "Thread for task 1-read-mysql failed
> com.bretth.osmosis.core.OsmosisRuntimeException: Unable to move to next
> record."
>
> Has anyone seen this error?
>
> Thanks for any help!
>
> Stefan 
>
>
> osmosis --read-mysql  database="xxx" user="xxx" password="xxx"
> validateSchemaVersion=no --bb co left=7.9 right=9.62 top=50.7  bottom=49.45
> --wx Test.osm
>
>
> 07.01.2009 22:09:54 com.bretth.osmosis.core.Osmosis main
> INFO: Osmosis Version 0.29
> 07.01.2009 22:09:54 com.bretth.osmosis.core.Osmosis main
> INFO: Preparing pipeline.
> 07.01.2009 22:09:54 com.bretth.osmosis.core.Osmosis main
> INFO: Launching pipeline execution.
> 07.01.2009 22:09:54 com.bretth.osmosis.core.Osmosis main
> INFO: Pipeline executing, waiting for completion.
> 08.01.2009 06:09:54
> com.bretth.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
> SCHWERWIEGEND: Thread for task 1-read-mysql failed
> com.bretth.osmosis.core.OsmosisRuntimeException: Unable to move to next
> record.
>         at
> com.bretth.osmosis.core.mysql.common.BaseTableReader.readNextValue(BaseTable
> Reader.java:100)
>         at
> com.bretth.osmosis.core.mysql.common.BaseTableReader.next(BaseTableReader.ja
> va:129)
>         at
> com.bretth.osmosis.core.store.PeekableIterator.peekNext(PeekableIterator.jav
> a:53)
>         at
> com.bretth.osmosis.core.mysql.v0_5.impl.EntitySnapshotReader.hasNext(EntityS
> napshotReader.java:70)
>         at
> com.bretth.osmosis.core.mysql.v0_5.MysqlReader.processNodes(MysqlReader.java
> :88)
>         at
> com.bretth.osmosis.core.mysql.v0_5.MysqlReader.run(MysqlReader.java:158)
>         at java.lang.Thread.run(Thread.java:636)
> Caused by: com.mysql.jdbc.CommunicationsException: Communications link
> failure due to underlying exception:
>
> ** BEGIN NESTED EXCEPTION **
>
> java.io.EOFException
> MESSAGE: Can not read response from server. Expected to read 4 bytes, read 2
> bytes before connection was unexpectedly lost.
>
> STACKTRACE:
>
> java.io.EOFException: Can not read response from server. Expected to read 4
> bytes, read 2 bytes before connection was unexpectedly lost.
>         at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1997)
>         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2411)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2916)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
>         at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1360)
>         at com.mysql.jdbc.RowDataDynamic.nextRecord(RowDataDynamic.java:366)
>         at com.mysql.jdbc.RowDataDynamic.next(RowDataDynamic.java:355)
>         at com.mysql.jdbc.ResultSet.next(ResultSet.java:7302)
>         at
> com.bretth.osmosis.core.mysql.common.BaseTableReader.readNextValue(BaseTable
> Reader.java:89)
>         at
> com.bretth.osmosis.core.mysql.common.BaseTableReader.next(BaseTableReader.ja
> va:129)
>         at
> com.bretth.osmosis.core.store.PeekableIterator.peekNext(PeekableIterator.jav
> a:53)
>         at
> com.bretth.osmosis.core.mysql.v0_5.impl.EntitySnapshotReader.hasNext(EntityS
> napshotReader.java:70)
>         at
> com.bretth.osmosis.core.mysql.v0_5.MysqlReader.processNodes(MysqlReader.java
> :88)
>         at
> com.bretth.osmosis.core.mysql.v0_5.MysqlReader.run(MysqlReader.java:1
>         at java.lang.Thread.run(Thread.java:636)
>
>
> ** END NESTED EXCEPTION **
>
>
>
> Last packet sent to the server was 28799850 ms ago.
>         at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2622)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2916)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
>         at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1360)
>         at com.mysql.jdbc.RowDataDynamic.nextRecord(RowDataDynamic.java:366)
>         at com.mysql.jdbc.RowDataDynamic.next(RowDataDynamic.java:355)
>         at com.mysql.jdbc.ResultSet.next(ResultSet.java:7302)
>         at
> com.bretth.osmosis.core.mysql.common.BaseTableReader.readNextValue(Ba
>         ... 6 more
> 08.01.2009 06:09:54 com.bretth.osmosis.core.Osmosis main
> SCHWERWIEGEND: Execution aborted.
> com.bretth.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
>         at
> com.bretth.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pi
>         at com.bretth.osmosis.core.Osmosis.main(Osmosis.java:55)
>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>   





More information about the dev mailing list