>PROBLEM
>SOLUTION
2. To test the procedure, create a table:
Starting the application, it fails returning the following message:
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (the profiles dev are currently active).
Attempt to access the site returns:
502 Bad Gateway
Scenario: there is a server interfacing with external requests like Nginx or Apache.
In such cases, the application behind the Nginx, Apache, etc. may have stopped working, returning no answer.
Go to the application's log and check its state.
Make sure that it is responsive.
- x -
You try to access the site redirects to the default URL and the browser returns:
ERR_TOO_MANY_REDIRECTS
@Configuration
@EnableWebSecurity
public class SpringSecConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity httpSecurity) throws Exception {
httpSecurity.cors().disable();
httpSecurity.headers().frameOptions().disable();
httpSecurity.csrf().disable()
.authorizeRequests()
.antMatchers("/", "THE MISSING URL HERE").permitAll()
//...
}
Java
Attempt to access the RabbitMQ service, throws the follwing:
Application terminated: factory failed to instantiate due to: Unsupported or unrecognized SSL message.
javax.net.ssl.SSLException: java.net.SocketException: Connection reset
at sun.security.ssl.Alert.createSSLException(Alert.java:127)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:370)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:313)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:141)
at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1290)
...
Suppressed: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
...
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:475)
...
javax.net.ssl.SSLException: java.net.SocketException: Connection reset
at sun.security.ssl.Alert.createSSLException(Alert.java:127)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:370)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:313)
...
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:475)
Enable or disable the SSL protocol.
An example of the properties file (application.yml):
rabbit-host: mydomain.com
rabbit-port: 5672
rabbit-ssl: false
rabbit-user: john doe
rabbit-pass: secret
Java code snippet to check the "rabbit-ssl" property:
if (PropertiesYml.BROKER_SSL) {
try {
factory.useSslProtocol();
this.connection = factory.newConnection();
} catch (KeyManagementException | NoSuchAlgorithmException | IOException | TimeoutException e) {
logger.error(String.format("Application terminated: factory failed to instantiate due to: %s.", e.getMessage()));
}
} else {
try {
this.connection = factory.newConnection();
} catch (IOException | TimeoutException e) {
logger.error(String.format("Application terminated: factory failed to instantiate due to: %s.", e.getMessage()));
}
}
Attempt to connect to RabbitMQ returns the following:
java.io.IOException
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:396)
...
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
...
Caused by: java.io.EOFException
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:290)
...
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
...
Caused by: java.io.EOFException
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:290)
...
java.io.IOException
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:129)
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:125)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:396)
...
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error
Caused by: java.io.EOFException
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:290)
...
Check the following:
1.Usually, the console management uses 15672 port.
2. Usually, the HTTP request via app (web service/microserve) uses 5672
3. Make sure to enable these ports when working with container (docker).
4. Avoid using /api on a RESTful web service because "/api" is already used by the native rabbitmq's ws,
An example of the properties file (application.yml):
rabbit-host: mydomain.com
rabbit-port: 5672
rabbit-ssl: false
rabbit-user: john doe
rabbit-pass: secret
Suddenly, the angular project fails rendering some elements, like dropdowns, editors, and they disappear or stops working.
1. Stop the app.
2. Clean the cache:
Linux:
$ANGULAR_PROJECT/modules/setget-ax/ramnode1/.angular/cache/$VERSION/angular-webpack/*
$ANGULAR_PROJECT/drillback/modules/setget-ax/ramnode1/.angular/cache/$VERSION/babel-webpack/*
Example:
rm -Rf $ANGULAR_PROJECT/drillback/modules/setget-ax/ramnode1/.angular/cache/13.3.10/babel-webpack/*
Windows using CygWin
rm -Rf $ANGULAR_PROJECT\modules\setget-ax\ramnode1\.angular\cache\$VERSION\angular-webpack\*
rm -Rf $ANGULAR_PROJECT\drillback\modules\setget-ax\ramnode1\.angular\cache\$VERSION\babel-webpack
3. Restart the app
1. Instead of deleting the cache, you may move to a temporary folder just in case of rollback.
2. Sometimes, if a widget freezes, it may be a browser issue.
Before cleaning the cash, try to close the browser and make sure that there are no remaining threads.
Use tasklist (Windows) or ps aux (Linux).
Reopen the browser and test again.
3. Sometimes, Windows may get unstable, mostly after a system update.
Restart Windows.
Yeh! It may be strange, but it happened to me sometimes that just rebooting Windows solved the issue.
[MYREF]:
y;faq-angular fails rendering elements (dropdowns, edtitor, etc.)<memo<angular;.
>PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...