Ask Your Question

Error connecting to localhost service

asked 2015-12-27 01:28:36 -0600

VinceK gravatar image

updated 2015-12-27 07:47:24 -0600

I've installed OpenLink virtuoso-opensource, checked that PHP / ODBC / virtuoso is working correctly, which it is from the command line, however getting the following browser error from Apache / PHP:

[unixODBC][OpenLink][Virtuoso iODBC Driver]CL033: Connect failed to localhost:1111 = localhost:1111.

In the first instance (before looking elsewhere), could this be a result of fedora selinux configuration or otherwise along these lines?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-27 08:59:02 -0600

VinceK gravatar image

To answer my own question.

A small SELinux alert box popped up lower left corner of the screen, which I haven't noticed before (although there have been a number of alerts).

Clicking on the details button gives suggested solutions:

SELinux is preventing httpd from name_connect access on the tcp_socket port 1111.

*****  Plugin connect_ports (85.9 confidence) suggests   *********************

If you want to allow httpd to connect to network port 1111
Then you need to modify the port type.
# semanage port -a -t PORT_TYPE -p tcp 1111
    where PORT_TYPE is one of the following: dns_port_t, dnssec_port_t, http_port_t, kerberos_port_t, ocsp_port_t.


*****  Plugin catchall_boolean (7.33 confidence) suggests   ******************

If you want to allow httpd to can network connect
Then you must tell SELinux about this by enabling the 'httpd_can_network_connect' boolean.
You can read 'None' man page for more details.
setsebool -P httpd_can_network_connect 1
edit flag offensive delete link more


You want to switch the httpd_can_network_connect boolean. Modifying the port type would allow apache to own that port, and presumably you have not-apache listening there.

randomuser gravatar imagerandomuser ( 2015-12-27 13:47:49 -0600 )edit

Question Tools

1 follower


Asked: 2015-12-27 01:28:36 -0600

Seen: 389 times

Last updated: Dec 27 '15