Under Ubuntu configure Apache James encounters java.net.BindException: not enough privileges __.net

Source: Internet
Author: User

Because the project needs to send mail, the company only intranet, not on the network, can only build their own James Mail server, but in the construction of James encountered a problem.


Use of non-root users, after downloading, after decompression, to the bin directory, run Run.sh, reported as the following error:

Using Phoenix_home:/usr/local/coolcao/james-2.3.2
Using Phoenix_tmpdir:/usr/local/coolcao/james-2.3.2/temp
Using Java_home:/usr/local/coolcao/jdk1.7.0_45
Running Phoenix:

Phoenix 4.2

James Mail Server 2.3.2
Remote Manager Service started plain:4555
Org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:Component named "Pop3server" failed to pass Through the starting stage. (Reason:java.net.BindException: Insufficient permissions).
...
Caused by:java.net.BindException: Insufficient permissions
At Java.net.PlainSocketImpl.socketBind (Native method)
At Java.net.AbstractPlainSocketImpl.bind (abstractplainsocketimpl.java:376)
At Java.net.ServerSocket.bind (serversocket.java:376)
At Java.net.serversocket.<init> (serversocket.java:237)
At Org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory.createServerSocket ( defaultserversocketfactory.java:74)
At Org.apache.james.core.AbstractJamesService.initialize (abstractjamesservice.java:337)
At Org.apache.james.pop3server.POP3Server.initialize (pop3server.java:116)
At Org.apache.avalon.framework.container.ContainerUtil.initialize (containerutil.java:244)
At Org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup (lifecyclehelper.java:200)
... More



Main error in: caused by:java.net.BindException: Insufficient permissions

When the Pop3server was started, an exception occurred while binding the port number. Prompt permission is not enough.

I was puzzled, the entire JDK I was in my own directory, and the directory owner and belong to the group are my personal, there is not enough permissions.

Online check, there is said to be because Port 4555 was exim4 occupied, but I did not install EXIM4 this service.

There are also said to be able to use the sudo sh run.sh run can

After using sudo sh run.sh, the hint cannot find java_home

Okay, SU switched to root, and you can't find Java_home.

Add Java path to/etc/environment:

Use Source/etc/environment to refresh the environment, this can find java_home, use root switch to James's Bin directory and then Sh run.sh, this is OK:




For this problem, I have not thought of a better solution, root environment variables must be set every time, and every start James has to use Roog users, this is very uncomfortable one thing, I do not know whether there is a better solution, can teach me. Study for two days and see if you can solve it by using a non-root user to start James.

Presumably, the ports for the POP3 and SMTP services are 110 and 25, all less than 1024, so it is estimated that the root user must be used to run the James Bar. Is there a better solution for the great God?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.