Two jupyter notebook running at the same port









up vote
0
down vote

favorite












I am using the Ubuntu sub-system on Windows 10.



I opened a terminal and entered the command:



jupyter notebook 


and then a notebook is started at port 8888. Without closing this one, I opened another terminal and typed in jupyter notebook again, the new terminal says that:



[I 15:09:00.576 NotebookApp] The Jupyter Notebook is running at:
[I 15:09:00.577 NotebookApp] http://localhost:8888/?token=


with a different token number from the notebook running in the first terminal. If I open localhost:8888 with my browser and enter the token from the second terminal, jupyter rejects me, while the token from the first terminal passes.



I was wondering why can there be two notebooks running on the same 8888 port? If I kill the notebook in the second terminal, will it affect the notebook running in the first terminal?










share|improve this question























  • if you open a new notebook it will need to be a different port. It will throw this error: The port 8888 is already in use, trying another port/
    – MEdwin
    Nov 9 at 15:24















up vote
0
down vote

favorite












I am using the Ubuntu sub-system on Windows 10.



I opened a terminal and entered the command:



jupyter notebook 


and then a notebook is started at port 8888. Without closing this one, I opened another terminal and typed in jupyter notebook again, the new terminal says that:



[I 15:09:00.576 NotebookApp] The Jupyter Notebook is running at:
[I 15:09:00.577 NotebookApp] http://localhost:8888/?token=


with a different token number from the notebook running in the first terminal. If I open localhost:8888 with my browser and enter the token from the second terminal, jupyter rejects me, while the token from the first terminal passes.



I was wondering why can there be two notebooks running on the same 8888 port? If I kill the notebook in the second terminal, will it affect the notebook running in the first terminal?










share|improve this question























  • if you open a new notebook it will need to be a different port. It will throw this error: The port 8888 is already in use, trying another port/
    – MEdwin
    Nov 9 at 15:24













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am using the Ubuntu sub-system on Windows 10.



I opened a terminal and entered the command:



jupyter notebook 


and then a notebook is started at port 8888. Without closing this one, I opened another terminal and typed in jupyter notebook again, the new terminal says that:



[I 15:09:00.576 NotebookApp] The Jupyter Notebook is running at:
[I 15:09:00.577 NotebookApp] http://localhost:8888/?token=


with a different token number from the notebook running in the first terminal. If I open localhost:8888 with my browser and enter the token from the second terminal, jupyter rejects me, while the token from the first terminal passes.



I was wondering why can there be two notebooks running on the same 8888 port? If I kill the notebook in the second terminal, will it affect the notebook running in the first terminal?










share|improve this question















I am using the Ubuntu sub-system on Windows 10.



I opened a terminal and entered the command:



jupyter notebook 


and then a notebook is started at port 8888. Without closing this one, I opened another terminal and typed in jupyter notebook again, the new terminal says that:



[I 15:09:00.576 NotebookApp] The Jupyter Notebook is running at:
[I 15:09:00.577 NotebookApp] http://localhost:8888/?token=


with a different token number from the notebook running in the first terminal. If I open localhost:8888 with my browser and enter the token from the second terminal, jupyter rejects me, while the token from the first terminal passes.



I was wondering why can there be two notebooks running on the same 8888 port? If I kill the notebook in the second terminal, will it affect the notebook running in the first terminal?







python windows ubuntu jupyter-notebook jupyter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 15:22

























asked Nov 9 at 15:17









Jinhua Wang

418415




418415











  • if you open a new notebook it will need to be a different port. It will throw this error: The port 8888 is already in use, trying another port/
    – MEdwin
    Nov 9 at 15:24

















  • if you open a new notebook it will need to be a different port. It will throw this error: The port 8888 is already in use, trying another port/
    – MEdwin
    Nov 9 at 15:24
















if you open a new notebook it will need to be a different port. It will throw this error: The port 8888 is already in use, trying another port/
– MEdwin
Nov 9 at 15:24





if you open a new notebook it will need to be a different port. It will throw this error: The port 8888 is already in use, trying another port/
– MEdwin
Nov 9 at 15:24













1 Answer
1






active

oldest

votes

















up vote
1
down vote













Short answer - you can't have 2 notebooks server running on the same port.



From Jupyter documentation:




You can start more than one notebook server at the same time, if you
want to work on notebooks in different directories. By default the
first notebook server starts on port 8888, and later notebook servers
search for ports near that one.
You can also manually specify the port
with the --port option.




This is probably a networking issue or caused by your environment configuration. Basically, For TCP/IP you can only have one application listening on the same port at one time. Now if you had 2 network cards, you could have one application listen on the first IP and the second one on the second IP using the same port number.
For UDP (Multicasts), multiple applications can subscribe to the same port.



You can always run the second server with --port option and port of your choosing.






