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

Failed to open TCP port 'localhost:3306': couldn't bind(errno=98 'Address already in use') #1020

Closed
janpio opened this issue Apr 30, 2021 · 2 comments

Comments

@janpio
Copy link
Contributor

janpio commented Apr 30, 2021

After a bit of trial error I arrive at the following command to start a server: bedrock -serverHost localhost:3000 -nodeHost localhost:3001 -controlPort localhost:3333 -mysql.host localhost:3307 &

Now I am getting an "address already in use" error though, even though Bedrock itself seems to be the one using that address:

Apr 30 22:17:03 fv-az185-372 systemd[1]: Starting Generates prerequisite files for bedrock.service, if absent...
Apr 30 22:17:03 fv-az185-372 systemd[1]: Started Generates prerequisite files for bedrock.service, if absent.
Apr 30 22:17:03 fv-az185-372 systemd[1]: Starting Expensify Bedrock Server...
Apr 30 22:17:03 fv-az185-372 systemd[1]: Started Expensify Bedrock Server.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (main.cpp:314) main [main] [info] Starting bedrock server
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1277) BedrockServer [main] [info] Loading plugins: CACHE, DB, JOBS, MYSQL
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (Cache.cpp:95) initCacheSize [main] [info] No -cache.max specified, defaulting to 16GB
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (Cache.cpp:99) initCacheSize [main] [info] Initializing cache with maximum size of 17179869184 bytes
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1303) BedrockServer [main] [info] Creating BedrockServer with plugins: Cache, DB, Jobs, MySQL
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1339) BedrockServer [main] [info] Opening control port on 'localhost:9999'
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [main] [info] DNS lookup took 1ms for 'localhost'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [main] [info] Resolved localhost to ip: 127.0.0.1.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1352) BedrockServer [main] [info] Launching sync thread 'sync'
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1699) postPoll [main] [info] [performance] Read from 0 sockets, attempted to deserialize 0 commands, 0 were complete and deserialized in 0ms.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:185) sync [sync] [info] Setting dbPool size to: 250
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:71) SQLite [sync] [info] Opening sqlite database: /var/lib/bedrock/bedrock.db
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:115) SQLite [sync] [info] {/var/lib/bedrock/bedrock.db} Opening database '/var/lib/bedrock/bedrock.db'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:139) SQLite [sync] [info] {/var/lib/bedrock/bedrock.db} Using SQLite default PRAGMA synchronous
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:152) SQLite [sync] [info] Setting cache_size to 1048576KB
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal'
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 2 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal table.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal0000'
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 4 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal0000 table.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal0001'
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 6 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal0001 table.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal0002'
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 8 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal0002 table.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [sync] [info] DNS lookup took 0ms for '0.0.0.0'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [sync] [info] Resolved 0.0.0.0 to ip: 0.0.0.0.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:64) SQLiteNode [sync] [info] {bedrock/SEARCHING} [NOTIFY] setting commit count to: 0
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1943) _changeState [sync] [info] {bedrock/SEARCHING} [NOTIFY] setting commit count to: 0
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:208) sync [sync] [info] Starting 2 worker threads.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:504) update [sync] [hmmm] {bedrock/SEARCHING} No peers configured, jumping to LEADING
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1943) _changeState [sync] [info] {bedrock/SEARCHING} [NOTIFY] setting commit count to: 0
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1970) _changeState [sync] [info] {bedrock/SEARCHING} Switching from 'SEARCHING' to 'LEADING'
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:544) verifyTable [sync] [info] Creating 'cache': CREATE TABLE cache ( name TEXT NOT NULL PRIMARY KEY, value BLOB NOT NULL )
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:544) verifyTable [sync] [info] Creating 'cacheSize': CREATE TABLE cacheSize ( size INTEGER )
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:544) verifyTable [sync] [info] Creating 'jobs': CREATE TABLE jobs ( created TIMESTAMP NOT NULL, jobID INTEGER NOT NULL PRIMARY KEY, state TEXT NOT NULL, name TEXT NOT NULL, nextRun TIMESTAMP NOT NULL, lastRun TIMESTAMP, repeat TEXT NOT NULL, data TEXT NOT NULL, priority INTEGER NOT NULL DEFAULT 500, parentJobID INTEGER NOT NULL DEFAULT 0, retryAfter TEXT NOT NULL DEFAULT "")
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:568) verifyIndex [sync] [info] Verifying index 'jobsName'. isUnique? 0
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:578) verifyIndex [sync] [info] Creating index 'jobsName' on table 'jobs': ( name ). Executing 'CREATE INDEX jobsName ON jobs ( name )'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:568) verifyIndex [sync] [info] Verifying index 'jobsParentJobIDState'. isUnique? 0
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:578) verifyIndex [sync] [info] Creating index 'jobsParentJobIDState' on table 'jobs': ( parentJobID, state ) WHERE parentJobID != 0. Executing 'CREATE INDEX jobsParentJobIDState ON jobs ( parentJobID, state ) WHERE parentJobID != 0'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:568) verifyIndex [sync] [info] Verifying index 'jobsStatePriorityNextRunName'. isUnique? 0
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:578) verifyIndex [sync] [info] Creating index 'jobsStatePriorityNextRunName' on table 'jobs': ( state, priority, nextRun, name ). Executing 'CREATE INDEX jobsStatePriorityNextRunName ON jobs ( state, priority, nextRun, name )'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:2138) _upgradeDB [sync] [info] Finished running DB upgrade.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:258) SQLite [worker1] [info] Opening sqlite database: /var/lib/bedrock/bedrock.db
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:264) SQLite [worker1] [info] {/var/lib/bedrock/bedrock.db} Opening database '/var/lib/bedrock/bedrock.db'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:285) SQLite [worker1] [info] {/var/lib/bedrock/bedrock.db} Using SQLite default PRAGMA synchronous
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:298) SQLite [worker1] [info] Setting cache_size to 1048576KB
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLitePool.cpp:49) get [worker1] [info] Returning new DB handle: 1
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:258) SQLite [blockingCommit] [info] Opening sqlite database: /var/lib/bedrock/bedrock.db
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:264) SQLite [blockingCommit] [info] {/var/lib/bedrock/bedrock.db} Opening database '/var/lib/bedrock/bedrock.db'.
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:285) SQLite [blockingCommit] [info] {/var/lib/bedrock/bedrock.db} Using SQLite default PRAGMA synchronous
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:298) SQLite [blockingCommit] [info] Setting cache_size to 1048576KB
Apr 30 22:17:03 fv-az185-372 bedrock: xxxxxx (SQLitePool.cpp:49) get [blockingCommit] [info] Returning new DB handle: 2
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1479) postPoll [main] [info] Ready to process commands, opening command port on '0.0.0.0:8888'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [main] [info] DNS lookup took 0ms for '0.0.0.0'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [main] [info] Resolved 0.0.0.0 to ip: 0.0.0.0.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1501) postPoll [main] [info] Opening port 'localhost:3306' for plugin 'MySQL'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [main] [info] DNS lookup took 0ms for 'localhost'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [main] [info] Resolved localhost to ip: 127.0.0.1.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1699) postPoll [main] [info] [performance] Read from 0 sockets, attempted to deserialize 0 commands, 0 were complete and deserialized in 0ms.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1009) update [sync] [info] {bedrock/LEADING} [performance] Beginning QUORUM commit.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1024) update [sync] [info] {bedrock/LEADING} beginning distributed transaction for commit #1 (8F2BB9DC0F94D8B688A6EF97DE9D9E8C7AE78572)
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1045) update [sync] [info] {bedrock/LEADING} [performance] SQLite::_sendToAllPeers in SQLiteNode took 0ms.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 17 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:832) commit [sync] [info] SQuery 'COMMIT' took 1ms.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:845) commit [sync] [info] COMMIT operation wrote 9 pages. WAL file size is 70072 bytes.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:944) update [sync] [info] {bedrock/LEADING} SQLite::commit in SQLiteNode took 1ms.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:964) update [sync] [info] {bedrock/LEADING} Committed leader transaction for '1 (8F2BB9DC0F94D8B688A6EF97DE9D9E8C7AE78572).  (consistencyRequired=QUORUM), 0 of 0 approved (0 total) in 2 ms (0+0+0+0+1+0ms)
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:973) update [sync] [info] {bedrock/LEADING} [performance] Successfully committed QUORUM transaction. Sending COMMIT_TRANSACTION to peers.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (main.cpp:314) main [main] [info] Starting bedrock server
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1277) BedrockServer [main] [info] Loading plugins: CACHE, DB, JOBS, MYSQL
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (Cache.cpp:95) initCacheSize [main] [info] No -cache.max specified, defaulting to 16GB
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (Cache.cpp:99) initCacheSize [main] [info] Initializing cache with maximum size of 17179869184 bytes
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1303) BedrockServer [main] [info] Creating BedrockServer with plugins: Cache, DB, Jobs, MySQL
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1339) BedrockServer [main] [info] Opening control port on 'localhost:3333'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [main] [info] DNS lookup took 0ms for 'localhost'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [main] [info] Resolved localhost to ip: 127.0.0.1.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1352) BedrockServer [main] [info] Launching sync thread 'sync'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1699) postPoll [main] [info] [performance] Read from 0 sockets, attempted to deserialize 0 commands, 0 were complete and deserialized in 0ms.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:185) sync [sync] [info] Setting dbPool size to: 250
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:71) SQLite [sync] [info] Opening sqlite database: /home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:115) SQLite [sync] [info] {/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db} Opening database '/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:139) SQLite [sync] [info] {/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db} Using SQLite default PRAGMA synchronous
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:152) SQLite [sync] [info] Setting cache_size to 1048576KB
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 2 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal table.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal0000'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 4 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal0000 table.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal0001'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 6 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal0001 table.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:2508) SQVerifyTable [sync] [info] Creating 'journal0002'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:350) _sqliteWALCallback [sync] [info] [checkpoint] skipping checkpoint with 8 pages in WAL file (checkpoint every 2500 pages).
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:160) SQLite [sync] [hmmm] Created journal0002 table.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [sync] [info] DNS lookup took 0ms for 'localhost'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [sync] [info] Resolved localhost to ip: 127.0.0.1.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:64) SQLiteNode [sync] [info] {fv-az185-372/SEARCHING} [NOTIFY] setting commit count to: 0
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1943) _changeState [sync] [info] {fv-az185-372/SEARCHING} [NOTIFY] setting commit count to: 0
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:208) sync [sync] [info] Starting 2 worker threads.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:504) update [sync] [hmmm] {fv-az185-372/SEARCHING} No peers configured, jumping to LEADING
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1943) _changeState [sync] [info] {fv-az185-372/SEARCHING} [NOTIFY] setting commit count to: 0
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:1970) _changeState [sync] [info] {fv-az185-372/SEARCHING} Switching from 'SEARCHING' to 'LEADING'
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:544) verifyTable [sync] [info] Creating 'cache': CREATE TABLE cache ( name TEXT NOT NULL PRIMARY KEY, value BLOB NOT NULL )
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:544) verifyTable [sync] [info] Creating 'cacheSize': CREATE TABLE cacheSize ( size INTEGER )
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:544) verifyTable [sync] [info] Creating 'jobs': CREATE TABLE jobs ( created TIMESTAMP NOT NULL, jobID INTEGER NOT NULL PRIMARY KEY, state TEXT NOT NULL, name TEXT NOT NULL, nextRun TIMESTAMP NOT NULL, lastRun TIMESTAMP, repeat TEXT NOT NULL, data TEXT NOT NULL, priority INTEGER NOT NULL DEFAULT 500, parentJobID INTEGER NOT NULL DEFAULT 0, retryAfter TEXT NOT NULL DEFAULT "")
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:568) verifyIndex [sync] [info] Verifying index 'jobsName'. isUnique? 0
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:578) verifyIndex [sync] [info] Creating index 'jobsName' on table 'jobs': ( name ). Executing 'CREATE INDEX jobsName ON jobs ( name )'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:568) verifyIndex [sync] [info] Verifying index 'jobsParentJobIDState'. isUnique? 0
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:578) verifyIndex [sync] [info] Creating index 'jobsParentJobIDState' on table 'jobs': ( parentJobID, state ) WHERE parentJobID != 0. Executing 'CREATE INDEX jobsParentJobIDState ON jobs ( parentJobID, state ) WHERE parentJobID != 0'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:568) verifyIndex [sync] [info] Verifying index 'jobsStatePriorityNextRunName'. isUnique? 0
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:578) verifyIndex [sync] [info] Creating index 'jobsStatePriorityNextRunName' on table 'jobs': ( state, priority, nextRun, name ). Executing 'CREATE INDEX jobsStatePriorityNextRunName ON jobs ( state, priority, nextRun, name )'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:2138) _upgradeDB [sync] [info] Finished running DB upgrade.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:258) SQLite [worker1] [info] Opening sqlite database: /home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:264) SQLite [worker1] [info] {/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db} Opening database '/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:285) SQLite [worker1] [info] {/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db} Using SQLite default PRAGMA synchronous
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:298) SQLite [worker1] [info] Setting cache_size to 1048576KB
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLitePool.cpp:49) get [worker1] [info] Returning new DB handle: 1
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:258) SQLite [blockingCommit] [info] Opening sqlite database: /home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:264) SQLite [blockingCommit] [info] {/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db} Opening database '/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db'.
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:285) SQLite [blockingCommit] [info] {/home/runner/work/e2e-tests/e2e-tests/databases/bedrock/prisma/bedrock.db} Using SQLite default PRAGMA synchronous
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLite.cpp:298) SQLite [blockingCommit] [info] Setting cache_size to 1048576KB
Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (SQLitePool.cpp:49) get [blockingCommit] [info] Returning new DB handle: 2
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1699) postPoll [main] [info] [performance] Read from 0 sockets, attempted to deserialize 0 commands, 0 were complete and deserialized in 0ms.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1479) postPoll [main] [info] Ready to process commands, opening command port on 'localhost:3000'
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [main] [info] DNS lookup took 0ms for 'localhost'.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [main] [info] Resolved localhost to ip: 127.0.0.1.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1501) postPoll [main] [info] Opening port 'localhost:3306' for plugin 'MySQL'
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [main] [info] DNS lookup took 0ms for 'localhost'.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [main] [info] Resolved localhost to ip: 127.0.0.1.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:97) SException [main] [info] Throwing exception with message: 'couldn't bind' from libstuff/libstuff.cpp:1687
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1719) S_socket [main] [warn] Failed to open TCP port 'localhost:3306': couldn't bind(errno=98 'Address already in use')
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (STCPServer.cpp:21) openPort [main] [eror] Assertion failed: (port.s >= 0) != true
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SLog.cpp:13) SLogStackTrace [main] [warn]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SLog.cpp:13) SLogStackTrace [main] [warn] SLogStackTrace() [0x632e39]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SLog.cpp:13) SLogStackTrace [main] [warn] STCPServer::openPort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [0x62ca27]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SLog.cpp:13) SLogStackTrace [main] [warn] BedrockServer::postPoll(std::map<int, pollfd, std::less<int>, std::allocator<std::pair<int const, pollfd> > >&, unsigned long&) [0x4d9205]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SLog.cpp:13) SLogStackTrace [main] [warn] bedrock(main+0x3311) [0x4aad81]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SLog.cpp:13) SLogStackTrace [main] [warn] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fb3853cc840]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SLog.cpp:13) SLogStackTrace [main] [warn] bedrock(_start+0x29) [0x4ad479]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:163) _SSignal_StackTrace [main] [warn] Signal Aborted(6) caused crash, logging stack trace.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] _SSignal_StackTrace(int, siginfo_t*, void*) [0x62db80]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fb385f9d390]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7fb3853e1438]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fb3853e303a]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] bedrock() [0x48e994]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] BedrockServer::postPoll(std::map<int, pollfd, std::less<int>, std::allocator<std::pair<int const, pollfd> > >&, unsigned long&) [0x4d9205]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] bedrock(main+0x3311) [0x4aad81]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fb3853cc840]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:167) _SSignal_StackTrace [main] [warn] bedrock(_start+0x29) [0x4ad479]
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:171) _SSignal_StackTrace [main] [warn] Calling DIE function.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (SSignal.cpp:174) _SSignal_StackTrace [main] [warn] DIE function returned, aborting (if not done).
Apr 30 22:17:06 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1699) postPoll [main] [info] [performance] Read from 0 sockets, attempted to deserialize 0 commands, 0 were complete and deserialized in 0ms.
Apr 30 22:17:13 fv-az185-372 bedrock: message repeated 7 times: [ xxxxxx (BedrockServer.cpp:1699) postPoll [main] [info] [performance] Read from 0 sockets, attempted to deserialize 0 commands, 0 were complete and deserialized in 0ms.]
Apr 30 22:17:13 fv-az185-372 bedrock: xxxxxx (main.cpp:352) main [main] [info] [performance] main poll loop timing: 10001 ms elapsed. 9999 ms in poll. 1 ms in postPoll.
Apr 30 22:17:13 fv-az185-372 bedrock: xxxxxx (SQLiteNode.cpp:477) update [sync] [info] {bedrock/LEADING} [performance] Network stats: 10002 ms elapsed.
Apr 30 22:17:14 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1699) postPoll [main] [info] [performance] Read from 0 sockets, attempted to deserialize 0 commands, 0 were complete and deserialized in 0ms.

