I am trying to access localhost:8080 but it is showing me I need to enter user name and pass word. I remember messing up with the server some 4 months ago while I was trying to develop a web application and hosting my domain name on my pc, Unfortunately I become unsuccessful. While working with servlets I was tring some security features and till some time i did not see and of these pop up windows asking for authentication.
I tried to enter the password that I was playing with but non of those are working. Is there anyway i could get out of this problem?
even i faced the same problem. The possibility of this could be usage of same port by two or more application/process. In Some cases you can use different port number which will avoid this problem, but in other case you have to manually kill the process with help of command prompt.
The command to kill is, In your command prompt first enter this command
C:\Users\A611003>tasklist
After this you can able to see list of process running with process ID. For example,
From this select the process you want to stop, for example consider the process id 304 is your server and you have problem with that. Then enter this command.
C:\Users\A611003>Taskkill /PID 304 /F
This will kill that process now you can clean, publish your server and start it.
Note: If you fail to add /F in the above command it does nothing. It is the force kill. you can also try/? for list of available options.
I'll assume that uninstall and reinstall Tomcat is not acceptable to you. The screen shot show basic auth challenge screen from browser and on the default app. So most likely you have set up users on the tomcat using the conf/tomcat-users.xml Try going through this guide https://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#UserDatabaseRealm
There are several other realms that you could have possibly used. Hopefully you will remember when you start reading the doc
You can uninstall WAMP/XAMPP and install it again with default port number. It will work properly.
give username as admin
and leave the password empty
I was facing the same problem, I just change the jboss7.1 port from 8080 to 9090. and it worked perfectly for me.
To change the jboss7.1 port go to jboss-as-7.1.0.Final\standalone\configuration
open standalone.xml
look for the line <socket-binding name="http" port="8080"/>
change 8080
to 9090
. save the file and
Restart the server. it should work
Just change the port number used e.g. 8000 then call the http://localhost:8080
you can find the username and password details in your {tomcat installation directory}/conf/tomcat-users.xml
Open the file :
WEB-INF -> web.xml
In my case, it looks like as following. :
<security-constraint>
<web-resource-collection>
<web-resource-name>Integration Web Services</web-resource-name>
<description>Integration Web Services accessible by authorized users</description>
<url-pattern>/services/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>Roles that have access to Integration Web Services</description>
<role-name>maximouser</role-name>
</auth-constraint>
<user-data-constraint>
<description>Data Transmission Guarantee</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
Remove or comment these lines.
This is caused because there is a database running on your computer. In my case, it was an Oracle data base. By default, everytime you start your computer, the services of the database automatically starts.
Go to Start >> find Oracle or whatever data-base in the list of programms >> and manually stop the database. It appears that there is a conflict of port.
Add username and password in application propreties files.
When adding spring security every http query must be authentified by login and password.
Just change your default port 8080 to something else like below example
SQL> begin
2 dbms_xdb.sethttpport('9090');
3 end;
4 /
Some other application(like oracle) is using the same port number. So you should change the tomcat port number in apachetomcat/conf/server.xml
Privious--->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Updated ---->
<Connector port="8088" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
I just killed the Oracle processes and re-initiate JBoss. All was fine :)
Source: Stackoverflow.com