What's XAMPP? Can anyone help me with its mySQL error? - java

I am developing a Java program and I was recommended to install XAMPP. Still, I am not sure if it is secure or not to my home computer. Is it dangerous or should I keep it? Sorry, I do not know anything about XAMPP.
Also, I started running it because I am doing a tutorial, and I came across the following error: http://prntscr.com/drwra6
Can anyone help me? Please, do not use difficult concepts :)
Thank you very much.

Short Answer
Uninstall Sype
Long Answer
Open Skype.
Tools -> Options -> Advanced -> Connection.
Disable the "Use port 80 and 443 for alternatives for incoming connections"
Sign Out and Close all Skype windows. Try restarting your Apache.
VERY LONG ANSWER
As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.
As the port is not used by Skype, but by some other internal applications, I followed the below steps to resolve the issue:
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, somehow I found a line that says:
Listen 80
And change the 80 into any number / port you want. In my scenario I’m using port 8080.
Listen 8080
Still from the httpd.conf file, I found another line that says:
ServerName localhost:80
And change 80 to 8080.
ServerName localhost:8080
Step 2 - From the XAMPP Control Panel, under Apache, click the Config button again, but this time select the Apache (httpd-ssl.conf). Inside the httpd-ssl.conf file, find line that says
Listen 443
And change the 443 into any number / port you want. I’ll using 4433 as the new port number.
Listen 4433
Still from the httpd-ssl.conf file, find another line that says
ServerName localhost:443
And change 443 to 4433.
ServerName localhost:4433
Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.
SOURCE XAMPP, Apache - Error: Apache shutdown unexpectedly
CONCLUSION
Google first

Related

How to remote debug WebLogic server when it started as Windows Service

I tried almost all internet and stackoverflow tips and no one didn't help me to open ports in Weblogic Server. My Weblogic server starts as windows service in windows server 2008 r2. In config.xml on the path
..user_projects\domains\%Any_app%\config\config.xml i added this string for each server in arguments -
<server-start>
<arguments>... -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=1777,server=y,suspend=n ...
</arguments>
</server-start>
and i always check in cmd with netstate -a or telnet this port but it doesn't appear and doesn't work.
For the first, check your firewall - ensure that port is open.
Second, check config.xml again, then in administration console go to
Servers - Configuration - Listen Port - made modifications if needed.
Restart weblogic. Check if service is started, if not then modify windows service.
Read this article how to manage ports.
Change the port number with WLST, if it possible for you.
For me the solution was to edit regedit with my weblogic as win service. Path:HKEY_LOCAL_MACHINE/SYSTEM/services/%Name_of_service% and here u can edit settings
(add some strings in setting fields) and then restart machine with u server.

cannot use both TOMCAT server and my internet connection

I cannot have my tomcat server started and at the same time use internet.
either I can start Tomcat (in Eclipse) and internet is not available.
or I can access the internet but tomcat cannot be started.
Here the original probleme I had when I first wanted to use Tomcat and display my html page on localhost.
GRAVE: StandardServer.await: create[localhost:8005]: I find a way to start the Tomcat Server: in the terminal:
sudo lsof -i : 8005 # checks port 80
sudo route -n flush
sudo route add default 192.168.1.1
then I can use tomcat and localhost:8080 but my internet connexion is dead
if I want my internet connexion then I stop the tomcat server by clicking on the red square in eclipse and then in the terminal I do:
sudo route -n flush
sudo route add default 192.168.0.1
THen I can use internet but tomcat cannot be restarted. I have to undergo the first process.
this of course is a very boring process and I would like to know what 's wrong and how I could fix it.
I use tomcat 9 / Mac OS sierra / Eclipse Neon3
When you say "my internet connexion is dead", do you mean that your network connection drops or that your DNS lookups fail? (What do you think this command is doing and why are you performing it: sudo route add default 192.168.1.1?)
If your program is modifying your system's connectivity settings, I would strongly recommend against preventing it from doing that. There's no reason for it to do so at that level, a more appropriate place to set settings would be at some deploy stage.
Alternatively, you could run your app in a Docker container which I strongly suspect will solve your problem. Visit www.docker.com to learn more.

GlassFish Server: Administrator port is occupied by null

