localhost on WAMP gives "Unable to connect" - windows-xp

I have installed WAMP (Version 2.2 32 bit) on Windows XP SP 3. After installation, I get a "Unable to connect" message when I open localhost on Firefox.
Could someone point me to the direction of resolving this.

Have you also checked your HOSTS file
C:/windows/systems32/drivers/etc/hosts
It should have this line in it ( not commented )
127.0.0.1 localhost
If you see this line, without a comment
::1 localhost
either comment it out (add a # in col1) or remove it completely.
This is a IPV6 version of localhost and is not really required yet, but MS decided to be ready for IPV6 and add it to the hosts file.

Your WAMP Server might be offline. So,click on the Wamp icon in System tray and select 'Put Online'. Hope that ll resolve the problem .

The problem is perhaps too localized. Since I was trying it on Windowx XP Service Pack 3, and most new applications are probably giving up comprehensive support for Windows XP as its support is about to be dropped by Microsoft itself. A solution to the problem may not eventually exist.
I tried XAMPP and that worked for me.

Related

Netbeans IDE8 Glassfish 4, GlassFish Server: Administrator port is occupied by null

I just downloaded Netbeans IDE7 with the Glassfish 4.
I just made a project to test it out and see how it goes, and I got this error right from the start:
Could not start GlassFish Server: DAS port is occupied while server is not running
[location]: Deployment error: Could not start GlassFish Server: DAS port is occupied while server is not running
See the server log for details.
BUILD FAILED (total time: 1 second)
I have reinstalled it three times, with the Glassfish and without and then later add it to Netbeans, i changed the domain.xml name="admin-listener" port="4848" to something different
i did this cmd code netstat -aon | find ":80" | find "LISTENING" and closed the programm.
i ran as administrator i think i did almost everyting but it wont simply run, and it keeps returning to the same error
usually i would have given up but this software is required for a school project.
i will try everything.
i hope someone can help me.
Thx in advance
You have to find the process that has taken the port you need. You can try finding it by running the terminal with the command:
netstat -aon | find ":80" | find "LISTENING"
Find the information you need and than kill the process with specific PID in Task Manager.
I hope you find this useful,
Thanks.
A few points:
Why not download NetBeans 8 that also includes GlassFish 4?
Assuming that you have successfully figured out that no other process is listening on port 4848, then Which version of the JDK are you using? Can you try JDK 7 if you are using JDK 8?
Looks like you are not alone - see NetBeans bug 237477.
Note that this isn't the only problem. I run on a Mac and can use the asadmin start command successfully on the remote server. IF I try to start it from NetBeans, it gives me this message.
One hint might be that the domain.xml file is set so that the listening port is 9090, the properties screen for the remote server, which I entered 9090 for, tells me the HTTP port is 23043. I can't edit it. Everytime I try to create that remote server it sets it to this value. The server will run fine if I start it by hand on the remote server, but NetBeans doesn't think it is running.
This occurs because I had to select domain2 because NetBeans says domain1 is already registered on my local machine. I wanted to have a local domain1 and a remote domain1 that are identical so I can test locally, and then deploy remotely.
This error message could be misleading, because it is the same when IP adress of glassfish server in netbeans settings is wrong (not port).
By my experience with this over win 8.1 + Netbeans 8.0 + Glassfish 4.0
The problem resides in permission of folder in windows that block the server execution
I solve the problem changing the permission of the glassfish/domain/domain1 folder for xxxx/user to totalcontrol
If this not solve your problem, try launch the server over console:
asadmin start-domain --verbose
And read the exceptions to try solve the problem.
-EDIT:
Reading other post to try help:
like this: Glassfish server started failed in netbeans 6.9
Or check your firewall:
allow >> C:\Program
Files\glassfish-X.X\glassfish\modules\glassfish.jar
In my case when using the command
netstat -aon | find ":4848" | find "LISTENING"
I noticed that one process was occupying this port. When checked what it was I noticed it was VMWare NAT controller, because I previously had configured a network adapter to listen to this port.
Just stopped all VMWare related services (in my case I didn't need them for development purposes), and solved the problem.
Go to Task Manager -> Services -> Stop Process whose PID IS 3136,2268,2468 ,23.... and near Range in PID. All processes near to the web server's PID.
It works for me on Windows 8.1 pro & Windows 7.
I had the same error message.
Turned out it was caused because my firewall blocked port 4848
May be late but I solved this issue by deleting the app server from the Netbeans and by adding it again. In my case Netbeans 8.2 and Payara 4.1 instead of Glassfish.
If you changed the host of Glassfish server then set it to localhost it should work.

netbeans starting of glassfish server is not supported

I'm unable to connect/deploy/run any app on a remote GlassFish server (4.0) and have been fighting this for a few days now.
Locally I'm running Windows 8, and I've tried with NetBeans 7.3 and 8.0. I have both Java 7.25 and 8 installed locally. The remote GF server is version 4.0 build 89, on a multihomed Windows 8 machine, Java 7 25 with remote administration enabled in Glassfish. I also have HTTP running at port 8888 rather than 8080 because of conflicts with other apps on the server.
At some point in the past I have been able to connect remotely via NB but not recently and I'm not totally sure what has changed. I'm unaware of any changes on the server.
I am no longer able to get the "+" next to Glassfish server in NetBeans, I cannot deploy/run/debug app on remote Glassfish server.
When I attempt to Deploy I receive the following deployment error:
Starting of server My Server is not supported. Please, start the server manually. See the server log for details.
Unfortunately, the server log doesn't have any errors relating to this. The only thing I see is the typical expired certificate.
Just to verify that I really was connecting, I looked at Fiddler and received the following:
HTTP/1.1 200 OK
Content-Type: text/html
Date: Wed, 14 May 2014 22:08:00 GMT
Transfer-Encoding: chunked
95
Signature-Version: 1.0
message: V3 cannot process this command at this time, please wait
use-main-children-attribute: false
exit-code: FAILURE
Connecting via web browser works fine to both the administration console as well as apps I have running at port 8888. I can load files via web interface, but not via NetBeans.
I originally had the problem with only Java 7 and Netbeans 7.3 but decided to upgrade both hoping that there might be some intermittent but that was fixed. However, that does not appear to be the case.
Any suggestions or thoughts?
I used this commands and it worked
Navigate to bin folder in GlassFish installation folder and do:
./asadmin start-domain
./asadmin change-admin-password
Setup the new admin password
./asadmin enable-secure-admin
Use the admin and password you have just configured
./asadmin stop-domain
./asadmin start-domain
Okay. I think I found the culprit. I did a system restore to just before the last MS critical update and now I can connect! I'm not sure if it was only the MS update versus an couple of Visual Studio SDKs that were added but after days of trying to figure this out, it's finally working again. PTL.
I encounter with the same issue. Problem solved by setting password for admin and enable secure admin. Use the following command would help:
adadmin
change-admin-password
Please notice that the default user name is admin, default password is empty(just press enter).
enable-secure-admin
Enter user name and the new password you have just set.
restart-domain

How to use RDC with VirtualBox and OSX

I'm trying to do some local RDC testing using VirtualBox. The host is OSX.8, the VM is ubuntu, and VirtualBox is version 4.1.22.
The VM starts fine without any problems. I shut it down and choose "Enable Server" from the Remote Display section of the Display options and start again, and again it starts fine. Note that the port is left default and the authentication is "null".
I start Microsoft's RDC (v2.1.0) and type in 'localhost' and get: You were disconnected from the Windows-based computer because of network problems.
I try 127.0.0.1 and get the same error. Then I type in the IP of my (host) computer and get the same error. I know the loopback address avoids the firewall but I turned it off anyway and got the same error.
I get the same error whether I'm using NAT networking or bridged. What am I doing wrong?
I should note that this is a vanilla install of VirtualBox and I haven't added any extensions or guest additions or anything like that.
Seems I'm doing everything right. What am I missing? Thanks for the help!
Problem Solved! You have to install the "VirtualBox 4.1.22 Oracle VM VirtualBox Extension Pack" (available on the VB download page) to make RDC work. I wish it would tell you this when you click "enable server" but I guess that's asking too much. I hope this helps someone else.

MongoDb connection refused

This is my first attempt to consume MongoDB. I've got Mongo running:
ps -ef | grep [m]ongo
mongodb 11023 1 0 Jun24 ? 00:00:03 /usr/lib/mongodb/mongod --config /etc/mongodb.conf
And the error comes as the result of doing
Datastore.save( stuff ); // (pseudo code)
The error:
Jun 27, 2011 3:20:29 PM com.mongodb.DBTCPConnector fetchMaxBsonObjectSize
WARNING: Exception determining maxBSON size using0
java.io.IOException: couldn't connect to [russ-elite-book/127.0.1.1:27017] bc:java.net.ConnectException: Connection refused
at com.mongodb.DBPort._open(DBPort.java:206)
at com.mongodb.DBPort.go(DBPort.java:94)
at com.mongodb.DBPort.go(DBPort.java:75)
at com.mongodb.DBPort.findOne(DBPort.java:129)
at com.mongodb.DBPort.runCommand(DBPort.java:138)
...
Note that I'm using 127.0.0.1:27017 for my connection, which works to the Mongo shell. Also, I get the admin page in the browser using http://localhost:28017.
Profuse thanks for any and all ideas!
I ran into the same issue because I upgraded my mongo using brew. To fix this issue. Look for the conf file(which might not be located in the bin directory where you start your mongodb from)
/usr/local/Cellar/mongodb-2.2.whatever/mongod.conf, and comment out the "bind_ip" property.
(I think it slightly bad form to answer one's own question, but in fact, the answer turns out to be none of those suggested. Nevertheless, my profuse thanks to all of them. When answering a question, one needs to be able to assume it's based on correctly installed and working software. I did not have that.)
I installed MongoDB using the Ubuntu Software Center. It worked from the shell and from the browser as noted elsewhere in this question. However, it did not work from Java (nor from Django either).
The problem, despite what it said in the Java stack trace, was simply "connection refused."
The solution is to install it from proper Mongo sources and not to trust the Ubuntu repository.
(Yes, this also frequently happens to other products obtain from there too, like Eclipse, but you know it's such a nice service that you want to trust it.)
If you want to read how I installed what then worked, check out http://www.javahotchocolate.com/tutorials/mongodb.html.
I had the same problem, but my solution was different. I was using "localhost" as the host name and changing it to "127.0.0.1" fixed it.
Most likely the Java driver cannot connect to the address specified.
Make sure that you can connect to that address 127.0.1.1:27017 using the shell and run "db.isMaster()".
Maybe it is an issue of 127.0.1.1 vs 127.0.0.1.
It turns out that it is an issue with the Java MongDB driver.
There are two solutions:
Using version 2.8 or higher of the Java driver.
Edit the configuration files and if it contains the line bind_ip = 127.0.0.1 or bind_ip = localhost, comment it out.
Eating humble pie...
As I showed in my comment to Russ Bateman's own answer, it seemed like an issue with the Ubuntu package at first. The real reason is that the config file that comes with it does define a value for bind_ip...
I ran into the same issue because I installed my mongo using apt-get. Here's how to fix it:
Find your mongod.conf file. In Ubuntu 14.04, it's /etc/mongod.conf
Open mongod.conf file and command the line bindIp = 127.0.0.1
Restart mongod
It appears that this is a security issue or an invalid url. If you used the default configuration, you should be able to access the http://yourmachine:28017. See if you can navigate to the admin page from this url. If you are able to navigate to the admin url, just replace the port number with 27017 in your app. It should work.
It's hard to say without seeing your .conf file contents. One thing I would recommend is running the mongo shell and seeing if you can connect, query, and write from it. This will help isolate server vs. a java client issue. Additionally it may give you a different form of the error which may be a hint.
Are you setting --port in your .conf file?
For me, it was a completely different solution. I am using Spring MVC framework, and all I had to do is to confirm that the configuration XML files are saying the same thing in the /target folder as well as the non-target folders. Once that was adjusted, everything worked. The problem was that everything worked when run from a STS, but when deployed, I had the mentioned error.

Memcache localhost connection oddity

When I try to connect to memcache using this code:
$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die ("Could not connect");
The call dies with the "Could not connect" error, but if I use localhost's IP:
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211) or die ("Could not connect");
It works! So what's my problem? Well, this new computer is the only development environment I've setup that's been sensitive to that difference. I'm not about to go changing the settings on any code for what seems to be a computer specific issue, but I can't figure out what could be causing this behaviour.
I'm running XP, memcached 1.2.4, and wampserver 2. I've checked the hosts file; it does have an entry for localhost, and the dns cache has been flushed... Any ideas?
Running "ping localhost", as Conspicuous Compiler suggested, revealed that localhost was resolving to ::1 rather than 127.0.0.1. This is the correct behaviour for a network using IPv6, but it was this that was confusing memcached. As I didn't require IPv6 at all, I uninstalled it;
Right-click on a Network Connection
> Properties > Highlight "Microsoft TCP/IP version 6" > Uninstall
All good again!
Please note; it may be that you can solve the issue less destructively by mapping ::1 to localhost as an entry in your hosts file. I didn't try it...