Reputation: 639
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?
Upvotes: 21
Views: 219214
Reputation: 465
The solution worked for me is to kill whatever process is running on port 8080 (in my case it was oracle) and then restart your server and run your project again.
Open Windows PowerShell and type these commands:
netstat -ano | findstr <Port Number>
taskkill /F /PID <Process Id>
replace 'Process ID' with whatever number is shown in your terminal
After this, restart your server and run your project again and it should work.
Upvotes: 0
Reputation: 11
I think, Any other service like Database etc running on port 8080.
Please configure new port on your application and run on that port.
Upvotes: 1
Reputation: 459
Just change the port number used e.g. 8000 then call the http://localhost:8080
Upvotes: 0
Reputation: 587
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" />
Upvotes: 13
Reputation: 41
Add username and password in application propreties files.
When adding spring security every http query must be authentified by login and password.
Upvotes: 4
Reputation: 83
you can find the username and password details in your {tomcat installation directory}/conf/tomcat-users.xml
Upvotes: 0
Reputation: 1
Just change your default port 8080 to something else like below example
SQL> begin
2 dbms_xdb.sethttpport('9090');
3 end;
4 /
Upvotes: 0
Reputation: 69
I just killed the Oracle processes and re-initiate JBoss. All was fine :)
Upvotes: 0
Reputation: 95
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.
Upvotes: 1
Reputation: 4452
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
Upvotes: 1
Reputation: 5935
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.
Upvotes: 1
Reputation: 117
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.
Upvotes: 6
Reputation: 682
This is http authentication. You can find username and password inside users.xml WEB-INF directory if any. otherwise you have to edit or remove security-constraint
element from web.xml file
UPDATE Sorry, I haven't noticed XDB. check if Oracle and tomcat using same port. Update anyone of them
Upvotes: 20
Reputation: 1086
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
Upvotes: 1
Reputation: 133
You can uninstall WAMP/XAMPP and install it again with default port number. It will work properly.
Upvotes: 1