[freeside-users] Accessing a socket fails in SelfService.pm

Erreu Gedmon eg at keyway.net
Mon Oct 30 11:05:41 PDT 2017


Hi Ernie,

I also experienced this issue during my install but I don't remember the exact fix. I dug through my installation notes and found I'd used these steps:

touch /usr/local/freeside/selfservice_socket
chown freeside /usr/local/freeside/selfservice_socket
chmod 600 /usr/local/freeside/selfservice_socket

Here's the directory on our production system:

# ls -halF /usr/local/freeside/

total 13452

drwxr-xr-x   2 freeside  wheel   512B Sep 17 21:45 ./
drwxr-xr-x  17 root      wheel   512B Jul 26  2016 ../
-rw-r--r--   1 freeside  wheel    13M Oct 30 10:40 selfservice.log
-rw-r--r--   1 freeside  wheel     0B Oct 30 10:40 selfservice.writelock
srwxr-xr-x   1 freeside  wheel     0B Sep 17 21:45 selfservice_socket=
-rw-r--r--   1 freeside  wheel     4B Sep 17 21:45 selfservice_socket.pid


My memory of this issue is vague, but I do recall that you have to make sure that your ssh is operational. In my case I double-checked that the back end server had passwordless ssh access for username freeside to the selfservice server by IP address, hostname, and FQDN:

# su - freeside
# ssh freeside-dev.lightspeed.ca
# ssh freeside-dev
# ssh 206.12.82.118


Erreu Gedmon

--
"You see persons and things not as they are but as you are."
        -- Anthony De Mello

On 10/30/2017 10:24 AM, Ernie Dunbar wrote:
>
> Yes, that was the thing that was jumping out at me too. But since the Apache server runs as the user "freeside", that's who owns that directory and has write access to that file and directory. Even chmod 777 on /usr/local/freeside does not allow the CGI script to create the socket, and creating the empty file /usr/local/freeside/selfservice_socket and granting 777 permissions on that produces the same "Connection refused" error.
>
> So... I haven't gotten anywhere on this yet.
>
>
> On 2017-10-28 09:28 AM, Roderick Anderson wrote:
>> Warning:  It has been 5+ years since I have done this stuff for a living.
>>
>> The thing that jumps out at me is permissions.  Make sure the directory where the socket is being created is writable by the freeside user not just the user apache is running as.
>>
>>
>> Rod
>> -- 
>>
>> On 10/27/2017 03:27 PM, Ernie Dunbar wrote:
>>> Hi everyone.
>>>
>>> I'm trying to set up the Freeside Selfservice web pages in Freeside 4.2. After trying to complete the installation process described in http://www.freeside.biz/mediawiki/index.php/Freeside:3:Documentation:Self-Service_Installation, I get the following error in my Apache error logs:
>>>
>>> [Fri Oct 27 11:32:42.273282 2017] [cgi:error] [pid 843] [client 172.103.224.36:54540] AH01215: connect to /usr/local/freeside/selfservice_socket: Connection refused at /usr/local/share/perl/5.20.2/FS/SelfService.pm line 199., referer: https://freeside-dev.lightspeed.ca/FS-SelfService/cgi/
>>>
>>> When I attempt to connect to this socket using the Linux `socat` command, I get much the same error:
>>>
>>> socat - UNIX-CONNECT:/usr/local/freeside/selfservice_socket
>>> 2017/10/27 15:23:59 socat[1784] E connect(5, AF=1 "/usr/local/freeside/selfservice_socket", 40): Connection refused
>>>
>>> I've read that you can't go and create a Unix socket by touching a file. Evidently, the CGI script is supposed to do the creating. But nuking that file and leaving the directory it sits in writable for the Apache server just breaks it thusly:
>>>
>>> [Fri Oct 27 15:26:54.642004 2017] [cgi:error] [pid 845] [client 172.103.224.36:60186] AH01215: connect to /usr/local/freeside/selfservice_socket: No such file or directory at /usr/local/share/perl/5.20.2/FS/SelfService.pm line 199., referer: https://freeside-dev.lightspeed.ca/FS-SelfService/cgi/
>>>
>>> So... what's wrong here?
>>>
>>>
>>>
>>> _______________________________________________
>>> freeside-users mailing list
>>> freeside-users at freeside.biz
>>> http://freeside.biz/cgi-bin/mailman/listinfo/freeside-users
>>>
>> _______________________________________________
>> freeside-users mailing list
>> freeside-users at freeside.biz
>> http://freeside.biz/cgi-bin/mailman/listinfo/freeside-users
>
> -- 
> --- 
> Lightspeed Communications and Dolphin Global Tel 
> VoIP, Web Hosting, Server Colocation, ADSL and Cable Internet 
> Systems and Operations department. 
> http://www.lightspeed.ca http://www.dolphintel.com 
> Tech Support: 604-482-1192 ext. 2
>
>
> _______________________________________________
> freeside-users mailing list
> freeside-users at freeside.biz
> http://freeside.biz/cgi-bin/mailman/listinfo/freeside-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://freeside.biz/pipermail/freeside-users/attachments/20171030/7d96f1f6/attachment.html>


More information about the freeside-users mailing list