Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Application not starting because of config.properties invalid private/public key pair(Key pair generated with openssl in Linux Mint not working (HTTP 404 exception))
Application not starting because of config.properties invalid private/public key pair [message #1860117] Tue, 18 July 2023 14:53 Go to next message
J D is currently offline J DFriend
Messages: 95
Registered: February 2021
Member
Hi there everyone,

My application has refused to start because of a problem, I believe, with the key pair I generated using OpenSSL in Linux Mint and copied to the generated WAR files' config.properties text files.

Let me explain what I did. In the Migrating to Java 17 section of the Migration Guide for Scout 23.1, there is a script that I saved to a file and executed with a bash command in the Linux terminal.

I then copied the generated Base64 encoded private and public keys into the necessary config.properties files, ran "mvn clean verify" and then moved the WAR apps into the Tomcat server under port 8443.

When I ran the UI client application, I got the HTTP 404 exception. The content of my log files is as follows:

Server log
2023-07-18 16:07:06,119 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.config.ConfigPropertyProvider.parse(ConfigPropertyProvider.java:115) - Reading properties from file:/opt/tomcat/webapps/org.eclipse.scout.apps.ygapp.server/WEB-INF/classes/config.properties using org.eclipse.scout.rt.platform.config.DefaultConfigFileLoader
2023-07-18 16:07:06,134 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.validateHeadless(PlatformImplementor.java:174) - Headless mode: scout.headless=true, java.awt.headless=true, GraphicsEnvironment.isHeadless()=true
2023-07-18 16:07:06,145 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.inventory.ClassInventory.<clinit>(ClassInventory.java:37) - Building jandex class inventory using rebuild strategy IF_MISSING...
2023-07-18 16:07:06,270 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.inventory.ClassInventory.<clinit>(ClassInventory.java:43) - Finished building jandex class inventory in 132.670930 ms. Total class count: 2886
2023-07-18 16:07:06,805 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.createBeanManager(PlatformImplementor.java:221) - Collected 792 beans in 532.861159 ms
2023-07-18 16:07:06,926 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.createBeanManager(PlatformImplementor.java:226) - Registered 792 beans in 121.117402 ms
2023-07-18 16:07:06,940 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.logger.LoggerInstallPlatformListener.registerLoggerSupportBean(LoggerInstallPlatformListener.java:98) - Registered logger support org.eclipse.scout.rt.platform.logger.LogbackLoggerSupport
2023-07-18 16:07:06,956 INFO  [scout-platform-starter] org.eclipse.scout.rt.shared.services.common.code.CodeTypeRegistrator.stateChanged(CodeTypeRegistrator.java:41) - 11 code type classes registered.
2023-07-18 16:07:07,007 INFO  [scout-platform-starter] org.eclipse.scout.rt.mom.api.AbstractMomTransport.initDelegate(AbstractMomTransport.java:98) - +++ Using 'NullMomImplementor' for transport 'ClusterMom'. No messages are published and received.


Client log
2023-07-18 16:07:37,269 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.config.ConfigPropertyProvider.parse(ConfigPropertyProvider.java:115) - Reading properties from file:/opt/tomcat/webapps/org.eclipse.scout.apps.ygapp.ui.html/WEB-INF/classes/config.properties using org.eclipse.scout.rt.platform.config.DefaultConfigFileLoader
2023-07-18 16:07:37,282 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.validateHeadless(PlatformImplementor.java:174) - Headless mode: scout.headless=true, java.awt.headless=true, GraphicsEnvironment.isHeadless()=true
2023-07-18 16:07:37,293 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.inventory.ClassInventory.<clinit>(ClassInventory.java:37) - Building jandex class inventory using rebuild strategy IF_MISSING...
2023-07-18 16:07:37,448 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.inventory.ClassInventory.<clinit>(ClassInventory.java:43) - Finished building jandex class inventory in 162.144865 ms. Total class count: 6845
2023-07-18 16:07:37,916 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.createBeanManager(PlatformImplementor.java:221) - Collected 572 beans in 467.279661 ms
2023-07-18 16:07:37,967 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.createBeanManager(PlatformImplementor.java:226) - Registered 572 beans in 50.607511 ms
2023-07-18 16:07:37,981 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.logger.LoggerInstallPlatformListener.registerLoggerSupportBean(LoggerInstallPlatformListener.java:98) - Registered logger support org.eclipse.scout.rt.platform.logger.LogbackLoggerSupport
2023-07-18 16:07:37,995 INFO  [scout-platform-starter] org.eclipse.scout.rt.shared.services.common.code.CodeTypeRegistrator.stateChanged(CodeTypeRegistrator.java:41) - 11 code type classes registered.
2023-07-18 16:07:38,057 INFO  [scout-platform-starter] org.eclipse.scout.rt.shared.servicetunnel.RegisterTunnelToServerPlatformListener.registerTunnelToServerProxies(RegisterTunnelToServerPlatformListener.java:67) - Tunnel to server proxies registered.
2023-07-18 16:07:38,066 ERROR [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.validateConfiguration(PlatformImplementor.java:194) - Config property with key 'scout.auth.privatekey' does not exist or has an invalid value.
2023-07-18 16:07:38,066 INFO  [scout-platform-starter] org.eclipse.scout.rt.platform.config.ConfigPropertyValidator.checkDefaultValueConfiguration(ConfigPropertyValidator.java:91) - Config property with key='application.client.structure.type' has configured value='INTEGRALE'. This results in an actual value of 'INTEGRALE' which is equal to the default value. Remove config entry for this key to minimize properties file.
2023-07-18 16:07:38,067 ERROR [scout-platform-starter] org.eclipse.scout.rt.platform.internal.PlatformImplementor.start(PlatformImplementor.java:146) - Error during platform startup
org.eclipse.scout.rt.platform.exception.PlatformException: Cannot start platform due to 1 invalid config properties: [scout.auth.privatekey]
	at org.eclipse.scout.rt.platform.internal.PlatformImplementor.validateConfiguration(PlatformImplementor.java:198)
	at org.eclipse.scout.rt.platform.internal.PlatformImplementor.start(PlatformImplementor.java:139)
	at org.eclipse.scout.rt.platform.internal.PlatformStarter.run(PlatformStarter.java:29)


The private key is:
scout.auth.privatekey=MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCALuE9dWpTH8PfjtTruE9MvDawPnQMufxi5U0Vg0edTDQ==

The public key is:
scout.auth.publicKey=MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEVJBtmuYD/+CMPUx3kl/I2p1xD22p8RROEh4ByUOpBUk0Lr7mrUxU1zYRGHEojSUQU1WYGsUKtNDR2xSfIibgXQ==

My development environment is as follows:

OS: Linux Mint 21.2 (Victoria)
Java version: OpenJDK 17.0.7
Tomcat version: 9.0.78
Scout version: 23.1.14
Eclipse version: 2023-06 (4.28.0)

Thanks for your kind assistance.

Cheers,

JD

[Updated on: Tue, 18 July 2023 14:58]

Report message to a moderator

Re: Application not starting because of config.properties invalid private/public key pair [message #1860900 is a reply to message #1860117] Thu, 07 September 2023 15:40 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 201
Registered: November 2010
Senior Member
Hi JD

Is it possible that you have mistyped one of the property names? The error message in the client log mentions the property name "scout.auth.privatekey", when in fact, it should be "scout.auth.privateKey" (with an uppercase "K"). You should carefully check the config.properties files (you can see the path in the first line of each log file, "Reading properties from file").

Important: DO _NOT_ USE THE KEY PAIR YOU HAVE POSTED ANYMORE! As the name implies, the private key should be kept strictly confidential, because anyone with knowledge of this key can create valid signatures. To keep your server secure, it is important that you immediately create a new key pair.

Regards,
Beat
Re: Application not starting because of config.properties invalid private/public key pair [message #1860934 is a reply to message #1860900] Sun, 10 September 2023 10:49 Go to previous message
J D is currently offline J DFriend
Messages: 95
Registered: February 2021
Member
Hi Beat,

Quick update. I had to regenerate a new key pair and that is what I'm using now.

Thanks a lot.

JD

[Updated on: Mon, 25 September 2023 09:27]

Report message to a moderator

Previous Topic:ClassNotFoundException when convereting permission names from database to classes
Next Topic:Cannot download Excel file created on server onto client's chosen target directory
Goto Forum:
  


Current Time: Mon Mar 04 17:59:32 GMT 2024

Powered by FUDForum. Page generated in 0.01425 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top