Tomcat 404 error trying to access webapp [duplicate] - web-services

Strange things happen. I can start Tomcat from both Eclipse and startup.sh. Runnig from Eclipse I can access localhost:8080 while running from startup.sh I cant. What could be the problem? Ubuntu 11.10. From Eclipse netstat displays 127.0.0.1:8080 as ESTABLISHED and from startup.sh as CLOSE_WAIT.

The problem was caused by incorrect installation. Everything is solved. Close.

Related

Vagrant not working - timeout while waiting for the machine to boot

I have installed the latest versions of Virtualbox v.5.2.6 and Vagrant v.2.0.1 on the windows machine with the Intel-Core-i5-4210U-Processor #1.70Ghz 2.40Ghz. I have added the homestead box by running the command:
vagrant box add laravel/homestead
But, on running the vagrant up it runs fine until this point:
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within the
configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that Vagrant
had when attempting to connect to the machine. These errors are
usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes. Verify
that authentication configurations are also setup properly, as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
On running the vagrant ssh-config I get:
Host homestead-7
HostName 127.0.0.1
User vagrant
Port 2222
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile C:/Users/MyUser/.vagrant.d/insecure_private_key
IdentitiesOnly yes
LogLevel FATAL
ForwardAgent yes
I have looked around and tried out different things, among others, to uninstall and install again both vagrant and virtualbox, but couldn't find any solution. How can I get this working?

How to run Boost.Asio server on port 80?

I have a simple boost.asio server which I am trying to run it on port 80. I am running the code inside a try-catch and I get a "bind" exception error. The value of boost::error_code is 13 which I think is "access denied".
I am running the code from Xcode on Mac running Yosemite. I also tried to run Xcode with sudo.
How can I fix this issue ?
Run as root.
The problem is that you don't have the permission to bind to a privileged port (<1024 on most systems).
If you're certain that the child process of Xcode runs as root, find out which process is already listening on port 80 (lsof and netstat)

Ejabberd server not getting started?

I have re-installed ejabberd server in my localhost.When i run sudo service ejabberd restart its no getting restarted.Instead its craeting error.The following error is shown in erl_crash.dump.All my configurations in conf file is correct.
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}}}},{k
I tried everything also killed process running on same ports.I there anything else to do to solve this issue ???
Solved the issue problem wan with my settings,and then restarted the server
using sudo service ejabbers restart.It worked

Local Django website won't load in browser

I'm guessing there's a very simple solution to this, but I searched every forum and setup guide and can't figure it out:
I built a Django/CentOS-6.3 environment on my local server (using VirtualBox and Vagrant). When I startup my server in the vagrant terminal with 'python manage.py runserver [::]:8000' it starts up with no errors.
Validating models...
0 errors found
May 31, 2013 - 13:56:15
Django version 1.5.1, using settings 'mysitename.settings'
Development server is running at http://[::]:8000/
Quit the server with CONTROL-C.
However, when I try to navigate to 'http://127.0.0.1:8001' in my browser (I set up port forwarding from port 8000 to port 8001 in my Vagrantfile), the browser just hangs for 5 minutes until it times out, then it returns the message:
> The connection was reset
> The connection to the server was reset while the page was loading.
> ...
This is the exact same message I get from the browser even after I shut down my local server. My computer obviously recognizes this as a forwarded port, because any other port I try (such as 8000) instantly returns an error saying that it can't establish a connection to the server at 127.0.0.1:8000.
With regard to the server files, I have done many similar setups with Django/Ubuntu in the past and have never had any issues, but there must be something different about Django/CentOS that is causing this to happen (or maybe I made a mistake someone in one of my server files). I have followed guides for setting up Django & PostgreSQL on CentOS, too, but to no avail. I'll comment some of the files I have created/edited below.
If anyone has a solution, or even has advice on where to start looking for errors, I would very much appreciate it.
If your network is configured correctly and your django application with
python manage.py runserver 0.0.0.0:8000
and you still can't access your django app from the VM host there is almost certainly a firewall issue. The solution above is good if you are running iptables.
I deployed CentOS 7 on a virtualbox VM from a Windows 7 host. I didn't know that this distribution uses firewalld, not iptables to control access.
if
ps -ae | grep firewall
returns something like
602 ? 00:00:00 firewalld
your system is running firewalld, not iptables. They do not run together.
To correct you VM so you can access your django site from the host use the commands:
firewall-cmd --zone=public --add-port=8000/tcp --permanent
firewall-cmd --reload
Many thanks to pablo v for pointing this out in the post "Access django server on virtual Machine".
the host's "127.0.0.1" is not the same as the guest's "127.0.0.1". Per default the command
python manage.py runserver
listens only to the guest's localhost. You should be able to test it from within the vm (use "vagrant ssh" to login) and run
curl -I http://127.0.0.1:8000/
The host as a different IP. To access the development server from the host you have to start it without ip restriction:
python manage.py runserver 0.0.0.0:8000
Yes:
python manage.py runserver [::]:8000
should be the same. But that's IPv6 syntax AFAIK. Are you sure that the "manage.py runserver" command supports IPv6 by default? I've never used ipv6 addresses w/ django, but looking at the source (https://github.com/django/django/blob/master/django/core/management/commands/runserver.py) there seams to be a flag that the default to False ("--ipv6"). Perhaps that's the "real" problem?
Regards,
For a similar problem,
This command worked like a charm for me
python manage.py runserver [::]:8001
Check your iptables, and stop it. Ubuntu commonly does not open the iptables when it starts.

Error: That IP address can't be assigned-to in Django?

I am running Debian 6 stable and I am trying to run Django locally using ./manage.py runserver command. This is what I get:
Validating models...
0 errors found
Django version 1.4.1, using settings 'genelaytics.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: That IP address can't be assigned-to.
I tried creating a new django project, still get the same error. What's the problem? I just fresh re-installed Debian yesterday because of this problem. This problem hasn't gone away. How can I fix it?
That's not related to Django but to your network configuraton. The very basic loopback interface is not working properly. If you want to learn more about networking and this layer.
Your problem is that your host cannot ping to itself, and so Django gets an error when getting the network address. That's in django/core/management/commands/runserver.py and is returned when it gets the system error 99 (EADDRNOTAVAIL).
Your network configuration at /etc/network/interfaces should have this piece at the beginning:
# The loopback network interface
auto lo
iface lo inet loopback
Check Debian documentation for full network configuration.
You are missing two lines of code in network configuration file. Edit the file as a root user with any text editor:
sudo gedit /etc/network/interfaces
Add these two lines:
auto lo
iface lo inet loopback
Restart the network using the following command:
sudo /etc/init.d/networking restart
Now, the localserver will work fine.