share|improve this answer






















  • But if I can't have two notebooks running on the same port, why would the second notebook successfully start and tells me that it is listening on 8888? If I remember correctly, on mac osx, it will simply choose a different port (like 8889) by default.
    – Jinhua Wang
    Nov 9 at 15:21










  • Something tells me that this is due to Windows 10 Ubuntu's weird behavior ...
    – Jinhua Wang
    Nov 9 at 15:22










  • You shouldn't be possible to run 2 Jupiter servers on the same port. This issue is strange. But just to clarify you running both jupyter servers on VM upon Win10 ?
    – Raoslaw Szamszur
    Nov 9 at 15:25










  • Window's now include a distribution of Ubuntu - you can download it from the app store. I don't think it is a VM.
    – Jinhua Wang
    Nov 9 at 15:26










  • @JinhuaWang Well then this may be the cause. I woudl suggest to use VM :). Or just specify --port for the second jupyter notebook.
    – Raoslaw Szamszur
    Nov 9 at 15:28










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228455%2ftwo-jupyter-notebook-running-at-the-same-port%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













Short answer - you can't have 2 notebooks server running on the same port.



From Jupyter documentation:




You can start more than one notebook server at the same time, if you
want to work on notebooks in different directories. By default the
first notebook server starts on port 8888, and later notebook servers
search for ports near that one.
You can also manually specify the port
with the --port option.




This is probably a networking issue or caused by your environment configuration. Basically, For TCP/IP you can only have one application listening on the same port at one time. Now if you had 2 network cards, you could have one application listen on the first IP and the second one on the second IP using the same port number.
For UDP (Multicasts), multiple applications can subscribe to the same port.



You can always run the second server with --port option and port of your choosing.






share|improve this answer






















  • But if I can't have two notebooks running on the same port, why would the second notebook successfully start and tells me that it is listening on 8888? If I remember correctly, on mac osx, it will simply choose a different port (like 8889) by default.
    – Jinhua Wang
    Nov 9 at 15:21










  • Something tells me that this is due to Windows 10 Ubuntu's weird behavior ...
    – Jinhua Wang
    Nov 9 at 15:22










  • You shouldn't be possible to run 2 Jupiter servers on the same port. This issue is strange. But just to clarify you running both jupyter servers on VM upon Win10 ?
    – Raoslaw Szamszur
    Nov 9 at 15:25










  • Window's now include a distribution of Ubuntu - you can download it from the app store. I don't think it is a VM.
    – Jinhua Wang
    Nov 9 at 15:26










  • @JinhuaWang Well then this may be the cause. I woudl suggest to use VM :). Or just specify --port for the second jupyter notebook.
    – Raoslaw Szamszur
    Nov 9 at 15:28














up vote
1
down vote













Short answer - you can't have 2 notebooks server running on the same port.



From Jupyter documentation:




You can start more than one notebook server at the same time, if you
want to work on notebooks in different directories. By default the
first notebook server starts on port 8888, and later notebook servers
search for ports near that one.
You can also manually specify the port
with the --port option.




This is probably a networking issue or caused by your environment configuration. Basically, For TCP/IP you can only have one application listening on the same port at one time. Now if you had 2 network cards, you could have one application listen on the first IP and the second one on the second IP using the same port number.
For UDP (Multicasts), multiple applications can subscribe to the same port.



You can always run the second server with --port option and port of your choosing.






share|improve this answer






















  • But if I can't have two notebooks running on the same port, why would the second notebook successfully start and tells me that it is listening on 8888? If I remember correctly, on mac osx, it will simply choose a different port (like 8889) by default.
    – Jinhua Wang
    Nov 9 at 15:21










  • Something tells me that this is due to Windows 10 Ubuntu's weird behavior ...
    – Jinhua Wang
    Nov 9 at 15:22










  • You shouldn't be possible to run 2 Jupiter servers on the same port. This issue is strange. But just to clarify you running both jupyter servers on VM upon Win10 ?
    – Raoslaw Szamszur
    Nov 9 at 15:25










  • Window's now include a distribution of Ubuntu - you can download it from the app store. I don't think it is a VM.
    – Jinhua Wang
    Nov 9 at 15:26










  • @JinhuaWang Well then this may be the cause. I woudl suggest to use VM :). Or just specify --port for the second jupyter notebook.
    – Raoslaw Szamszur
    Nov 9 at 15:28












up vote
1
down vote










up vote
1
down vote









Short answer - you can't have 2 notebooks server running on the same port.



From Jupyter documentation:




You can start more than one notebook server at the same time, if you
want to work on notebooks in different directories. By default the
first notebook server starts on port 8888, and later notebook servers
search for ports near that one.
You can also manually specify the port
with the --port option.




This is probably a networking issue or caused by your environment configuration. Basically, For TCP/IP you can only have one application listening on the same port at one time. Now if you had 2 network cards, you could have one application listen on the first IP and the second one on the second IP using the same port number.
For UDP (Multicasts), multiple applications can subscribe to the same port.



