<SpringBoot> Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled - spring-boot

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-12-28 09:49:48.561 ERROR 482 --- [ main] o.s.boot.SpringApplication : Application run failed
when I try to start server with command:
java -jar jin-alpha-1.0.jar
under AWS Ubuntu linux server.
In case of trying to local start server was success.
The Changed port is suspicious the reason why before changed It work.
I changed Server port from 8080 to 80.(The reason why AWS http allowed only 80 port)
Local Case : The port of Tomcat server ==> 8080 and 80, Both of them are work. and Stared
AWS Ubuntu : Start with 8080 is work but 80 is not work and Error displayed Above.

I got solution.
I Changed Tomcat port from 80 to 8080. so Server started under Aws ubuntu.
(I don't still know why 80 port is not work under Aws Ubutu)
and Add "Custom TCP Rule" with 8080 port Range.

These are called Priviliged ports on *nix systems. The TCP/IP port numbers below 1024 are special in that normal users are not allowed to run servers on them. This is a security feaure, in that if you connect to a service on one of these ports you can be fairly sure that you have the real thing, and not a fake which some hacker has put up for you.
The normal port number for W3 servers is port 80. This number has been assigned to WWW by the Internet Assigned Numbers Authority, IANA.
When you run a server as a test from a non-priviliged account, you will normally test it on other ports, such as 2784, 5000, 8001 or 8080.
Hope this explains why you cannot run on 80. There are workarounds like running as root. Which I dont recommend as if some hacker gets access to the service then they get root privileges on the box. You need to be careful not running services on such ports.

Related

"bind: An attempt was made to access a socket in a way forbidden by its access permissions"

Say we have frontend and backend containers based on Docker Desktop (for Windows).
Backend container uses port 9001, and the frontend container listens to 9001.
The problem is that port 9001 is already in use by Windows 10 by the Intel driver, and it is impossible to run a container on this port:
Error response from daemon: Ports are not available: listen tcp 0.0.0.0:9001: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
Could you please advise what is the way to handle this port if there is no ability to change it directly from application code?
A couple of ways:
When either using a docker run command, specify the host port to use, and set it to something other than 9001. i.e. -p 9002:9001 or Docker Compose, i.e.
ports:
- '9002:9001'
Then use port 9002 instead of 9001 when accessing the container from the host (Win 10).
Use Nginx and set up a reverse proxy, leave the host port empty when starting the container so no external post is opened on the host, and have the reverse proxy pass it over to the container's 9001 port.

Play Application runs on port 443 but nothing resolves from a browser

We have a Play application running on a Linux box that resolves to port 443 instead of port 80 or port 9000.
The application is up and running without errors - there are no errors in the SSH console.
Port 80 is disabled (HTTP) but we want to have the web application appear in the browser using port 443 (HTTPS).
We have the application.conf file set up to use the correct port as well as the correct keystore path and keystore type (JKS).
Since there are no errors, we would like to know what we can do to correct this situation. Any help would be great!

Windows Container with Docker: Cannot reach httpd in container from host (Win2016 TP5)

I have a Windows Server 2016 TP5 machine that I use as a container host.
I have a Windows Container running that I manage with Docker. Inside this container I have an Apache httpd running on port 88.
The port mapping when I start the container is: 0.0.0.0:80->88/tcp, so I map port 80 of my container host to port 88 of the container.
This is the output from docker inspect: http://pastebin.com/AVem1eGV
I can now reach the Apache http start page from any other computer in the network through the DNS or IP.
In my case:
http://10.10.1.162/
http://documents.test2016-3.company.com/
But the same does not work when I try to call the same from the host system itself or from inside the container. So, on the host system, I try to access the same URL via browser or wget, and getting:
C:\> wget -UseBasicParsing http://documents.test2016-3.company.com/
wget : Unable to connect to the remote server
in both cases.
But I can ping the host from both the host itself as well as the container.
From the host:
C:\>ping test2016-3.company.com
Ping wird ausgeführt für TEST2016-3.company.com [fe80::847a:1430:8a10:b120%4] mit 32 Bytes Daten:
From the container:
PS C:\> ping documents.test2016-3.company.com
Pinging documents.test2016-3.company.com [10.10.1.162] with 32 bytes of data:
which seems to be able to resolve the name just fine.
What does work though is to call the Apache default page via the container hostname (which is win-de6u4068naf) and its running port directly (not through the port mapping), both from the host as well as inside the container:
http://win-de6u4068naf:88/
Just going the route through the container host hostname and mapped port from the host or container itself does not work properly!
Firewall rules allow everything on port 80 from any remote address or to port 80 (=inbound and outbound rules are both set to "allow" for "any").
I know that Microsoft/Docker changed the networking code base of the container/docker support from Windows Server 2016 TP4 to TP5. Not sure if that's related, or whether this is a bug or I'm having something not configured correctly yet.
I made a test and left Docker/Container out of the picture above and installed a plain Apache httpd itself on the container host system on port 80 (and no Docker running at all) just to check whether such setup works or not, in order to be sure that it is actually somehow Docker/Container related and not a problem with my network/host configuration in general. And this works fine, I can reach the Apache from outside as well as from the host itself, thus it must be a Docker/Container related problem.
Environment:
Windows Server 2016 TP5
Docker version 1.12.0-dev, build 2b97201
Got a reply on Microsoft's Github:
https://github.com/Microsoft/Virtualization-Documentation/issues/253#issuecomment-217975932
This is a known limitation in our Windows NAT implementation (WinNAT)
that you cannot access the external port in a static port mapping
directly from the container (NAT) host.

Wakanda Server 10 on Amazon EC2, cannot listen for connections on port 8080 or secure port 4433 on all IP addresses

I have installed wakanda server on an Amazon EC2 server running ubuntu by following this utube video: https://www.youtube.com/watch?v=uSQODnB7wRU .
Now the video is for an older version but I have followed along successfully until I actually launch wakanda on the server. This is what I get in the console:
Welcome to Wakanda Server 10 build 10.187175
Publishing "DefaultSolution" solution
The solution's log file will be stored in the "/home/ubuntu/.Wakanda Server/UserCache/Wakanda Server/DefaultSolution-1882/Logs/" folder
The Administration Web Server cannot listen for connections on port 8080 or secure port 4433 on all IP addresses
You can customize the Administration Web Server's ports with the "--admin-port" and "--admin-ssl-port" options
, then when I try to log into it via the browser it says the connection dropped! Any help would be much appreciated, it seams I need to restrict the IP addresses which can access, but how?
Your wakanda server tried and failed to listen on 8080 and/or 4433
Check the following things:
Are the ports 8080 and/or 4433 used by other processes? (sudo netstat -tapen | grep :8080, if a result is found, then yes another process uses 8080. Check 4433 also)
You may found that wakanda server is already running as a service:
yes you should use this service (create and edit /etc/default/wakanda, add WAKANDA_SOLUTION_AT_STARTUP=your_path and restart with sudo /etc/init.d/wakanda restart)
or to continue starting it manually, stop the service first (sudo /etc/init.d/wakanda stop)
Has the current user the right to listen on those ports? (try running the server with sudo just to check, then use authbind or equivalent)
Can you use alternative ports? (use --admin-port and --admin-ssl-port wakanda server options)
wakanda-server --help will give you the list of options available, especially --solution=VALUE to provide the path to your solution.

How do I configure Hudson to run on port 80?

I'm setting up Hudson as an integration server that I expect other developers and stackholders to access. Rather than have to pass around urls with a specific port, I'd like to configure Hudson to listen on port 80.
The default port from installing Hudson as a service is 8080. I'd like to change this to 80, on a Server 2008 R2 or windows 7 machine that isn't running IIS or Apache.
Do the following to reconfigure the port :
Edit hudson.xml (found in your hudson installation directory)
change the parameter string on line 44 to reference port 80 (--httpPort=8080 to --httpPort 80)
Depending on what plugins you may have set up, there may be other references to the hudson url. Find these by doing a text search in the hudson directory on ':8080' and removing the port number.
Disable the 'World Wide Web Publishing Service' service. By default, this service consumes port 80, which is the port we want to use.
Verify that your machine is configured to accept an external connection on port 80 (ie, open a firewall port)
Restart the Hudson service.

Resources