2023年8月29日 / kirito / 3 Comments
- Install LibreOffice and unoserver with the following commands:
|
apt install libreoffice python3 python3-pip pip install unoserver |
- Make sure the environment is ok:
|
wget -O find_uno.py https://gist.githubusercontent.com/regebro/036da022dc7d5241a0ee97efdf1458eb/raw/find_uno.py python3 find_uno.py |
- Start unoserver and take a conversion in diffrerent command line prompt:
|
python3 -m unoserver.server |
|
python3 -m unoserver.converter --convert-to pdf my.docx my.pdf |
- If you encounter the font problem, you should add windows fonts to Linux with the following steps.
- Copy all fonts files under C:\Windows\Fonts
- Remove the .fon files
- Copy the font files to Linux and paste the files in /usr/share/fonts/win/. and you should create win directory by yourself.
- Update the font cache with the following commands in /usr/share/fonts/win/ :
|
mkfontscale mkfontdir fc-cache |
If you cannot find the commands, run
|
apt-get install xfonts-utils |
- You can also check the font status via fc-list
- Create a system service for unoserver in /etc/systemd/system/unoserver.service:
|
[Unit] Description=unoserver After=network.target [Install] WantedBy=multi-user.target [Service] Type=simple User=root Group=root ExecStart=/usr/local/bin/unoserver Environment=PYTHONUNBUFFERED=true Restart=on-failure RestartSec=3 |
You should also use systemctl daemon-reload to take effect. And if you want to make the service on startup, run systemctl enable daemon-reload
2023年8月20日 / kirito / 0 Comments
- Press Shift + F10 to enter the command prompt
- Type regedit to enter Windows Register Editor
- Go to HKEY_LOCAL_MACHINE\SYSTEM\Setup, and create “LabConfig” key
- Add three DWORD (32-bit) value, BypassTPMCheck, BypassRAMCheck, BypassSecureBootCheck and set all the value to 1.
- Closed the regedit and command prompt and enjoy Windows 11 installation.
2020年8月27日 / kirito / 1 Comment
The error log like the following below.
2020/08/26 11:12:50 – step1 – ERROR (version 9.1.0.0-206, build 9.1.0.0-206 from 2020-08-01 01.24.45 by kirito) : step1 : Unexpected error at the end of the transformation
2020/08/26 11:12:50 – step2 – Starting entry [entry1]
2020/08/26 11:12:50 – step2 – Starting entry [entry2]
2020/08/26 11:12:50 – step2 – Starting entry [entry3]
2020/08/26 11:12:50 – step1 – ERROR (version 9.1.0.0-206, build 9.1.0.0-206 from 2020-08-01 01.24.45 by kirito) : org.pentaho.di.core.exception.KettleException:
2020/08/26 11:12:50 – step1 – org.pentaho.di.core.exception.KettleException:
2020/08/26 11:12:50 – step1 – Unable to perform logging at the end of the transformation
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Unable to write information to the step log table
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Error occurred while trying to connect to the database
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed.
2020/08/26 11:12:50 – step1 – 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.
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Unable to perform logging at the end of the transformation
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Unable to write information to the step log table
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Error occurred while trying to connect to the database
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed.
2020/08/26 11:12:50 – step1 – 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.
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.Trans.fireTransFinishedListeners(Trans.java:1618)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.Trans$1.stepFinished(Trans.java:1359)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.step.BaseStep.markStop(BaseStep.java:3154)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.step.RunThread.run(RunThread.java:122)
2020/08/26 11:12:50 – step1 – at java.lang.Thread.run(Unknown Source)
2020/08/26 11:12:50 – step1 – Caused by: org.pentaho.di.core.exception.KettleException:
2020/08/26 11:12:50 – step1 – Unable to perform logging at the end of the transformation
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Unable to write information to the step log table
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Error occurred while trying to connect to the database
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed.
2020/08/26 11:12:50 – step1 – 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.
2020/08/26 11:12:50 – step1 – TT
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.Trans$9.transFinished(Trans.java:2474)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.Trans.fireTransFinishedListeners(Trans.java:1607)
2020/08/26 11:12:50 – step1 – … 4 more
2020/08/26 11:12:50 – step1 – Caused by: org.pentaho.di.core.exception.KettleException:
2020/08/26 11:12:50 – step1 – Unable to write information to the step log table
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Error occurred while trying to connect to the database
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed.
2020/08/26 11:12:50 – step1 – 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.
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.Trans.writeStepLogInformation(Trans.java:2614)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.Trans$9.transFinished(Trans.java:2472)
2020/08/26 11:12:50 – step1 – … 5 more
2020/08/26 11:12:50 – step1 – Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
2020/08/26 11:12:50 – step1 – Error occurred while trying to connect to the database
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed.
2020/08/26 11:12:50 – step1 – 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.
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – at org.pentaho.di.core.database.Database.normalConnect(Database.java:493)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.core.database.Database.connect(Database.java:389)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.core.database.Database.connect(Database.java:360)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.core.database.Database.connect(Database.java:350)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.trans.Trans.writeStepLogInformation(Trans.java:2605)
2020/08/26 11:12:50 – step1 – … 6 more
2020/08/26 11:12:50 – step1 – Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
2020/08/26 11:12:50 – step1 – Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed.
2020/08/26 11:12:50 – step1 – 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.
2020/08/26 11:12:50 – step1 –
2020/08/26 11:12:50 – step1 – at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:601)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.core.database.Database.normalConnect(Database.java:477)
2020/08/26 11:12:50 – step1 – … 10 more
2020/08/26 11:12:50 – step1 – Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 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.
2020/08/26 11:12:50 – step1 – at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2020/08/26 11:12:50 – step1 – at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
2020/08/26 11:12:50 – step1 – at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.lang.reflect.Constructor.newInstance(Unknown Source)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.Util.handleNewInstance(Util.java:403)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:335)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2187)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:768)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
2020/08/26 11:12:50 – step1 – at sun.reflect.GeneratedConstructorAccessor104.newInstance(Unknown Source)
2020/08/26 11:12:50 – step1 – at TTsun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.lang.reflect.Constructor.newInstance(Unknown Source)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.Util.handleNewInstance(Util.java:403)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323)
2020/08/26 11:12:50 – step1 – at java.sql.DriverManager.getConnection(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.sql.DriverManager.getConnection(Unknown Source)
2020/08/26 11:12:50 – step1 – at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:585)
2020/08/26 11:12:50 – step1 – … 11 more
2020/08/26 11:12:50 – step1 – Caused by: java.net.SocketException: Permission denied: connect
2020/08/26 11:12:50 – step1 – at java.net.DualStackPlainSocketImpl.connect0(Native Method)
2020/08/26 11:12:50 – step1 – at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.net.PlainSocketImpl.connect(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.net.SocksSocketImpl.connect(Unknown Source)
2020/08/26 11:12:50 – step1 – at java.net.Socket.connect(Unknown Source)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
2020/08/26 11:12:50 – step1 – at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:299)
2020/08/26 11:12:50 – step1 – … 25 more
2020/08/26 11:12:50 – step1 – Transformation detected one or more steps with errors.
2020/08/26 11:12:50 – step1 – Transformation is killing the other steps!
The log is too long, but we need to read it carefully. The main issue is:
Caused by: java.net.SocketException: Permission denied: connect
So the solution is very easy. Open the spoon.bat if you working on Windows, and then modify the java start line like below:
|
set OPT=%OPT% %PENTAHO_DI_JAVA_OPTIONS% "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" "-Djava.net.preferIPv4Stack=true" "-Djava.library.path=%LIBSPATH%;%HADOOP_HOME%/bin" "-Djava.endorsed.dirs=%JAVA_ENDORSED_DIRS%" "-DKETTLE_HOME=%KETTLE_HOME%" "-DKETTLE_REPOSITORY=%KETTLE_REPOSITORY%" "-DKETTLE_USER=%KETTLE_USER%" "-DKETTLE_PASSWORD=%KETTLE_PASSWORD%" "-DKETTLE_PLUGIN_PACKAGES=%KETTLE_PLUGIN_PACKAGES%" "-DKETTLE_LOG_SIZE_LIMIT=%KETTLE_LOG_SIZE_LIMIT%" "-DKETTLE_JNDI_ROOT=%KETTLE_JNDI_ROOT%" |
After the fix, the error will be missing.