Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netstat deprecated and not available on some centos 7 distributions #560

Closed
TylerJewell opened this issue Aug 10, 2016 · 1 comment
Closed
Assignees
Milestone

Comments

@TylerJewell
Copy link
Contributor

When doing a default installation of Codenvy OnPrem for google cloud with their centos 7 node, we got a series of errors.

/dev/fd/63: line 902: netstat: command not found

Upon investigation, netstat is not installed by default. Further investigation shows this command is the error.

echo $(netstat -ano | egrep LISTEN | egrep tcp | egrep ":80\s")

The solution is to replace netstat -ano with ss -a. See more details here:
https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/#netstat

dmytro-ndp pushed a commit that referenced this issue Aug 12, 2016
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
dmytro-ndp pushed a commit that referenced this issue Aug 12, 2016
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
dmytro-ndp pushed a commit that referenced this issue Aug 12, 2016
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
dmytro-ndp pushed a commit that referenced this issue Aug 12, 2016
(#560) replace deprecated 'netstat' command by 'ss'
@dmytro-ndp dmytro-ndp added this to the 4.7.0 milestone Aug 12, 2016
@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Aug 31, 2016

@TylerJewell: take into account that requesting ss command through ssh producing an error 'command not found':

$ ssh -o StrictHostKeyChecking=no -i /home/$USER/.vagrant.d/insecure_private_key vagrant@192.168.56.110 "ss"
bash: ss: command not found

It is needed to add '. /etc/profile' when calling ss, or bootsrtap script which uses ss:
$ ssh -o StrictHostKeyChecking=no -i /home/$USER/.vagrant.d/insecure_private_key vagrant@192.168.56.110 ". /etc/profile && ss"

Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
u_str ESTAB 0 0 /var/run/postgresql/.s.PGSQL.5432 2773621 * 2774316
u_str ESTAB 0 0 * 2316468 * 2316469
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants