RangeNetworks / OpenBTS-UMTS

3G UMTS Data Radio Access Network Node
GNU Affero General Public License v3.0
297 stars 196 forks source link

Junk socket file name for the CLI commands #21

Open sksharma1501 opened 6 years ago

sksharma1501 commented 6 years ago

In file OpenBTS-UMTS.cpp, the following line returns a junk character string for opening the CLI commands socket: struct sockaddr_un cmdSockName; cmdSockName.sun_family = AF_UNIX; const char* sockpath = gConfig.getStr("CLI.SocketPath").c_str();

It seems like the gConfig is not properly initialized at this point. A socket with junk name is opened in the folder from where OpenBTS-UMTS script is called. Then the CLI cannot locate this opened socket and all commands issued from OpenBTS-UMTSCLI fail with the error:

sending datagram: No such file or directory Is the remote application running?

I fixed the socket issue by hardcoding the filename as follows:

define DEFAULT_CMD_PATH "/var/run/OpenBTS-UMTS-command"

char sockpath[200];
    sprintf(sockpath, DEFAULT_CMD_PATH);
sherdil6 commented 1 year ago

@sksharma1501 Hi there. I am facing exact similar issue. Tried everything for many days but no success. I tried copying your code in OpenBTS-UMTS.cpp, but still getting same error.

sending datagram: No such file or directory Is the remote application running?

Can you please share the process about how this can be added or the process can be carried out. Thank you