So we have:

Apr 30 22:17:04 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1501) postPoll [main] [info] Opening port 'localhost:3306' for plugin 'MySQL'
...
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (BedrockServer.cpp:1501) postPoll [main] [info] Opening port 'localhost:3306' for plugin 'MySQL'
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1639) S_socket [main] [info] DNS lookup took 0ms for 'localhost'.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1651) S_socket [main] [info] Resolved localhost to ip: 127.0.0.1.
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:97) SException [main] [info] Throwing exception with message: 'couldn't bind' from libstuff/libstuff.cpp:1687
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (libstuff.cpp:1719) S_socket [main] [warn] Failed to open TCP port 'localhost:3306': couldn't bind(errno=98 'Address already in use')
Apr 30 22:17:05 fv-az185-372 bedrock: xxxxxx (STCPServer.cpp:21) openPort [main] [eror] Assertion failed: (port.s >= 0) != true
@janpio
Copy link
Contributor Author

janpio commented Apr 30, 2021

Looks like it is starting the same server twice...

@janpio
Copy link
Contributor Author

janpio commented Apr 30, 2021

Solution: Running the "Install" commands from the documentation already starts a bedrock server:

...
Unpacking bedrock (2020.08.13~d2d17eb-16.04) ...
Setting up bedrock (2020.08.13~d2d17eb-16.04) ...
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:9999          0.0.0.0:*               LISTEN      4159/bedrock    
tcp        0      0 127.0.0.1:34165         0.0.0.0:*               LISTEN      1548/containerd 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1653/sshd       
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN      4159/bedrock    
tcp        0      0 0.0.0.0:8889            0.0.0.0:*               LISTEN      4159/bedrock    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      4159/bedrock    
tcp6       0      0 :::22                   :::*                    LISTEN      1653/sshd       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1158/dhclient

So to start your own, kill this one first.

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

1 participant