Eventstore on Google Compute Engine?

Howdy All,

I am trying to run Eventstore 3.0.1 on GCE running Centos 7

I can’t connect to admin interface but I am not sure if it is the configuration of ports or something else.

In particular the output from ES seems to stop at:

[01862,06,16:11:24.255] Created stats stream ‘$stats-0.0.0.0:2113’, code = WrongExpectedVersion

Although the process seems to continue running.

Any assistance most appreciated.

Cheers,

Ashley.

I get no reply from the GCE external IP address and now “bad requests” from the internal IP address on the VM.

I’ve tried using the GCE external IP as ext_ip but it doesn’t work (can’t listen on that port, understandably).

Full output is below:

[01862,01,16:11:23.443]

ES VERSION: 3.0.1.0 (release-oss-v3.0.1/7fa876c111888dd5980dbd86d126e6abe13b05ab, Thu, 23 Oct 2014 22:27:04 +0100)

OS: Unknown (Unix 3.10.0.123)

RUNTIME: 3.8.0 ((detached/45d0ba1) (64-bit)

GC: 2 GENERATIONS

LOGS: /home/ashley_aitken_hedventures_com/ESData-logs

HELP: False ()

VERSION: False ()

LOG: ()

CONFIG: ()

DEFINES: ()

WHAT IF: False ()

INT IP: 127.0.0.1 ()

EXT IP: 0.0.0.0 (Command Line)

INT HTTP PORT: 2112 ()

EXT HTTP PORT: 2113 ()

INT TCP PORT: 1112 ()

INT SECURE TCP PORT: 0 ()

EXT TCP PORT: 1113 ()

EXT SECURE TCP PORT: 0 ()

INT TCP HEARTBEAT TIMEOUT: 700 ()

EXT TCP HEARTBEAT TIMEOUT: 1000 ()

INT TCP HEARTBEAT INTERVAL: 700 ()

EXT TCP HEARTBEAT INTERVAL: 2000 ()

FORCE: False ()

CLUSTER SIZE: 1 ()

NODE PRIORITY: 0 ()

MIN FLUSH DELAY MS: 2 ()

COMMIT COUNT: -1 ()

PREPARE COUNT: -1 ()

ADMIN ON EXT: True ()

STATS ON EXT: True ()

GOSSIP ON EXT: True ()

DISABLE SCAVENGE MERGING: False ()

DISCOVER VIA DNS: True ()

CLUSTER DNS: fake.dns ()

CLUSTER GOSSIP PORT: 30777 ()

GOSSIP SEED: ()

STATS PERIOD SEC: 30 ()

CACHED CHUNKS: -1 ()

CHUNKS CACHE SIZE: 536871424 ()

MAX MEM TABLE SIZE: 1000000 ()

DB: /home/ashley_aitken_hedventures_com/ESData (Command Line)

MEM DB: False ()

SKIP DB VERIFY: False ()

RUN PROJECTIONS: System ()

PROJECTION THREADS: 3 ()

WORKER THREADS: 5 ()

HTTP PREFIXES: ()

ENABLE TRUSTED AUTH: False ()

CERTIFICATE STORE LOCATION: ()

CERTIFICATE STORE NAME: ()

CERTIFICATE SUBJECT NAME: ()

CERTIFICATE THUMBPRINT: ()

CERTIFICATE FILE: ()

CERTIFICATE PASSWORD: ()

USE INTERNAL SSL: False ()

SSL TARGET HOST: n/a ()

SSL VALIDATE SERVER: True ()

AUTHENTICATION TYPE: internal ()

PREPARE TIMEOUT MS: 2000 ()

COMMIT TIMEOUT MS: 2000 ()

UNSAFE DISABLE FLUSH TO DISK: False ()

GOSSIP INTERVAL MS: 1000 ()

GOSSIP ALLOWED DIFFERENCE MS: 60000 ()

GOSSIP TIMEOUT MS: 500 ()

[01862,01,16:11:23.468] Quorum size set to 1

[01862,01,16:11:23.472] Can’t find plugins path: plugins

[01862,01,16:11:23.507]

INSTANCE ID: 8847a661-59c6-4ec3-be88-3fdc62cc2415

DATABASE: /home/ashley_aitken_hedventures_com/ESData

WRITER CHECKPOINT: 3281516 (0x32126C)

CHASER CHECKPOINT: 3281516 (0x32126C)

EPOCH CHECKPOINT: 2926550 (0x2CA7D6)

TRUNCATE CHECKPOINT: -1 (0xFFFFFFFFFFFFFFFF)

[01862,01,16:11:23.638] MessageHierarchy initialization took 00:00:00.1013920.

[01862,01,16:11:23.726] CACHED TFChunk #0-0 (chunk-000000.000000) in 00:00:00.0042536.

[01862,01,16:11:23.915] Starting MiniWeb for /web/es/js/projections ==> /home/ashley_aitken_hedventures_com/EventSt

ore-OSS-Linux-v3.0.1/projections

[01862,01,16:11:23.915] Starting MiniWeb for /web/es/js/projections/v8/Prelude ==> /home/ashley_aitken_hedventures_

com/EventStore-OSS-Linux-v3.0.1/Prelude

[01862,01,16:11:23.915] Starting MiniWeb for /web/es/js/projections/resources ==> /home/ashley_aitken_hedventures_c

om/EventStore-OSS-Linux-v3.0.1/web-resources/js

[01862,01,16:11:23.915] Binding MiniWeb to /web/es/js/projections/{*remaining_path}

[01862,01,16:11:23.916] Binding MiniWeb to /web/es/js/projections/v8/Prelude/{*remaining_path}

[01862,01,16:11:23.916] Binding MiniWeb to /web/es/js/projections/resources/{*remaining_path}

[01862,01,16:11:23.926] Starting MiniWeb for /web ==> /home/ashley_aitken_hedventures_com/EventStore-OSS-Linux-v3.0

.1/clusternode-web

[01862,01,16:11:23.926] Binding MiniWeb to /web/{*remaining_path}

[01862,01,16:11:23.927] Starting MiniWeb for /web/users ==> /home/ashley_aitken_hedventures_com/EventStore-OSS-Linu

x-v3.0.1/Users/web

[01862,01,16:11:23.927] Binding MiniWeb to /web/users/{*remaining_path}

[01862,09,16:11:23.943] ========== [127.0.0.1:2112] SYSTEM INIT…

[01862,12,16:11:23.970] TableIndex initialization…

[01862,12,16:11:23.985] ReadIndex building…

[01862,12,16:11:24.007] ReadIndex rebuilding done: total processed 723 records, time elapsed: 00:00:00.0219780.

[01862,09,16:11:24.013] Starting Normal TCP listening on TCP endpoint: 0.0.0.0:1113.

[01862,09,16:11:24.028] SLOW BUS MSG [MainBus]: SystemInit - 50ms. Handler: TcpService.

[01862,09,16:11:24.044] Starting HTTP server on [http://0.0.0.0:2113/]…

[01862,09,16:11:24.047] HTTP server is up and listening on [http://0.0.0.0:2113/]

[01862,09,16:11:24.060] SLOW QUEUE MSG [MainQueue]: SystemInit - 119ms. Q: 0/718.

[01862,09,16:11:24.060] ========== [127.0.0.1:2112] Service ‘StorageReader’ initialized.

[01862,09,16:11:24.060] ========== [127.0.0.1:2112] Service ‘StorageWriter’ initialized.

[01862,09,16:11:24.064] ========== [127.0.0.1:2112] Service ‘StorageChaser’ initialized.

[01862,09,16:11:24.065] ========== [127.0.0.1:2112] SYSTEM START…

[01862,09,16:11:24.067] ========== [127.0.0.1:2112] IS UNKNOWN!!! WHOA!!!

[01862,09,16:11:24.089] ELECTIONS: STARTING ELECTIONS.

[01862,09,16:11:24.089] ELECTIONS: (V=0) SHIFT TO LEADER ELECTION.

[01862,09,16:11:24.089] ELECTIONS: (V=0) VIEWCHANGE FROM [127.0.0.1:2112, {8847a661-59c6-4ec3-be88-3fdc62cc2415}].

[01862,09,16:11:24.091] ELECTIONS: (V=0) MAJORITY OF VIEWCHANGE.

[01862,09,16:11:24.091] ELECTIONS: (V=0) SHIFT TO PREPARE PHASE.

[01862,09,16:11:24.093] ELECTIONS: (V=0) PREPARE_OK FROM [127.0.0.1:2112,{8847a661-59c6-4ec3-be88-3fdc62cc2415}](L=

3266974,W=3281516,C=3281516,E10@2926550:{c94b4d92-034f-403e-b3ee-19d34c531279}).

[01862,09,16:11:24.093] ELECTIONS: (V=0) SHIFT TO REG_LEADER.

[01862,09,16:11:24.098] ELECTIONS: (V=0) SENDING PROPOSAL CANDIDATE: [127.0.0.1:2112,{8847a661-59c6-4ec3-be88-3fdc6

2cc2415}](L=3266974,W=3281516,C=3281516,E10@2926550:{c94b4d92-034f-403e-b3ee-19d34c531279}), ME: [127.0.0.1:2112,{8

847a661-59c6-4ec3-be88-3fdc62cc2415}](L=3266974,W=3281516,C=3281516,E10@2926550:{c94b4d92-034f-403e-b3ee-19d34c5312

79}).

[01862,09,16:11:24.098] ELECTIONS: (V=0) ACCEPT FROM [127.0.0.1:2112,{8847a661-59c6-4ec3-be88-3fdc62cc2415}] M=[127

.0.0.1:2112,{8847a661-59c6-4ec3-be88-3fdc62cc2415}]).

[01862,09,16:11:24.098] ELECTIONS: (V=0) DONE. ELECTED MASTER = [127.0.0.1:2112,{8847a661-59c6-4ec3-be88-3fdc62cc24

15}](L=3266974,W=3281516,C=3281516,E10@2926550:{c94b4d92-034f-403e-b3ee-19d34c531279}). ME=[127.0.0.1:2112,{8847a66

1-59c6-4ec3-be88-3fdc62cc2415}](L=3266974,W=3281516,C=3281516,E10@2926550:{c94b4d92-034f-403e-b3ee-19d34c531279}).

[01862,09,16:11:24.100] ========== [127.0.0.1:2112] PRE-MASTER STATE, WAITING FOR CHASER TO CATCH UP…

[01862,09,16:11:24.105] ========== [127.0.0.1:2112] IS MASTER!!! SPARTA!!!

[01862,07,16:11:24.171] === Writing E11@3281516:{b1c7a864-a167-4654-99be-cf1ab3ebbcb7} (previous epoch at 2926550).

[01862,07,16:11:24.218] === Update Last Epoch E11@3281516:{b1c7a864-a167-4654-99be-cf1ab3ebbcb7} (previous epoch at

2926550).

[01862,06,16:11:24.255] Created stats stream ‘$stats-0.0.0.0:2113’, code = WrongExpectedVersion

I’ve not tried running in Google Compute Engine, but my guess is this is a similar internal/external issue that you see in other situations where the public IP isn’t any of the ones matching your host. The log output is normal though - the database is working
correctly (it tries to create a stats stream per node on startup, and if it already exists it will give a WrongExpectedVersion).

Can you post the output of ifconfig for your box?

Thanks,

James

Thanks very much James.

I think you are right, I am getting “Bad Request (Invalid host)” now, after I set up GCE firewall rule (forgot about that, I did open ports on VM).

No ifconfig on VM

I tried setting —httpPrefixes=http://the.ip.real.extip:2113/ from command line but ES won’t start:

Exit reason: Http async server failed to start listening at [http://the.ip.real.extip:2113/].

No DNS is setup yet.

No ifconfig? What are your local ips? You need to bind to the local ip. Can you access the node with curl locally?

No ifconfig?

The CentOS7 image on GCE doesn’t seem to have ifconfig installed.

What are your local ips? You need to bind to the local ip. Can you access the node with curl locally?

I have ext_ip bound to the GCE internal ip but the real external IP still returns bad host.

If I curl the GCE internal ip from the VM itself I get “Moved”

So the IP address I use from my Web browser doesn’t match the internal IP address the VM has within GCP.

I thought http prefixes were to fix this case but (as I mentioned below) that doesn’t seem to help.

Do I really need DNS set up?

Thanks,

A.

Sorry, all good now with: --httpPrefixes=http://*:2113/

This always seems to get me :frowning:

Sorry for the distraction.

Thanks,
Ashley.