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

Stream did not contain valid utf-8 #925

Closed
codekoala opened this issue Jun 19, 2016 · 5 comments
Closed

Stream did not contain valid utf-8 #925

codekoala opened this issue Jun 19, 2016 · 5 comments

Comments

@codekoala
Copy link

While running through the getting started tutorial, it appears that I was able to get all the way through building the docker image just fine. However, upon running the container, I get the following output:

% docker run -it -p 8080:8080 vaio/mytutorialapp
hab-sup(MN): Starting vaio/mytutorialapp
hab-sup(GS): Supervisor 172.17.0.2: 82f77535-a89e-4f7f-9d34-c8fcec78dbd4
hab-sup(GS): Census mytutorialapp.default: 58ac6d01-fd56-4ac5-b488-b3b9e3705556
hab-sup(GS): Starting inbound gossip listener
hab-sup(GS): Starting outbound gossip distributor
hab-sup(GS): Starting gossip failure detector
hab-sup(CN): Starting census health adjuster
hab-sup(ER)[src/error.rs:322:8]: IOError(Error { repr: Custom(Custom { kind: InvalidData, error: StringError("stream did not contain valid UTF-8") }) })

I'm using hab 0.7.0/20160614230104 on Arch Linux.

@codekoala
Copy link
Author

codekoala commented Jun 19, 2016

Just tested the same steps on Ubuntu 16.04 using the same version of hab. Worked fine.

@codekoala
Copy link
Author

Bah. Rebooting Arch got it working. Sorry for the noise.

@dysinger
Copy link

I have this error now on Ubuntu 17.04 and I have no idea why

@dysinger
Copy link

