ma1uta / ma1sd

Federated Matrix Identity Server (formerly fork of kamax/mxisd)
GNU Affero General Public License v3.0
166 stars 55 forks source link

Failed to load native library:sqlite-3.34.0 #120

Open RoninAngle1 opened 1 year ago

RoninAngle1 commented 1 year ago

Hi I have configured my server for identity service with this config: my config:

matrix:
  domain: 'XXX'
  v1: true 
  v2: true   
key:
  path: '/var/lib/ma1sd/keys'

storage:
  enabled: true
  provider:
    sqlite:
      database: '/var/lib/matrix-synapse/homeserver.db'

sql:
  enabled: true
  type: sqlite
  connection: '/var/lib/matrix-synapse/homeserver.db'

synapseSql:
  enabled: true
  type: sqlite
  connection: '/var/lib/matrix-synapse/homeserver.db'

threepid:
  medium:
    email:
      domain:
          whitelist:
            - '*XXX'
      identity:
        from: 'XXX'
      connectors:
        smtp:
          host: 'XXX'
          tls: 0
          port: 25

ldap:
  enabled: true
  lookup: true # hash lookup
  activeDirectory: true
  mode: "search"
  defaultDomain: 'XXX'
  connection:
    host: 'XXX'
    port: 389
    bindDn: 'XXX'
    bindPassword: 'XXX'
    baseDNs:
      - 'OU=XXX,DC=XXX,DC=XXX'
  attribute:
    mail: "email"
    name: "DisplayName"

config:
  policy:
    registration:
      username:
        enforceLowercase: false

logging:
  root: info    
  app: info       
  requests: true

but I get this error on my server:

main] INFO io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage - Create the dao: ChangelogDao
Failed to load native library:sqlite-3.34.0-046f38b5-99ee-4be2-a906-58a1fa803def-libsqlitejdbc.so. osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.34.0-046f38b5-99ee-4be2-a906-58a1fa803def-libsqlitejdbc.so: /tmp/sqlite-3.34.0-046f38b5-99ee-4be2-a906-58a1fa803def-libsqlitejdbc.so: failed to map segment from shared object
java.lang.RuntimeException: java.sql.SQLException: Error opening connection
        at io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage.withCatcher(OrmLiteSqlStorage.java:264)
        at io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage.<init>(OrmLiteSqlStorage.java:110)
        at io.kamax.mxisd.Mxisd.build(Mxisd.java:115)
        at io.kamax.mxisd.Mxisd.start(Mxisd.java:218)
        at io.kamax.mxisd.HttpMxisd.start(HttpMxisd.java:103)
        at io.kamax.mxisd.MxisdStandaloneExec.main(MxisdStandaloneExec.java:109)
Caused by: java.sql.SQLException: Error opening connection
        at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:239)
        at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:61)
        at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:28)
        at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:21)
        at org.sqlite.JDBC.createConnection(JDBC.java:115)
        at org.sqlite.JDBC.connect(JDBC.java:90)
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
        at com.j256.ormlite.jdbc.JdbcConnectionSource.makeConnection(JdbcConnectionSource.java:266)
        at com.j256.ormlite.jdbc.JdbcConnectionSource.getReadWriteConnection(JdbcConnectionSource.java:187)
        at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:365)
        at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:352)
        at com.j256.ormlite.table.TableUtils.createTableIfNotExists(TableUtils.java:75)
        at io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage.createDaoAndTable(OrmLiteSqlStorage.java:247)
        at io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage.createDaoAndTable(OrmLiteSqlStorage.java:228)
        at io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage.lambda$new$0(OrmLiteSqlStorage.java:123)
        at io.kamax.mxisd.storage.ormlite.OrmLiteSqlStorage.withCatcher(OrmLiteSqlStorage.java:262)
        ... 5 more
Caused by: java.lang.Exception: No native library found for os.name=Linux, os.arch=x86_64, paths=[/org/sqlite/native/Linux/x86_64:/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
        at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:367)
        at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:67)
        at org.sqlite.core.NativeDB.load(NativeDB.java:63)
        at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:235)
        ... 21 more
[Thread-0] INFO App - ma1sd stopped

could you please help me fix it?

OS: UBUTNU 20.04 LTS Server