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

[BUG] Logs for container components not showing up in GUI or CLI #478

Closed
eerohele opened this issue Nov 5, 2021 · 10 comments · Fixed by #505
Closed

[BUG] Logs for container components not showing up in GUI or CLI #478

eerohele opened this issue Nov 5, 2021 · 10 comments · Fixed by #505
Assignees
Labels
bug Something isn't working

Comments

@eerohele
Copy link

eerohele commented Nov 5, 2021

Describe the bug
Container component logs don't show up in the GUI or in the terminal.

To Reproduce

  1. Create exo.hcl with this content:

    exo = "0.1"
    
    components {
      container "db" {
        image = "postgres:11.7-alpine"
    
        environment = {
          POSTGRES_DB = "foo"
          POSTGRES_PASSWORD = "bar"
        }
    
        ports = ["5432:5432"]
      }
    }
  2. Run exo init.

  3. Run exo gui.

Expected behavior
If I use a similar Docker Compose manifest and type docker compose up, Docker Compose starts tailing Postgres logs. Based on both the description of the app and the screenshot in the repo README, I expected Exo to do the same. Have I misunderstood how the app works, or did I miss a step?

System Info (please complete the following information):

  • OS: macOS 11.6
  • Component: GUI, CLI
  • Version: 2021.10.29

Additional context

For process components, logs do seem to show up in both the GUI and CLI.

@eerohele eerohele added bug Something isn't working needs triage Incoming request that needs to be triaged and prioritized labels Nov 5, 2021
@brandonbloom
Copy link
Member

@eerohele Apologies that I missed this issue! Didn't mean to keep you waiting.

This absolutely should work, but I can confirm that it is not for this image for some reason. We'll investigate.

@brandonbloom
Copy link
Member

Some debugging notes: I think this may be a docker issue:

exo exit
nc -u -l 43550

Elsewhere:

docker run --rm -e POSTGRES_DB=foo -e POSTGRES_PASSWORD=bar  --log-driver=syslog --log-opt syslog-address=udp://localhost:43550 --log-opt syslog-facility=1 --log-opt syslog-format=rfc5424micro --log-opt tag=yzdx62n63zxynk43f94vc5s9tm postgres:11.7-alpine

No logging packets are sent to that port, unclear why. We've had issues with Docker's syslog driver in the past. Maybe something changed here. Continuing to investigate.

@brandonbloom brandonbloom removed the needs triage Incoming request that needs to be triaged and prioritized label Nov 15, 2021
@brandonbloom brandonbloom self-assigned this Nov 15, 2021
@brandonbloom
Copy link
Member

OK, found the issue. This is a mac vs linux problem. @BenElgar fixed this for linux, breaking it for mac in 8fffd95 - Working on a fix.

@eerohele
Copy link
Author

No worries, thanks for looking into it!

@brandonbloom
Copy link
Member

Turns out that this is broken in WSL now, so reopening...

@brandonbloom brandonbloom reopened this Nov 16, 2021
@brandonbloom
Copy link
Member

Hey @jwmza 6fe4c78 should fix windows. Can you please try the latest dexo on the example from the original issue here? Let me know if the logging works for you now. Thanks.

@jrysana
Copy link
Contributor

jrysana commented Nov 17, 2021

Seems no luck with latest main @brandonbloom

image

~/dev/deref/tmp λ dxo init
Workspace created.

Applying existing manifest...
Job URL: http://localhost:44643/#/jobs/hzycb2nmbsvdya62xmg1sg4eg0
applying                                                                                                                                                                                                        
✓ └─ adding db                                                                                                                                                                                                  

Ready to go! Here are some potential next steps:

Launch graphical UI in web browser:

                exo gui

View logs in terminal:

                exo logs

Stop all processes in this workspace:

                exo stop

~/dev/deref/tmp λ dxo gui
Opening GUI: http://localhost:44643/?token=[ TOKEN ]#/workspaces/rkyw80ms2hc98d05bscr461ccg
<3>init: (9945) ERROR: UtilConnectToInteropServer:307: connect failed 2
<3>init: (9955) ERROR: UtilConnectToInteropServer:307: connect failed 2
<3>init: (9957) ERROR: UtilConnectToInteropServer:307: connect failed 2
<3>init: (9959) ERROR: UtilConnectToInteropServer:307: connect failed 2
Error: exit status 1
exit status 1

~/dev/deref/tmp λ dxo logs
00:00:00 EXO applying manifest... hzycb2nmbsvdya62xmg1sg4eg0

(By the way the GUI doesn't autolaunch in step 3 above, which presumably is also because I have no web browser in WSL and prefer to use a browser in Windows)

@brandonbloom
Copy link
Member

D'oh, ok - @BenElgar you had some idea on how to detect the right thing to do here?

@BenElgar
Copy link
Contributor

How about #526?

@eerohele
Copy link
Author

Looks like this was fixed in 2021.11.16. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants