Installing Glassfish 3 on Mac OS X 10.8.2 fails in Domain Info setup - macos

I am a Glassfish newbie, though a Java and Unix veteran. I am running the shell script to install Java EE 6 SDK, including Glassfish 3 on my Mac.
bash-3.2# sh java_ee_sdk-6u4-unix.sh
Everything goes along fine until I get to the Domain Info screen. I am sticking with the default info (except for passwords):
Domain Name: domain1
Admin Port: 4848 <- I have verified with netstat that both ports are free
Http Port: 8080 <-
Username: admin
Password: xxxxxxxxxxxx
Service Name: domain1Service
+ Start domain after creation
When I click Next, I get 2 error dialogs that tell me the following:
Admin Port: Host name not found
Http Port: Host name not found
Does anyone know how to get past this?

I confirm, I correct the same problem by changing my hostname to localhost using the command line hostname localhost in linux.

Looks like something is wrong with your network config. Maybe your hosts file is missing the entry for localhost.
Check the file /private/etc/hosts for
127.0.0.1 localhost
You can also try to set your hostname with
sudo hostname localhost

The answer was relatively simple. I had to add the hostname configured with MacOS Settings as an alias for localhost into my /etc/hosts file. I'm not sure where MacOS keeps the host name. But the hostname command (i.e. gethostname) was returning 'airguitar', which is what Glassfish was trying to connect to. Since it wasn't in /etc/hosts, the hostname couldn't be found.

This is a problem that happens on many systems, It's happening on my linux as well. The solution is quite simple, as chuck almost got it.
Check your hosts file, on linux is under /etc/hosts. You'll probably have a file like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Check your hostname with the command hostname
[root#glassfish1 opt]# hostname
glassfish1
And add this host name to your hosts file like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 glassfish1
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
this did the trick for me.

Related

Mac won't connect to localhost server run from VirtualBox

My mac won't connect to localhost, I've tried with Safari and Mozilla, so it's not the browser, I tried other solutions I found on the internet, I ping 127.0.0.1 and it works correctly, if I run dscacheutil -q host -a name localhost I get the following:
name: localhost
ipv6_address: ::1
name: localhost
ip_address: 127.0.0.1
If I run apachectl configtest I get Syntax OK.
I've also read that my /etc/hosts might have been corrupted, this is how it looks like:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
I have no idea what else to try
EDIT: I'm trying to run an application (Hortonworks Sandbox) from a virtual machine (VirtualBox) in mac, I was advised to try port forwarding but this is what I see when I check the port forwarding in VirtualBox, seems like everything is in order:
I also tried to run Vagrant from VirtualBox and Mac couldn't connect to the localhost server when needed

MacOS doesn't resolve localhost to 127.0.0.1 (ignores hosts / apache vhosts)

I ran into the problem, that localhost redirects to a specific domain instead of 127.0.0.1.
My configuration is a local apache/mysql/php installation on MacOS Mojave using vhosts for different projects that are configured in hosts to redirect properly.
When I enter 127.0.0.1 in any browser, I get to my overview page lying in the www root. The same should happen, when I enter localhost in the browser, but instead it redirects to a domain of a project I was working on in the past. It happens also without network connection, so the configuration is on this machine.
My /etc/hosts file:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost project1.local project2.local
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
The first line seems to be ignored and localhost doesn't resolve to 127.0.0.1.
I only have two vhost configurations plus default configuration with no wrong redirection and also the httpd.conf lookes fine. I searched the whole machine with grep -lr "redirectiondomain.com" * without results. I tried with apache switched off with the same result and looked up the MacOS network settings but I can't find anything related to the wrong redirection neither any other solution on stackoverflow or google that solves my issue. Has anybody a clue how the wrong redirection of localhost could be set somewhere else?
Edit: My hostname in MacOS is set. I tried localhost without port, with :80 and :8080

Why does oracle connection opens so slow on mac os sierra?

I work on Docker with an oracle-xe-11g image. When I connect via ssh to Docker container, the connection is established immediately. But when I want to connect to oracle database using localhost:49162 ( port is forwarded to container's 1521 ) it will take about 15 - 25 seconds to open each connection.
It doesn't matter if I use JDBC connection or SQLDeveloper.
I have read that problem could be connected with DNS resolution, but I wasn't able to find any sufficient solution.
Slow DNS lookups
My hosts file:
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
My resolv.conf:
search home
nameserver 62.179.1.60
nameserver 62.179.1.61
System version:
macOS Sierra 10.12.3.
Has someone faced similar issues?
In my case, When I followed the link you mentioned in the question, and in particular when I changed the first line of my /etc/hosts of my mac from:
127.0.0.1 localhost
to:
127.0.0.1 localhost Muhammads-MacBook-Pro.local
Where Muhammads-MacBook-Pro.local is the output of the command hostname
Then it worked fine.

Torque/PBS can not find munge.socket.2

I am trying to create a virtual cluster for my MPI classes so i can work at home and not be at the university labs the whole day. I can not figure out for 2 days now how to fix this problem with munge.
The output of the problem i have is this
[root#localhost lumx]# qmgr -c "set server acl_hosts = mars"
munge_encode failed: Failed to access "/var/run/munge/munge.socket.2": No such file or directory (6)
Unable to communicate with localhost(127.0.0.1)
Communication failure.
qmgr: cannot connect to server (errno=15009) munge executable not found, unable to authenticate
My hosts file looks like this
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1 mpimaster localhost.localdomain localhost
I am tried to read as much as I could and I ended up with these guides,Getting started with Open MPI on Fedora, Installing Torque/PBS job scheduler on Ubuntu 14.04 LTS,TORQUE Arch Linux, http://juanjose.garciaripoll.com/fedora-cluster/5-torque-pbs-queue
I solved it. I just have to force it to start and use syslogs because there are some permission problems for now.
The command I use is
munged --force --syslog
For Opensuse Leap 15.X, you need to start the munge service by
sudo service munge start
sudo service munge status
If the service is shown as active, you can verify it by now typing:
munge -n
That should return some results like below:
MUNGE:AwQFAAAHiPEv+E6Ezy2HVHUwo5PZ2fkbbr4yP7pZZA9Yo6BWQdAFGVRNkhNbRkvd9zNAvnpg0iQzkjg+WW6HdIix48nKrA0QnjispII4RoT1UqZLh7ybIl5/WIvd3ta85v1KV8A=:

Correct configuration of /etc/hosts file for Oracle Forms and Reports on Virtualbox

I am trying to do an install of Oracle Forms and Reports on Weblogic 10.3.6. I am using virtual box and Oracle Linux 6.5.
Forms and Reports keeps failing on 'Executing: opmnctl startproc ias-component..'
After looking through what logs are avaiable and searching the net, I think the problem lies with my etc/hosts file - but I do not understand why or how to fix it.
My etc/hosts file consists of
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost.localdomain6
I also tried changing this file to
127.0.0.1 localhost localhost4
::1 localhost localhost6
Does anyone know what I should have in this file?
Usually you will leave the hosts file with the defaults and use DNS for name resolution. I would verify the DNS settings for your server. Then use ping to test name resolution.

Resources