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

Cannot call geth from browser #2127

Closed
nabilmahat opened this issue Jan 2, 2024 · 2 comments
Closed

Cannot call geth from browser #2127

nabilmahat opened this issue Jan 2, 2024 · 2 comments
Assignees

Comments

@nabilmahat
Copy link

nabilmahat commented Jan 2, 2024

System information

Geth version: Geth/v1.3.5-fe928d47-20231208
OS & Version: linux-amd64
Commit hash : (if develop)

Expected behaviour

should be able to call web3 client from postman

Actual behaviour

only be able to call web3 client from local

Steps to reproduce the behaviour

Command to run geth
/home/ubuntu/geth --config /home/ubuntu/config.toml --datadir /home/ubuntu/node --http --http.addr "0.0.0.0" --http.port 8545 --http.vhosts=* --http.api eth,net,web3,admin,debug --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 --maxpeers 24

localhost
image

instance ip
image

@nabilmahat
Copy link
Author

nabilmahat commented Jan 3, 2024

Issue solved.

I need to manually change HTTPHost in [Node] from "localhost" to "0.0.0.0"

command to start as below not working to serve it at address 0.0.0.0

/home/ubuntu/geth --config /home/ubuntu/config.toml --datadir /home/ubuntu/node --http --http.addr 0.0.0.0 --http.port 8545 --http.vhosts * --http.api eth,net,web3,admin,debug --cache 8000 --rpc.allow-unprotected-txs --history.transactions 0 --maxpeers 24

image

@buddh0
Copy link
Collaborator

buddh0 commented Jan 3, 2024

@nabilmahat happy to hear that you have solved this issue👍
indeed, there is a bug in v1.3.5, flags should have higher prority. It has been sovledin #2060, and contained in v1.3.6

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

No branches or pull requests

2 participants