I tried to start glassfish server via the Netbeans IDE but it showed this error:
Could not start GlassFish Server: Administrator port is occupied by null
C:\Users\Ateeq Khaliq\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1045: Deployment error: Could not start GlassFish Server: Administrator port is occupied by null
See the server log for details.
BUILD FAILED (total time: 2 seconds)
I have changed the port also to 9999 in C:\Users\Ateeq Khaliq\GlassFish_Server\glassfish\domains\domain1\config file.
How can I fix this?
Change this
the solution is change the host configuration
netstat -aon | find ":4848" | find "LISTENING"
Kill the process that is using your Administrator port
Its seem to be a Bug in Netbeans
if you have alraidy found a solution please let me know.
I had the exact same problem and the way I solved it was to delete the glassfish, tomcat7 and tomcat 8 servers from my IDE. I then deleted their folders on my hard disk and reinstalled the glassfish alone. Everything worked fine after that.
If Netbeans is blocked by Firewall this happens. Make sure your Antivirus firewall is not blocking NetBeans. Grant NetBeans full access to act as a server (This is also asked when you start NetBeans).
Then you should be able to start your server through NetBeans
remove glassfish server from Netbeans and added another one click Tools-servers
select your server and click remove servers and click add servers change the domain name and change port from 8080 to 8090 as you like. restart Netbeans
It has a really simple solution, just restart the Java process in your machine and you should be good to go..

Sun Directory Server can't connect ldap server

I'am installing ArcGisServer for the Java plataform on Centos 5.5 x86_64, this is not a supported platform but I have overcome almost every problem preventing the success of the installation. It uses exhaustively Sun Directory Server. The last error i receive was:
ldap_simple_bind: Can't connect to the ldap server - No route to host
It happens in other applications which makes uses of it, so it seems to be an specific problem of Sun Directory Server on linux and solaris. There is no reported solution. Usually I search the problem as much as I can but this time I have reached my patience and I need it working as soon as posible. I recognize this as an excellent forum because of it's community and quality of answers, ¿can anybody help me with this?
The "No route to host" error suggests that the issue is one of network connectivity between your ArcGIS server (the Sun Directory Server component, as you mention) and the LDAP server. So, a few things to examine, in order:
Do you have an LDAP server set up and running?
Is your LDAP server reachable from your Centos machine outside of the ArcGis server?
Is your ArcGis configured with the correct address to the LDAP server - should be in the web.config file? Example below:
<connectionStrings>
<add name="ADConnectionString"
connectionString="LDAP://SERVER_LDAP:389/ou=Sigestredi,o=Sicondef,dc=aplicaciones,o=mdef,c= es" />
</connectionStrings>
Disclaimer: I don't know anything about the ArcGIS server per se - I'm just diagnosing the "no route to host error" with a few snippets I picked up from some quick searches of the ArcGis forums.
ArcGIS includes a Sun Directory Server on it, so arcgis server and ldap are on the same machine. The port is set to 62000. When I run the diagnostic tool the DG028 fails:
DG028 - check LDAP server: is listening
I made a prove using nmap as:
nmap localhost -p62000
And it says it is opened. I don't know how to verify if LDAP is up and running, the startup log doesn't show anything wrong. I have found a config file named ldap.conf:
url ldap://name.subdomain.domain:62000/dc=name,dc=arcgis
admnm agsadmin
And my /etc/hosts is:
127.0.0.1 localhost localhost
ip_direction name.subdomain.domain name.subdomain.domain
I don't have an alias for "name", so:
ping name.subdomain.domain
Works
But:
ping name
Doesn't work
I have never used ldap so I don't know what should be on "dc". Could my hosts file be malformed or is my ldap.conf?
Another information is that the computer I am using is part of a domain. When I installed Centos, /etc/hosts file had an alias for the loopback interface as localhost.localdomain but i removed it.
I would appreciate any help.
I have solved my problem, the problem was on my /etc/hosts file. I added an alias for my ip direction:
127.0.0.1 localhost localhost
ip_direction name.subdomain.domain name
Then I run the ServerConfig script. This is a successful installation of ArcGIS Server for the Java platform on Linux. Thanks Greg for your guide.

Address already in use: JVM_Bind java

