yangwwei commented on pull request #369:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/369#issuecomment-1059404540


   I think it is because the last port-forwarding wasn't killed so the port was 
occupied, like @ronazhan mentioned in [this 
comment](https://github.com/apache/incubator-yunikorn-k8shim/pull/369#issuecomment-1055035338).
 I have tried the following steps locally:
   
   1. start YK
   2. do a port-forwarding
   3. kill YK pod
   
   and I get
   
   ```
   kubectl port-forward svc/yunikorn-service 9889:9889
   Forwarding from 127.0.0.1:9889 -> 9889
   Forwarding from [::1]:9889 -> 9889
   Handling connection for 9889
   Handling connection for 9889
   E0304 10:12:28.165342   65184 portforward.go:400] an error occurred 
forwarding 9889 -> 9889: error forwarding port 9889 to pod 
a1c96c399c12d2a7b14fe58cbe9f320c1a251f80e3bad71e56010890762297e1, uid : Error: 
No such container: 
a1c96c399c12d2a7b14fe58cbe9f320c1a251f80e3bad71e56010890762297e1
   E0304 10:12:28.166506   65184 portforward.go:400] an error occurred 
forwarding 9889 -> 9889: error forwarding port 9889 to pod 
a1c96c399c12d2a7b14fe58cbe9f320c1a251f80e3bad71e56010890762297e1, uid : Error: 
No such container: 
a1c96c399c12d2a7b14fe58cbe9f320c1a251f80e3bad71e56010890762297e1
   Handling connection for 9889
   ```
   
   the port is still occupied and I got the following exception if I try to do 
port-forwarding again:
   
   ```
   kubectl port-forward svc/yunikorn-service 9889:9889
   Unable to listen on port 9889: Listeners failed to create with the following 
errors: [unable to create listener: Error listen tcp4 127.0.0.1:9889: bind: 
address already in use unable to create listener: Error listen tcp6 [::1]:9889: 
bind: address already in use]
   error: unable to listen on any of the requested ports: [{9889 9889}]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to