You can always run the second server with --port option and port of your choosing.






share|improve this answer














Short answer - you can't have 2 notebooks server running on the same port.



From Jupyter documentation:




You can start more than one notebook server at the same time, if you
want to work on notebooks in different directories. By default the
first notebook server starts on port 8888, and later notebook servers
search for ports near that one.
You can also manually specify the port
with the --port option.




This is probably a networking issue or caused by your environment configuration. Basically, For TCP/IP you can only have one application listening on the same port at one time. Now if you had 2 network cards, you could have one application listen on the first IP and the second one on the second IP using the same port number.
For UDP (Multicasts), multiple applications can subscribe to the same port.



You can always run the second server with --port option and port of your choosing.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 9 at 15:31

























answered Nov 9 at 15:20









Raoslaw Szamszur

60114




60114











  • But if I can't have two notebooks running on the same port, why would the second notebook successfully start and tells me that it is listening on 8888? If I remember correctly, on mac osx, it will simply choose a different port (like 8889) by default.
    – Jinhua Wang
    Nov 9 at 15:21










  • Something tells me that this is due to Windows 10 Ubuntu's weird behavior ...
    – Jinhua Wang
    Nov 9 at 15:22










  • You shouldn't be possible to run 2 Jupiter servers on the same port. This issue is strange. But just to clarify you running both jupyter servers on VM upon Win10 ?
    – Raoslaw Szamszur
    Nov 9 at 15:25










  • Window's now include a distribution of Ubuntu - you can download it from the app store. I don't think it is a VM.
    – Jinhua Wang
    Nov 9 at 15:26










  • @JinhuaWang Well then this may be the cause. I woudl suggest to use VM :). Or just specify --port for the second jupyter notebook.
    – Raoslaw Szamszur
    Nov 9 at 15:28
















  • But if I can't have two notebooks running on the same port, why would the second notebook successfully start and tells me that it is listening on 8888? If I remember correctly, on mac osx, it will simply choose a different port (like 8889) by default.
    – Jinhua Wang
    Nov 9 at 15:21










  • Something tells me that this is due to Windows 10 Ubuntu's weird behavior ...
    – Jinhua Wang
    Nov 9 at 15:22










  • You shouldn't be possible to run 2 Jupiter servers on the same port. This issue is strange. But just to clarify you running both jupyter servers on VM upon Win10 ?
    – Raoslaw Szamszur
    Nov 9 at 15:25










  • Window's now include a distribution of Ubuntu - you can download it from the app store. I don't think it is a VM.
    – Jinhua Wang
    Nov 9 at 15:26










  • @JinhuaWang Well then this may be the cause. I woudl suggest to use VM :). Or just specify --port for the second jupyter notebook.
    – Raoslaw Szamszur
    Nov 9 at 15:28















But if I can't have two notebooks running on the same port, why would the second notebook successfully start and tells me that it is listening on 8888? If I remember correctly, on mac osx, it will simply choose a different port (like 8889) by default.
– Jinhua Wang
Nov 9 at 15:21




But if I can't have two notebooks running on the same port, why would the second notebook successfully start and tells me that it is listening on 8888? If I remember correctly, on mac osx, it will simply choose a different port (like 8889) by default.
– Jinhua Wang
Nov 9 at 15:21












Something tells me that this is due to Windows 10 Ubuntu's weird behavior ...
– Jinhua Wang
Nov 9 at 15:22




Something tells me that this is due to Windows 10 Ubuntu's weird behavior ...
– Jinhua Wang
Nov 9 at 15:22












You shouldn't be possible to run 2 Jupiter servers on the same port. This issue is strange. But just to clarify you running both jupyter servers on VM upon Win10 ?
– Raoslaw Szamszur
Nov 9 at 15:25




You shouldn't be possible to run 2 Jupiter servers on the same port. This issue is strange. But just to clarify you running both jupyter servers on VM upon Win10 ?
– Raoslaw Szamszur
Nov 9 at 15:25












Window's now include a distribution of Ubuntu - you can download it from the app store. I don't think it is a VM.
– Jinhua Wang
Nov 9 at 15:26




Window's now include a distribution of Ubuntu - you can download it from the app store. I don't think it is a VM.
– Jinhua Wang
Nov 9 at 15:26












@JinhuaWang Well then this may be the cause. I woudl suggest to use VM :). Or just specify --port for the second jupyter notebook.
– Raoslaw Szamszur
Nov 9 at 15:28




@JinhuaWang Well then this may be the cause. I woudl suggest to use VM :). Or just specify --port for the second jupyter notebook.
– Raoslaw Szamszur
Nov 9 at 15:28

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53228455%2ftwo-jupyter-notebook-running-at-the-same-port%23new-answer', 'question_page');

);

Post as a guest














































































Popular posts from this blog

Ruanda

Makov (Slowakei)

Kleinkühnau