Unable to start Glassfish 3.1 even though port not occupied

后端 未结 10 1188
傲寒
傲寒 2021-02-07 02:11

I\'m having trouble starting Glassfish 3.1 on a newly setup Debian \"Squeeze\" server. This is a testing server that has been setup and the Glassfish i

相关标签:
10条回答
  • 2021-02-07 02:33

    Have you tried

    ps aux | grep glassfish
    

    to see if other instances are running?

    0 讨论(0)
  • 2021-02-07 02:34

    When I encountered this error, it turned out to be because the machine wasn't connected to the network and so couldn't bind to the IP address that was set in /etc/hosts and /etc/sysconfig/network-scripts/ifcfg-eth0 (I'm using CentOS). As soon as I enabled the network (mine is a VM) it worked fine.

    So the message was misleading in my case: there wasn't (as far as glassfish could tell) anything listening on port 4848 on the desired IP address, but there was evidently an error when trying to attach to that port because the machine itself wasn't connected to the network.

    0 讨论(0)
  • 2021-02-07 02:35

    Recently (only applicable on Amazon Web Services-AWS), I found that launching a server into VPC requires quite a bit of extra configuration (once off) to get started. A key clue:

     nslookup `hostname`
    

    should work. If it doesn't work, that's likely to be the reason.

    You can either: 1) launch a server into EC2-classic 2) configure your VPC / host to be able to run the command above successfully.

    Hope that helps.

    0 讨论(0)
  • 2021-02-07 02:38

    I resolve this by adding new hostname to /etc/host this is content of my host file :

    127.0.0.1   localhost
    127.0.1.1   mozquito     <--- this is what I add
    

    and then try start again your asadmin

    0 讨论(0)
  • 2021-02-07 02:41

    Small chance: Close Netbeans if it is running and try again.

    0 讨论(0)
  • 2021-02-07 02:43

    First of all check the $HOSTNAME and the etc/hosts file configuration , not try to find a problem with ps aux or netstat -aon .

    > echo $HOSTNAME
    

    response > server (or etc)

    > cat /etc/hosts
    

    in response if you cannot see "$HOSTNAME" after 127.0.0.1 then add it end of the string . Try again to execute the start-domain command.

    0 讨论(0)
提交回复
热议问题