Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Can't run nile node in macOS #35

Closed
kanishkatn opened this issue Dec 9, 2021 · 10 comments
Closed

Can't run nile node in macOS #35

kanishkatn opened this issue Dec 9, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@kanishkatn
Copy link

Hi,

I'm on macOS Big Sur, and there is some system process running at port 5000. Cause of which, nile node fails to run.

Is there a way to specify the port in nile node ?

@fracek
Copy link
Contributor

fracek commented Dec 9, 2021

At the moment it's not possible to change the host or port, we should do that.

Note: starknet devnet already supports this, we need to pass the host and port flags to it.

@martriay
Copy link
Contributor

martriay commented Dec 9, 2021

Thanks for raising this! I'm on macOS but haven't stumbled upon this before. Would you be interested in opening a PR adding the feature @kanishkatn?

@martriay martriay added the enhancement New feature or request label Dec 9, 2021
@kanishkatn
Copy link
Author

@martriay Yes, would love to!

@milancermak
Copy link
Contributor

Just FYI, there was a post on Reddit about it some time ago. Seems the port squatting can be disabled via System preferences.

ftupas added a commit to ftupas/nile that referenced this issue Jan 3, 2022
* Add --port flag to subprocess for starknet-devnet
* Set default port to 5000
ftupas added a commit to ftupas/nile that referenced this issue Jan 3, 2022
* Add --port flag to subprocess for starknet-devnet
* Set default port to 5000
ftupas added a commit to ftupas/nile that referenced this issue Jan 3, 2022
* Add --port flag to subprocess for starknet-devnet
* Set default port to 5000
ftupas added a commit to ftupas/nile that referenced this issue Jan 3, 2022
* Add --host and --port flag to subprocess for starknet-devnet
* Set default host to localhost and default port to 5000
ftupas added a commit to ftupas/nile that referenced this issue Jan 6, 2022
* Add --host and --port flag to subprocess for starknet-devnet
* Set default host to localhost and default port to 5000
* Add functionality to modify node.json file to save GATEWAY information
ftupas added a commit to ftupas/nile that referenced this issue Jan 6, 2022
* Add --host and --port flag to subprocess for starknet-devnet
* Set default host to localhost and default port to 5000
* Add functionality to modify node.json file to save GATEWAY information
ftupas added a commit to ftupas/nile that referenced this issue Jan 6, 2022
* Add --host and --port flag to subprocess for starknet-devnet
* Set default host to localhost and default port to 5000
* Add functionality to modify node.json file to save GATEWAY information
ftupas added a commit to ftupas/nile that referenced this issue Jan 7, 2022
* Add --host and --port flag to subprocess for starknet-devnet
* Set default host to localhost and default port to 5000
* Add functionality to modify node.json file to save GATEWAY information
@Yijia-Chen
Copy link

Second this issue. #46 seems to have a good solution already; can someone please merge?

@martriay
Copy link
Contributor

martriay commented Jan 7, 2022

@Yijia-Chen hey there, bear in mind that merging it doesn't automatically makes it available since we'd have to also release a new version of nile. Until we release it, I suggest you clone the PR (or main when merged) and install it locally to use it today, now.

@Yijia-Chen
Copy link

Yijia-Chen commented Jan 10, 2022

I installed the newest commit including #46 using python -m pip install . in the project directory, and nile node now has the flag --port which works on 5001. However, nile deploy contract --alias contract_name still has no --port option, and when I run it after nile node, it gives me the error that port 5000 is occupied. Does the local nile deploy also use port 5000? Or am I doing something wrong here?

The detailed error message is as follows: subprocess.CalledProcessError: Command '['starknet', 'deploy', '--contract', 'artifacts/contract.json', '--gateway_url=http://localhost:5000/']' returned non-zero exit status 1. I am on macOS Monterey Version 12.0.1.

Can someone please help?

@ftupas
Copy link
Contributor

ftupas commented Jan 10, 2022

Hi @Yijia-Chen , normally when you run nile node --port 5001 you'll have a node.json file with the corresponding gateway URL. No need to add the port when executing nile deploy as it will target whatever is saved in this file. However you do need to run it in the same directory when you did nile node, could you try again and see if it works on your end?

@Yijia-Chen
Copy link

Okay now it works! I wasn't running them in the same directory. Thanks!

@martriay
Copy link
Contributor

I'm closing this issue since the feature is already in place.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants