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

Update op-node-entrypoint #202

Closed
wants to merge 1 commit into from
Closed

Conversation

Lusitaniae
Copy link

@Lusitaniae Lusitaniae commented Feb 22, 2024

This error was preventing building and starting both containers

[+] Running 2/0
 ✔ Container repo-geth-1  Running                                                                                                                        0.0s 
 ✔ Container repo-node-1  Running                                                                                                                        0.0s 
Attaching to geth-1, node-1
node-1  | ./op-node-entrypoint: 10: Bad substitution
node-1  | ./op-node-entrypoint: 10: [: Illegal number: 

after fixing it, still seeing something coming up but at least the nodes do start

 ✔ Container repo-geth-1  Recreated                                                                                                                      0.4s 
 ✔ Container repo-node-1  Recreated                                                                                                                     10.3s 
Attaching to geth-1, node-1
geth-1  | ./geth-entrypoint: 15: [[: not found
geth-1  | INFO [02-22|04:19:14.639] Starting geth on an OP network...        network=base-mainnet
geth-1  | INFO [02-22|04:19:14.640] Bumping default cache on mainnet         provided=1024 updated=4096
geth-1  | INFO [02-22|04:19:14.640] Enabling metrics collection 
geth-1  | INFO [02-22|04:19:14.640] Enabling stand-alone metrics HTTP endpoint address=0.0.0.0:6060
geth-1  | INFO [02-22|04:19:14.640] Starting metrics server                  addr=http://0.0.0.0:6060/debug/metrics
geth-1  | INFO [02-22|04:19:14.641] Maximum peer count                       ETH=100 LES=0 total=100
geth-1  | INFO [02-22|04:19:14.641] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
geth-1  | INFO [02-22|04:19:14.643] Enabling recording of key preimages since archive mode is used 
geth-1  | WARN [02-22|04:19:14.644] Disabled transaction unindexing for archive node 
geth-1  | INFO [02-22|04:19:14.644] Set global gas cap                       cap=50,000,000
geth-1  | INFO [02-22|04:19:14.773] Initializing the KZG library             backend=gokzg
geth-1  | INFO [02-22|04:19:14.785] Allocated trie memory caches             clean=1.20GiB dirty=0.00B
node-1  | ./op-node-entrypoint: 4: [[: not found
node-1  | waiting for geth to be ready
geth-1  | INFO [02-22|04:19:15.410] Using leveldb as the backing database 
geth-1  | INFO [02-22|04:19:15.410] Allocated cache and file handles         database=/data/geth/chaindata cache=2.00GiB handles=1,000,000,000
node-1  | waiting for geth to be ready
geth-1  | INFO [02-22|04:19:19.906] Using LevelDB as the backing database 
geth-1  | INFO [02-22|04:19:19.907] Opened ancient database                  database=/data/geth/chaindata/ancient/chain readonly=false
geth-1  | INFO [02-22|04:19:19.934] State scheme set to already existing     scheme=hash
geth-1  | INFO [02-22|04:19:22.616]  
geth-1  | INFO [02-22|04:19:22.616] --------------------------------------------------------------------------------------------------------------------------------------------------------- 
geth-1  | INFO [02-22|04:19:22.616] Chain ID:  8453 (Base) 
geth-1  | INFO [02-22|04:19:22.616] Consensus: Optimism 
geth-1  | INFO [02-22|04:19:22.616]  


@Lusitaniae
Copy link
Author

Lusitaniae commented Feb 22, 2024

this just looks like it's broken for months since 391f989?

docker exec -it repo-node-1 bash

root@6fd4fab25acc:/app# curl -s -w '%{http_code}' -o /dev/null "ws://geth:8551/ws/http"
000

root@6fd4fab25acc:/app# curl -s -w '%{http_code}' -o /dev/null "ws://geth:8551/ws/http" -v
* Protocol "ws" not supported or disabled in libcurl
* Closing connection -1

# reverting back to http returns 401 as expected
curl -s -w '%{http_code}' -o /dev/null "http://geth:8551"   
401

@mdehoog
Copy link
Contributor

mdehoog commented Feb 22, 2024

The configuration in main is correct... the variable substitution is designed to replace any instances of ws with http:

OP_NODE_L2_ENGINE_RPC=ws://localhost
echo ${OP_NODE_L2_ENGINE_RPC/ws/http}

results in (expected output):

http://localhost

with the change introduced in this PR, the output would be:

ws://localhost/ws/http

can you share what your value for $OP_NODE_L2_ENGINE_RPC is?

@Lusitaniae
Copy link
Author

Lusitaniae commented Feb 22, 2024

ok my bad I misunderstood the code

echo $OP_NODE_L2_ENGINE_RPC
ws://geth:8551

@mdehoog
Copy link
Contributor

mdehoog commented Feb 22, 2024

Are you using bash to run the script? See #124 and the fix in #123.

@Lusitaniae
Copy link
Author

Lusitaniae commented Feb 22, 2024

Awesome, thanks so much @mdehoog

Looks like the problem was solved by using bash:)

@Lusitaniae Lusitaniae closed this Feb 22, 2024
@Lusitaniae Lusitaniae deleted the patch-1 branch February 22, 2024 19:17
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

Successfully merging this pull request may close these issues.

2 participants