Umbrel Home > v1.4 apps not running (exports.sh line 33 unexpected EOF)

hello,
my first big problems with umbrel on my umbrel home. updated from v1.3 to 1.4. after that i upgraded some apps (bitcoin node, electrs, lightning node, mempool). now after 2 days the apps were still updating. so i decided to restart my umbrel home. now, most of my apps are not running. spectr desktop, thunderhub, run the lighning are “not running” too. in the logs every app shows the same, here from bitcoin node:

Command failed with exit code 2: /opt/umbreld/source/modules/apps/legacy-compat/app-script logs bitcoin
/home/umbrel/umbrel/app-data/bitcoin/exports.sh: line 33: unexpected EOF while looking for matching `"'

the same error on all apps marked as “not running” (only thing that changes is the folder of the app).
please, i need help with that. i have no idea whats going on.

here my exports.sh. seems that the file is not complete:

umbrel@umbrel:~/umbrel/app-data/bitcoin$ cat exports.sh 
export APP_BITCOIN_IP="10.21.22.2"
export APP_BITCOIN_NODE_IP="10.21.21.8"
export APP_BITCOIN_TOR_PROXY_IP="10.21.22.10"
export APP_BITCOIN_I2P_DAEMON_IP="10.21.22.11"

export APP_BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin"
export APP_BITCOIN_RPC_PORT="8332"
export APP_BITCOIN_P2P_PORT="8333"
export APP_BITCOIN_TOR_PORT="8334"
export APP_BITCOIN_ZMQ_RAWBLOCK_PORT="28332"
export APP_BITCOIN_ZMQ_RAWTX_PORT="28333"
export APP_BITCOIN_ZMQ_HASHBLOCK_PORT="28334"
export APP_BITCOIN_ZMQ_SEQUENCE_PORT="28335"

BITCOIN_CHAIN="main"
BITCOIN_ENV_FILE="${EXPORTS_APP_DIR}/.env"

{
	BITCOIN_APP_CONFIG_FILE="${EXPORTS_APP_DIR}/data/app/bitcoin-config.json"
	if [[ -f "${BITCOIN_APP_CONFIG_FILE}" ]]
	then
		bitcoin_app_network=$(jq -r '.network' "${BITCOIN_APP_CONFIG_FILE}")
		case $bitcoin_app_network in
			"main")
				BITCOIN_NETWORK="mainnet";;
			"test")
				BITCOIN_NETWORK="testnet3";;
			"testnet4")
				BITCOIN_NETWORK="testnet4";;
			"signet")
				BITCOIN_NETWORK="signet";;
			"regtest")
umbrel@umbrel:~/umbrel/app-data/bitcoin$

same problem on six other apps, all with the same problem.

yah, i see the error (EOF) end of file…

I wonder, can you run the upgrade script once more to see if it can finish the migration?

maybe try…

Manually Complete the exports.sh File

  1. Backup the File: For each affected app (e.g., Bitcoin Node), back up the existing exports.sh:

cp ~/umbrel/app-data/bitcoin/exports.sh ~/umbrel/app-data/bitcoin/exports.sh.bak

  1. Edit the File: Open the file in a text editor (e.g., nano):

nano ~/umbrel/app-data/bitcoin/exports.sh

The file ends abruptly at “regtest”). Complete the case statement by adding the missing lines. Based on the typical structure of Umbrel’s exports.sh, append the following:

BITCOIN_NETWORK="regtest";; *) BITCOIN_NETWORK="mainnet";; esac else BITCOIN_NETWORK="mainnet" fi

} export BITCOIN_NETWORK

This closes the case statement, sets a default network (mainnet), and completes the script. Save and exit (Ctrl+O, Enter, Ctrl+Xinnano`).


Looks like this when ‘fixed’

export APP_BITCOIN_IP="10.21.22.2"
export APP_BITCOIN_NODE_IP="10.21.21.8"
export APP_BITCOIN_TOR_PROXY_IP="10.21.22.10"
export APP_BITCOIN_I2P_DAEMON_IP="10.21.22.11"