....
→ Using core/linux-headers/4.3/20170513200956
→ Using core/openssl/1.0.2j/20170513215106
→ Using core/xz/5.2.2/20170513214327
→ Using core/zlib/1.2.8/20170513201911
✓ Installed core/hab-launcher/4571/20170727193541
★ Install of core/hab-launcher/4571/20170727193541 complete with 1 new packages installed.
DEBUG:habitat_core::os::process::imp: Calling execvp(): ("/hab/pkgs/core/hab-launcher/4571/20170727193541/bin/hab-launch") ["start", "dysinger/yesod-sqlite-habitat"]
DEBUG:habitat_launcher::server: Starting Supervisor...
DEBUG:habitat_common::ui: InputStream(stdin): { is_a_terminal(): true }
DEBUG:habitat_common::ui: OutputStream(stdout): { is_colored(): false, supports_color(): false, is_a_terminal(): true }
DEBUG:habitat_common::ui: OutputStream(stderr): { is_colored(): false, supports_color(): false, is_a_terminal(): true }
DEBUG:habitat_common::ui: InputStream(stdin): { is_a_terminal(): true }
DEBUG:habitat_common::ui: OutputStream(stdout): { is_colored(): false, supports_color(): false, is_a_terminal(): true }
DEBUG:habitat_common::ui: OutputStream(stderr): { is_colored(): false, supports_color(): false, is_a_terminal(): true }
DEBUG:habitat_sup::manager::service::spec: Writing service spec to '/hab/sup/default/specs/yesod-sqlite-habitat.spec': ServiceSpec { ident: PackageIdent { origin: "dysinger", name: "yesod-sq
lite-habitat", version: None, release: None }, group: "default", application_environment: None, depot_url: "https://willem.habitat.sh/v1/depot", channel: "stable", topology: Standalone, upda
te_strategy: None, binds: [], config_from: None, desired_state: Up, start_style: Transient, svc_encrypted_password: None }
DEBUG:habitat_sup::manager: Creating data directory: /hab/sup/default/data
DEBUG:habitat_sup::manager: Creating specs directory: /hab/sup/default/specs
DEBUG:habitat_sup::manager: Cleaning cached health checks
hab-sup(MR): Supervisor Member-ID 7be3bb38f5f049fb949026ff45ea3979
DEBUG:habitat_sup::manager::spec_watcher: Service spec for yesod-sqlite-habitat is new, enqueuing AddService(ServiceSpec { ident: PackageIdent { origin: "dysinger", name: "yesod-sqlite-habit
at", version: None, release: None }, group: "default", application_environment: None, depot_url: "https://willem.habitat.sh/v1/depot", channel: "stable", topology: Standalone, update_strateg
y: None, binds: [], config_from: None, desired_state: Up, start_style: Transient, svc_encrypted_password: None }) event
hab-sup(MR): Starting dysinger/yesod-sqlite-habitat
DEBUG:habitat_common::ui: InputStream(stdin): { is_a_terminal(): true }
DEBUG:habitat_common::ui: OutputStream(stdout): { is_colored(): false, supports_color(): false, is_a_terminal(): true }
DEBUG:habitat_sup::manager::spec_watcher: SpecWatcher(/hab/sup/default/specs) thread starting
DEBUG:habitat_common::ui: OutputStream(stderr): { is_colored(): false, supports_color(): false, is_a_terminal(): true }
DEBUG:habitat_sup::manager::service::config: Failed to open 'user.toml', /hab/svc/yesod-sqlite-habitat/user.toml, No such file or directory (os error 2)
DEBUG:habitat_sup::manager::service::config: Looking up environment variable HAB_YESOD_SQLITE_HABITAT failed: NotPresent
hab-sup(MR): Unable to start dysinger/yesod-sqlite-habitat, hab-sup(CF)[src/manager/service/config.rs:254:28]: IOError(Error { repr: Custom(Custom { kind: InvalidData, error: StringError("st
ream did not contain valid UTF-8") }) }, "favicon.ico")
hab-sup(MR): Starting gossip-listener on 0.0.0.0:9638
DEBUG:habitat_sup::manager::spec_watcher: SpecWatcher(/hab/sup/default/specs) file system event: NoticeRemove("/hab/sup/default/specs/yesod-sqlite-habitat.spec")
DEBUG:habitat_sup::manager: gossip-listener started
DEBUG:habitat_sup::manager: Writing census state to disk
DEBUG:habitat_sup::manager: Writing butterfly state to disk
DEBUG:habitat_sup::manager: Writing services state to disk
hab-sup(MR): Starting http-gateway on 0.0.0.0:9631
DEBUG:habitat_sup::manager: http-gateway started
DEBUG:hyper::server: threads = 64
DEBUG:habitat_sup::manager::spec_watcher: SpecWatcher(/hab/sup/default/specs) file system event: Remove("/hab/sup/default/specs/yesod-sqlite-habitat.spec")

@dysinger
Copy link

dysinger commented Aug 10, 2017

Unable to start dysinger/yesod-sqlite-habitat, hab-sup(CF)[src/manager/service/config.rs:254:28]: IOError(Error { repr: Custom(Custom { kind: InvalidData, error: StringError("st
ream did not contain valid UTF-8") }) }, "favicon.ico")

yet if I shell into the docker container I can launch my web server just fine

broken:

user@oryx ~/s/f/yesod-sqlite-habitat> docker run -i -t -p 3000:3000 dysinger/yesod-sqlite-habitat:0.1.0-20170810022716
∵ Missing package for core/hab-launcher
» Installing core/hab-launcher
↓ Downloading core/hab-launcher/4571/20170727193541
    595.15 KB / 595.15 KB - [===========================================================================================================================================] 100.00 % 5.84 MB/s 
☛ Verifying core/hab-launcher/4571/20170727193541
→ Using core/bzip2/1.0.6/20170513212938
→ Using core/cacerts/2017.01.18/20170513215104
→ Using core/gcc-libs/5.2.0/20170513212920
→ Using core/glibc/2.22/20170513201042
→ Using core/libarchive/3.2.0/20170514021649
→ Using core/libsodium/1.0.11/20170514010744
→ Using core/linux-headers/4.3/20170513200956
→ Using core/openssl/1.0.2j/20170513215106
→ Using core/xz/5.2.2/20170513214327
→ Using core/zlib/1.2.8/20170513201911
✓ Installed core/hab-launcher/4571/20170727193541
★ Install of core/hab-launcher/4571/20170727193541 complete with 1 new packages installed.
hab-sup(MR): Supervisor Member-ID d7149e3e925e4dfaae1f6fbd7654c52f
hab-sup(MR): Starting dysinger/yesod-sqlite-habitat
hab-sup(MR): Unable to start dysinger/yesod-sqlite-habitat, hab-sup(CF)[src/manager/service/config.rs:254:28]: IOError(Error { repr: Custom(Custom { kind: InvalidData, error: StringError("stream did not contain valid UTF-8") }) }, "favicon.ico")
hab-sup(MR): Starting gossip-listener on 0.0.0.0:9638
hab-sup(MR): Starting http-gateway on 0.0.0.0:9631
^Chab-launch(SV): Hasta la vista, services.

works fine without hab supervisor

user@oryx ~/s/f/yesod-sqlite-habitat> docker run -i -t -p 3000:3000 --entrypoint /bin/bash dysinger/yesod-sqlite-habitat:0.1.0-20170810022716
/ # find /hab -name yesod-sqlite-habitat
/hab/svc/yesod-sqlite-habitat
/hab/pkgs/dysinger/yesod-sqlite-habitat
/hab/pkgs/dysinger/yesod-sqlite-habitat/0.1.0/20170810022716/bin/yesod-sqlite-habitat
/ # cd /hab/pkgs/dysinger/yesod-sqlite-habitat/0.1.0/20170810022716/
/hab/pkgs/dysinger/yesod-sqlite-habitat/0.1.0/20170810022716 # yesod-sqlite-habitat
Migrating: CREATE TABLE "user"("id" INTEGER PRIMARY KEY,"ident" VARCHAR NOT NULL,"password" VARCHAR NULL,CONSTRAINT "unique_user" UNIQUE ("ident"))
Migrating: CREATE TABLE "email"("id" INTEGER PRIMARY KEY,"email" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user","verkey" VARCHAR NULL,CONSTRAINT "unique_email" UNIQUE ("email"))
Migrating: CREATE TABLE "comment"("id" INTEGER PRIMARY KEY,"message" VARCHAR NOT NULL,"user_id" INTEGER NULL REFERENCES "user")

^ works great and serves a webpage on port 3000

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