1

I use embedded undertow server in my web project. It works well in Idea with listening port 80 and 443, following the log in idea.

2018-08-04 11:32:31.394  INFO 4933 --- [           main] o.s.b.w.e.u.UndertowServletWebServer     : Undertow started on port(s) 443 (https) 80 (http) with context path ''

But when I run it on my ubuntu server or local command line:

java -jar xxxx.jar

Output log is

Undertow started on port(s) 443 (https) with context path ''

wihout listening port 80. I can only visit the site by inputing https://xxxx handly. I compared the log. The server log print the extra two lines

2018-08-04 11:38:37.950  WARN 14835 --- [           main] io.undertow.websockets.jsr               : UT026009: XNIO worker was not set      on WebSocketDeploymentInfo, the default worker will be used
2018-08-04 11:38:37.950  WARN 14835 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used

I din't know what's wrong. Any answer is helpful. Thanks.

treeliked
  • 383
  • 1
  • 4
  • 15
  • Could you please provide the configuration file here on redirecting http to https – sam Feb 27 '19 at 14:54
  • @Samim Thanks~ Here is the code [link](https://github.com/TreeLiked/darkme2/blob/master/src/main/java/com/treeliked/darkme2/Darkme2Application.java) . – treeliked Mar 01 '19 at 01:02
  • 1
    the link shows the configuration for Tomcat but I wanted the config for Undertow. However, I managed to do that. You can view it here https://stackoverflow.com/a/54908727/7538821 – sam Mar 01 '19 at 05:57
  • 1
    @Samim I am sorry to post the wrong code, I have solved the problem according to the link you provided, thank you – treeliked Mar 02 '19 at 05:39

0 Answers0