export APP_BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin"
export APP_BITCOIN_RPC_PORT="8332"
export APP_BITCOIN_P2P_PORT="8333"
export APP_BITCOIN_TOR_PORT="8334"
export APP_BITCOIN_ZMQ_RAWBLOCK_PORT="28332"
export APP_BITCOIN_ZMQ_RAWTX_PORT="28333"
export APP_BITCOIN_ZMQ_HASHBLOCK_PORT="28334"
export APP_BITCOIN_ZMQ_SEQUENCE_PORT="28335"

BITCOIN_CHAIN="main"
BITCOIN_ENV_FILE="${EXPORTS_APP_DIR}/.env"

{
	BITCOIN_APP_CONFIG_FILE="${EXPORTS_APP_DIR}/data/app/bitcoin-config.json"
	if [[ -f "${BITCOIN_APP_CONFIG_FILE}" ]]
	then
		bitcoin_app_network=$(jq -r '.network' "${BITCOIN_APP_CONFIG_FILE}")
		case $bitcoin_app_network in
			"main")
				BITCOIN_NETWORK="mainnet";;
			"test")
				BITCOIN_NETWORK="testnet3";;
			"testnet4")
				BITCOIN_NETWORK="testnet4";;
			"signet")
				BITCOIN_NETWORK="signet";;
			"regtest")
				BITCOIN_NETWORK="regtest";;
			*)
				BITCOIN_NETWORK="mainnet";;
		esac
	else
		BITCOIN_NETWORK="mainnet"
	fi
}
export BITCOIN_NETWORK
1 Like

hi, thank you for your help. first i would try to try the first option. do you think there is something wrong with the update from 1.3 to 1.4 or the update from the apps? how can i rerun the update script via console?

hi there,
i can’t say for sure, as i’ve not been through that before. :frowning:
it’s just odd that the file suddenly isn’t complete.

i have completed the config. bitcoin node started, also electrs. but the bitcoin node shows starting all the time (not in the dashboard, but when i start the app). but according to the log it gets new blocks. but this error is there too:

bitcoin_server_1       | umbrel-middleware
bitcoin_server_1       | Unable to obtain blockchain info
bitcoin_server_1       | /v1/bitcoind/widgets/stats
bitcoin_server_1       | BitcoindError: Unable to obtain blockchain info
bitcoin_server_1       |     at /app/services/bitcoind.js:23:18
bitcoin_server_1       |     at ClientRequest.<anonymous> (/app/node_modules/bitcoind-rpc/lib/index.js:116:7)
bitcoin_server_1       |     at ClientRequest.emit (events.js:314:20)
bitcoin_server_1       |     at Socket.socketErrorListener (_http_client.js:427:9)
bitcoin_server_1       |     at Socket.emit (events.js:314:20)
bitcoin_server_1       |     at emitErrorNT (internal/streams/destroy.js:92:8)
bitcoin_server_1       |     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
bitcoin_server_1       |     at /app/node_modules/async-listener/glue.js:188:31
bitcoin_server_1       |     at processTicksAndRejections (internal/process/task_queues.js:84:21)
bitcoin_server_1       | ::ffff:10.21.0.1 - - [Sun, 27 Apr 2025 14:54:44 GMT] "GET /v1/bitcoind/widgets/stats HTTP/1.1" 500 34 "-" "node-fetch"
bitcoin_server_1       | 
bitcoin_server_1       | umbrel-middleware

bitcoin_bitcoind_1     | 2025-04-27T14:47:19Z New block-relay-only v2 peer connected: version: 70016, blocks=894187, peer=24

electrs shows running if i start the app. but also shows “Connecting to Electrs server…”

after further analysis of the logs, i realized that the problem is probably deeper. i have now performed a complete reset. first to factory settings, then the umbrel-usb-reflasher (as described here) to set it up from scratch. of course, the blockchain must now be downloaded again. but i think this is the most sensible way.

yah, something got corrupted on the upgrade. good call on install. Sorry it came to that.

