manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Furkan KAMACI <furkankam...@gmail.com>
Subject Re: ManifoldCF Docker MySQL Connection Error
Date Sat, 24 Nov 2018 12:52:42 GMT
Hi Karl,

Same config with same MySQL version in non-docker environment works. I can
successfully connect to mysql docker via:

    mysql -h 172.17.0.2 -u root -p

Here is my config for MySQL:

  <property name="org.apache.manifoldcf.database.name" value="amarok"/>
  <property name="org.apache.manifoldcf.connectors" value="DEBUG"/>
  <property name="org.apache.manifoldcf.databaseimplementationclass"
value="org.apache.manifoldcf.core.database.DBInterfaceMySQL"/>
  <property name="org.apache.manifoldcf.mysql.hostname" value="172.17.0.4"/>
  <property name="org.apache.manifoldcf.mysql.port" value="3306"/>
  <property name="org.apache.manifoldcf.dbsuperusername" value="root"/>
  <property name="org.apache.manifoldcf.dbsuperuserpassword"
value="mypass"/>

I've put some logging into ConnectionFactory and this is what I get:

------
Database: mysql
jdbcDriver: com.mysql.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost/mysql?useUnicode=true&characterEncoding=utf8
userName: root
password: mypass
------
------
Database: amarok
jdbcDriver: com.mysql.jdbc.Driver
jdbcUrl:
jdbc:mysql://localhost/amarok?useUnicode=true&characterEncoding=utf8
userName: manifoldcf
password: local_pg_passwd
------

So, it doesn't try to connect a host rather than localhost without
respecting properties.xml?

Kind Regards,
Furkan KAMACI

On Sat, Nov 24, 2018 at 3:42 PM Karl Wright <daddywri@gmail.com> wrote:

> Hi Furkan,
>
> The only thing that comes to mind is that maybe your MySQL is running on a
> different port than you expect, or that the MySQL driver you are using is
> not compatible with your setup.  Basically it is failing to create a
> connection between the driver and the database.
>
> Karl
>
>
> On Sat, Nov 24, 2018 at 7:28 AM Furkan KAMACI <furkankamaci@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I try to test ManifoldCF via docker. I've run mysql as follows:
>>
>> docker run --name custom-mysql -v
>> /home/ubuntu/mysql-conf:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=mypass -d
>> mysql:5.7.16
>>
>> I've run my docker container of ManifoldCF as follows:
>>
>> docker run --name manifoldcf --link custom-mysql:mysql -p 8345:8345 -it
>> manifoldcf:2.7.1
>>
>> However, I get:
>>
>> *org.apache.manifoldcf.core.interfaces.ManifoldCFException: Error getting
>> connection: Communications link failure*
>>
>> *The last packet sent successfully to the server was 0 milliseconds ago.
>> The driver has not received any packets from the server.*
>> * at
>> org.apache.manifoldcf.core.database.ConnectionFactory.getConnection(ConnectionFactory.java:83)*
>> * at
>> org.apache.manifoldcf.core.database.Database.executeUncachedQuery(Database.java:797)*
>> * at
>> org.apache.manifoldcf.core.database.Database$QueryCacheExecutor.create(Database.java:1457)*
>> * at
>> org.apache.manifoldcf.core.cachemanager.CacheManager.findObjectsAndExecute(CacheManager.java:146)*
>> * at
>> org.apache.manifoldcf.core.database.Database.executeQuery(Database.java:204)*
>> * at
>> org.apache.manifoldcf.core.database.DBInterfaceMySQL.performQuery(DBInterfaceMySQL.java:907)*
>> * at
>> org.apache.manifoldcf.core.database.DBInterfaceMySQL.getTableSchema(DBInterfaceMySQL.java:753)*
>> * at
>> org.apache.manifoldcf.core.database.BaseTable.getTableSchema(BaseTable.java:185)*
>> * at
>> org.apache.manifoldcf.agents.agentmanager.AgentManager.install(AgentManager.java:67)*
>> * at
>> org.apache.manifoldcf.agents.system.ManifoldCF.installTables(ManifoldCF.java:112)*
>> * at
>> org.apache.manifoldcf.jettyrunner.ManifoldCFJettyRunner.main(ManifoldCFJettyRunner.java:235)*
>> *Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
>> Communications link failure*
>>
>>
>> I can connect MySQL via command line, I can access it via another docker
>> container and I can access it if I create a project which just includes
>> ConnectionFactory.java of ManifoldCF.
>>
>> What may be the reason for this?
>>
>> Kind Regards,
>> Furkan KAMACI
>>
>

Mime
View raw message