Some times whenever I restart the application, which is built on
Java
Struts
Mysql and Jboss 4.05 Version
I get the error as Address already in use: JVM_Bind
Only fix that i know is to restart the machine and try again, it will work.
Else Some times I do Ctrl-Alt-Del and Stop all the process related to Java, some times this also works.
But what is the exact reason and how can we prevent this problem ?
Address already in use: JVM_Bind
means that some other application is already listening on the port your current application is trying to bind.
what you need to do is, either change the port for your current application or better; just find out the already running application and kill it.
on Linux you can find the application pid by using,
netstat -tulpn
In windows this scenario happens when Eclipse crashes without a clean shutdown it will have the local Jetty or Tomcat server keep running.
When you reopen Eclipse and try to start server again this will lead to the "Address already in use: JVM_Bind"
You can solve this by opening Task Manager and find the javaw.exe process and ending it.
Then you can restart the server on Eclipse.
On windows, in an elevated cmd/ps
net stop winnat
then
net start winnat
Resets the windows' NAT service and that removes faulty listeners.
This method works for most 'cannot listen on this port' errors, like as in Docker, JVM etc.
I usually come across this when the port which the server (I use JBoss) is already in use
Usual suspects
Apache Http Server => turn down the service if working in windows.
IIS => stop the ISS using
Skype =>yea I got skype attaching itself to port 80
To change the port to which JBoss 4.2.x binds itself go to:
"C:\jboss4.2.2\server\default\deploy\jboss-web.deployer\server.xml"
here default is the instance of the server
change the port here :
<Connector port="8080"
address="${jboss.bind.address}" >
In the above example the port is bound to 8080
Open command line and type: netstat -a -o -n or tasklist to see currently running processes.
Find port that related to Java and type: taskkill /F /PID <your PID number>.
Click Enter.
Is it possible that MySql listening on the same port as JBoss?
Is there a port number given in the error message - something like Address already in use: JVM_Bind:8080
You can change the port in JBoss server.xml to test this.
For the sake of completeness as many may fall in this SO for other reasons than OP's question, here is another info that saved my day :
TL;DR;
Check that the port you want to open is not reserved (even though no application has opened it)
On windows :
netsh interface ipv4 show excludedportrange protocol=tcp
Explanation :
At least on windows, another possible cause for the java.net.BindException: Address already in use: JVM_Bind is that the operating system has "reserved" the port.
If you use the commands from other answer in this topic, they will tell you that no application is listening to the port, yet you cannot open it.
Some windows update like this one reserves range port that can then no longer be claimed by processes.
Though not explicit on the port that can no longer be opened, the update note mentions a command that can help troubleshooting the issue :
netsh interface ipv4 show excludedportrange protocol=tcp
this will yield a list of port range that are blocked :
Protocol tcp Port Exclusion Ranges
Start Port End Port
---------- --------
5357 5357
49709 49808
49809 49908
49909 50008
50009 50108
50109 50208
50280 50379
* - Administered port exclusions.
The quick answer on how to prevent it is that you most likely need to stop JBoss before starting it again.
You should be able to call the "Terminate" button in the Console view to shutdown the server.
That error means that the you are trying to create a new ServerSocket on a port already in use by another ServerSocket. So try to make your application closing all sockets and connections you know about and be sure your application is completely terminated. Also check if there is another proces you launched by your program.
It can be also caused by double definition of port 8080 in ..\tomcat\conf\server.xml :
<Connector port="8080"
enableLookups="false" redirectPort="8443" debug="0"/>
<Connector port="8080"
enableLookups="false" address="127.0.0.1" maxParameterCount="30000"/>
please try following options for JVM binding exception:
start and stop the server. and check the server process ids and kill and stop the server.
go to control panel->administrative tool-> service-> check all server and stop all the servers and then start your own server.
change the Browser which your using. for example if
your using IE ,change it to Mozilla firefox.
I was having this problem too. For me, I couldn't start/stop openfire (it said it was stopped, but everything was still running)
sudo /etc/init.d/openfire stop
sudo /etc/init.d/openfire start
Also, restarting apache did not help either
sudo /etc/init.d/apache2 restart
The errors were inside:
/opt/openfire/logs/stderror.log
Error creating server listener on port 5269: Address already in use
Error creating server listener on port 5222: Address already in use
The way I fixed this, I had to actually turn off the server inside the admin area for my host.
I had the same on Windows. My solution was to get which port the debug wants to connect to. (In IntelliJ a red rectangle already giving the info: "Error running Tomcat: Unable to open debugger port (127.0.0.1:XXXXX): ... Already in use...")
Let's say XXXXX is the port number.
Then i searched for the problem and the PID in a cmd window:
netstat -ano | find "CLOSE_WAIT" | find ":XXXXX"
I got the PID number as the last number in the result line. (Let's say YYYY)
Finally:
TASKKILL /PID YYYY
An extra info: Winscp logged out meanwhile, probably it was causing my problem. :)
This recently happen to me when enabling JMX on two running tomcat service within Eclipse. I mistakenly put the same port for each server.
Simply give each jmx remote a different port
Server 1
-Dcom.sun.management.jmxremote.port=9000
Server 2
-Dcom.sun.management.jmxremote.port=9001
You can try deleting the Team Server credentials, most likely those will include some kind of port in the server column.
Like https://wathever.visualstudio.com:443
Go to Windows/Preferences
expand Team then Team Foundation Server
go to Credentials and remove whichever is there.
On Mac, even when I'd search with netstat, no processes were binding to that port, but I'd still get the "Address already in use" Bind exception.
In this case, going into
Safari -> Preferences -> Privacy -> Manage Website Data... -> finding "localhost" -> Remove
fixes the problem, if there really is no process running with that port. It seems Safari's web cache maintains a reference to the port somehow, and removing that cache frees up the port.
Sometimes, I use lsof -i:8080 and I get nothing back, no pid. Well something has to be taking place. If this is your case, it could be docker. By using docker ps you can check if you have any old dockers lying around and kill them. This could be the culprit for a port already in use error.

Categories

Resources