2017-04-14 7 views
0

Google Cloud Dataproc을 사용하여 Jupyter 노트북을 실행했습니다 (다음 안내에 따라 : https://cloud.google.com/dataproc/docs/tutorials/jupyter-notebook).클러스터를 중지 한 후 Google Cloud Dataproc 클러스터에서 Jupyter 노트북을 다시 열 수 없습니다.

노트북을 실행하고 저장 한 다음 나중에 어느 시점에서 클러스터를 중지했습니다 (GUI 사용). 그런 후에 나는 클러스터를 다시 시작하고 같은 지시 다시 Jupyter 노트북을 실행하려고하지만 크롬에서 Jupyter을 열 때 마지막 단계에서, 내가 얻을 : 또한

"This site can't be reached. The webpage at http://<my-cluster-name>:8123/ might be temporarily down or it may have moved permanently to a new web address. ERR_SOCKS_CONNECTION_FAILED." 

(I이 알고하지 않습니다 내 브라우저를 구성 터미널 창에) 도움이, 내가 메시지가 : 내 클러스터에-에드 ssh를 터미널 창에서

ERROR:child_thread_impl.cc(762)] Request for unknown Channel-associated interface: ui::mojom::GpuMain 
Google Chrome[695:8548] NSWindow warning: adding an unknown subview: <FullSizeContentView: 0x7fdfd3e291e0>. Break on NSLog to debug. 
Google Chrome[695:8548] Call stack: 
(
"+callStackSymbols disabled for performance reasons" 
) 

을 나는이 메시지가 :

또한
channel 3: open failed: connect failed: Connection refused 
channel 4: open failed: connect failed: Connection refused 
channel 5: open failed: connect failed: Connection refused  
channel 6: open failed: connect failed: Connection refused 
channel 12: open failed: connect failed: Connection refused 
channel 12: open failed: administratively prohibited: open failed 
channel 13: open failed: administratively prohibited: open failed 
channel 14: open failed: administratively prohibited: open failed 
channel 14: open failed: connect failed: Connection refused 
channel 8: open failed: connect failed: Connection refused 

, 귀 나는 클러스터를 멈추기 전에 클러스터의 노트북을 닫고 클러스터와의 연결을 끊은 다음 주피터 노트북을 다시 열 수있었습니다. 클러스터를 중지 한 후에 만이 문제에 부딪혔습니다. 무슨 일이 일어날 지 모르는 어떤 아이디어?

+0

[Google 클라우드 가상 머신 (컴퓨팅 엔진)을 껐다 켠 후에 동적 포트 전달이 실패 할 수 있음] (http://stackoverflow.com/questions/42556490/dynamic-port-forwarding-fails-after-turning- off-and-on-google-cloud-virtual-mach) – tix

답변

1

현재 initialization actionlaunch-jupyter-kernel.sh을 호출하는 jupyter 노트북 서비스를 명시 적으로 실행하기 때문입니다. 초기화 작업은 시작시 다시 실행되지 않는다는 점에서 GCE 시작 스크립트와 동일하지 않습니다. 의도는 일반적으로 초기화 동작이 멱등수 일 필요는 없다는 것입니다. 그러나 시작시 다시 시작하려면 init.d/systemd configs를 명시 적으로 추가해야합니다. 일회성 케이스

, 당신은 단지 SSH를 마스터로, 다음 수행 할 수 있습니다이 시작시 자동으로 수행하려면

sudo su 
source /etc/profile.d/conda.sh 
nohup jupyter notebook --allow-root --no-browser >> /var/log/jupyter_notebook.log 2>&1 & 

, 당신은 startup script via GCE metadata에 그것을 넣어 시도 할 수 있습니다,하지만 클러스터 생성시에 그렇게하면 Dataproc 초기화 작업과 충돌하지 않도록해야합니다 (또한 시작 스크립트가 dataproc init 작업 전에 실행될 수 있으므로 처음 시도 할 때 조용히 실패하라).

장기적으로 초기화 작업을 업데이트하여 init.d/systemd에 항목을 추가해야하므로 init 작업 자체가 재부팅시 자동 재시작을 구성합니다. 현재이 문제에 헌신하는 사람은 아무도 없지만, 당신이나 당신이 아는 사람이 과제에 부합된다면, 기여는 항상 높이 평가됩니다. 이 기능을 추적하기 위해 https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/issues/108을 제출했습니다.

0

ssh를 사용하여 마스터 컴퓨터에 연결하여 문제를 해결하고 systemd 서비스를 만들었습니다 (위의 dennis-huo의 설명을 따르십시오).

  1. 이동를/usr/lib 디렉토리/systemd/시스템
  2. sudo는 스와
  3. 내용으로 "jupyter-notebook.service"라는 systemd 유닛 파일을 만들

    [Unit] 
    Description=Start Jupyter Notebook Server at reboot 
    
    [Service] 
    Type=simple 
    ExecStart=/opt/conda/bin/jupyter notebook --allow-root --no-browser 
    
    [Install] 
    WantedBy=multi-user.target 
    
  4. systemctl 데몬 -reload

  5. systemctl enable jupyter-notebook.service
  6. sys temctl start jupyter-notebook.서비스

다음 단계는 위 코드를 dataproc-initialization-actions에 포함시키는 것입니다. 도움이 되길 바랍니다.