The error in the provided log block from bitcoin_server_1 is a BitcoindError: Unable to obtain blockchain info, occurring when the Umbrel middleware attempts to fetch blockchain statistics via the /v1/bitcoind/widgets/stats endpoint. This results in an HTTP 500 error, indicating a server-side failure. Meanwhile, the bitcoin_bitcoind_1 log shows the Bitcoin node is operational, connecting to peers and syncing blocks (e.g., block height 894187).

Error Breakdown

  • Error Message: BitcoindError: Unable to obtain blockchain info
    • This indicates that Umbrel’s middleware (running in the bitcoin_server_1 container) failed to query the Bitcoin daemon (bitcoind, running in bitcoin_bitcoind_1) for blockchain data, likely via an RPC call (e.g., getblockchaininfo).
  • Location: The error originates in /app/services/bitcoind.js:23:18, within the middleware’s JavaScript code, specifically when handling an RPC request.
  • Stack Trace:
    • The failure occurs during an HTTP client request (/app/node_modules/bitcoind-rpc/lib/index.js:116:7), triggered by a socket error (Socket.socketErrorListener).
    • This points to a low-level network or connection issue between the middleware and bitcoind.
  • HTTP Details: The request GET /v1/bitcoind/widgets/stats HTTP/1.1 returns a 500 status code, confirming the middleware couldn’t fulfill the dashboard’s request for node stats.
  • Context from bitcoin_bitcoind_1: The node is running and syncing (new peer connected at block 894187), so bitcoind itself is functional. The issue lies in the middleware’s ability to communicate with it.

Likely Causes

The error suggests a breakdown in the RPC communication between Umbrel’s middleware (bitcoin_server_1) and bitcoind (bitcoin_bitcoind_1). Based on the logs and your context (post-v1.4 upgrade, app issues, and config file fix), here are the probable reasons:

  1. RPC Connection Failure:
  • The middleware can’t reach bitcoind’s RPC interface due to incorrect credentials, port, or host settings in bitcoin.conf or the middleware’s config.
  • The socket error in the stack trace (Socket.socketErrorListener) suggests a network-level failure, such as a refused connection or timeout.
  1. Config File Fix Fallout:
  • The earlier fix to a config file (possibly bitcoin.conf or a Docker config) might have introduced invalid RPC settings or syntax errors, breaking middleware communication.
  • For example, a mismatched rpcuser, rpcpassword, or rpcport could cause this.
  1. Docker Networking Issue:
  • The bitcoin_server_1 and bitcoin_bitcoind_1 containers might not be communicating properly within Umbrel’s Docker network (umbrel_default).
  • The IP ::ffff:10.21.0.1 in the log suggests an internal Docker network request, but a misconfigured network or container could block it.
  1. Bitcoind Still Initializing:
  • If bitcoind is still in initial block download (IBD) or reindexing post-upgrade, RPC queries might fail intermittently until it’s fully synced or stable.
  • However, the peer connection log suggests bitcoind is functional, so this is less likely.
  1. Middleware Bug Post-Upgrade:
  • The v1.4 upgrade or app updates might have introduced a bug in Umbrel’s middleware (bitcoin_server_1), as seen in community reports about similar RPC errors after upgrades.
  • The exports.sh error you mentioned previously could also be related, if it disrupted container configs.

Why It’s Happening

The middleware is trying to fetch stats for the Umbrel dashboard (e.g., sync progress, block height) but can’t talk to bitcoind’s RPC interface. The socket error points to a network or authentication issue, likely exacerbated by your config file fix or the v1.4 upgrade’s changes to app configs or Docker setups. The fact that bitcoind is syncing blocks confirms the node itself is fine; the problem is isolated to the middleware’s interaction with it.

1 Like

thank you very much for your really detailed explanations. after reading through what you wrote, i am sure that the reinstallation is the easier way and, despite resyncing the blockchain, the fastest and cleanest way. the time that is probably needed to smooth everything out again is probably in no relation to the reinstallation.
(sync is currently at 4.35% :sweat_smile:)

yah, i totally agree. if i was in that position i’d be wondering what else is broken and when the next thing is going ot break. sucks that the migration/upgrade didn’t go well.

Probably worth flagging @lukechilds / Tech Support on this IF it’s common. This way a more robust / reslilent migration script can be written with some post migration checking.