JPro-one / jpro-routing

Small web-framework for JPro
https://www.jpro.one
Apache License 2.0
6 stars 0 forks source link

Illegal request, responding with status '400 Bad Request' #4

Closed ctoabidmaqbool closed 1 year ago

ctoabidmaqbool commented 1 year ago

Using latest jpro plugins available yet.

com.sandec.jpro:jpro-plugin-gradle:2022.1.8
com.sandec.jpro:jpro-routing-core:0.11.0
com.sandec.jpro:jpro-webapi:2022.1.5
com.sandec.jpro:jpro-boot:2022.1.5
one.jpro.jproutils:tree-showing:0.2.1

8080 port is hidden using Apache server listing on some domain e.g. https://somedomain.com

2022-11-22 12:13:52,112 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewInfo$ - startTime      : Tue Nov 22 12:13:52 PKT 2022      
2022-11-22 12:13:52,107 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewInfo$ - Application closed:
2022-11-22 12:13:52,107 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewInfo$ - 
2022-11-22 12:13:52,054 [INFO] in scala-execution-context-global-9759 - [info] c.j.i.s.ViewSerializerActor - Client closed session. Reason: tab closed
2022-11-22 12:09:36,669 [INFO] in scala-execution-context-global-9759 - [warn] a.a.ActorSystemImpl - Illegal request, responding with status '400 Bad Request': Cannot establish effective URI of request to `/`, request has a relative URI and is missing a `Host` header: consider setting `akka.http.server.default-host-header`
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 -     at com.zaxxer.hikari.proxy.StatementProxy.executeQuery(StatementProxy.java:99)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 -     at org.mariadb.jdbc.Statement.executeQuery(Statement.java:114)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 -     at org.mariadb.jdbc.Statement.executeInternal(Statement.java:906)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9759 -     at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:616)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9759 -     at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:673)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9760 -     at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:754)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9760 -     at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:815)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 -     at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:133)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9747 -     at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:358)
2022-11-22 11:14:46,139 [INFO] in scala-execution-context-global-9759 -     at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:270)
FlorianKirmaier commented 1 year ago

You shouldn't define jpro-boot anywhere. It is always provided by the JPro plugin. (And you have sometimes version 2022.1.5 instead of 2022.1.8)

I guess the error "a.a.ActorSystemImpl - Illegal request" just means that someone is making unreasonable http request, and is therefore not an error. If you can't reproduce it, it also might be some kind of crawler or bot which might cause this.

The exception at the bottom is probably from your codebase.

ctoabidmaqbool commented 1 year ago

Fixed it by using 2022.1.8 version of all jpro plugins version, rather then 2022.1.5 (mistaken)