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

Gitpod Internal: Cannot start apache #46

Closed
apolopena opened this issue Mar 4, 2021 · 8 comments · Fixed by gitpod-io/workspace-images#362
Closed

Gitpod Internal: Cannot start apache #46

apolopena opened this issue Mar 4, 2021 · 8 comments · Fixed by gitpod-io/workspace-images#362
Assignees
Labels
bug Something isn't working internal-gitpod-bug Bug in the Gitpod platform itself passed-dev-qa Optional state. Use this when QAing other peoples fixes in another branch.ready to be merged to main

Comments

@apolopena
Copy link
Owner

apolopena commented Mar 4, 2021

Describe the bug

After building a new workspace image you get the following error when trying to start apache.

(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
AH00014: Configuration check failed
Action 'start' failed.
The Apache error log may have more information.

Screenshots

image

Steps to reproduce

  1. Create a new github project from this starter as per the instructions in README.md
  2. Force the workspace image to build
    • In .github.Dockerfile increment the value for INVALIDATE_CACHE
  3. Push the changed files to the repository.
  4. Create a new workspace in gitpod
  5. After the IDE is displayed start apache
    • In a terminal run start_apache

You will see the error:

(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
AH00014: Configuration check failed
Action 'start' failed.
The Apache error log may have more information.

Expected behavior

Apache should start.
/var/log/apache2 should be created by default when the workspace image is built.

Additional information

This is an internal gitpod bug and the fix is awaiting review.
gitpod-io/workspace-images#362

Workaround

Write the directory and files in .gitpod.Dockerfile

RUN sudo mkdir /var/log/apache2 \

    && sudo chmod 755 /var/log/apache2

RUN sudo touch /var/log/apache2/access.log \

    && sudo chmod 666 /var/log/apache2/access.log

RUN sudo touch /var/log/apache2/error.log \

    && sudo chmod 666 /var/log/apache2/error.log

RUN sudo touch /var/log/apache2/other_vhosts_access.log \

    && sudo chmod 666 /var/log/apache2/other_vhosts_access.log
@aledbf
Copy link

aledbf commented Mar 4, 2021

@apolopena please test the image aledbf/workspace-mysql:04032021. It contains the fix gitpod-io/workspace-images#362
Apologies for the issues.

@apolopena
Copy link
Owner Author

No worries, thanks for the speedy response. I am on it, will let you know the results soon.

@apolopena
Copy link
Owner Author

@alefbd,
Yes I can verify that the issue is resolved.

@apolopena apolopena added the awaiting-gitpod-internal-merge A fix has been provided, awaiting merge of PR into master label Mar 5, 2021
@apolopena
Copy link
Owner Author

Awaiting gitpod-io/workspace-images#362

@apolopena
Copy link
Owner Author

apolopena commented Mar 5, 2021

Implementing the workaround in the development branch for now so I can get the latest batch of changes tested. No need to re-test the latest batch of changes once the fix is in because the nature of the issue is so simple.

apolopena added a commit that referenced this issue Mar 5, 2021
restore image to `gitpod/workspace-mysql`
apolopena added a commit that referenced this issue Mar 5, 2021
Removed empty continuation lines. This code is now mirrored in the test [repo](https://github.com/apolopena/laravel8-starter-b892185) for this branch.
@apolopena
Copy link
Owner Author

Workaround breaks the workspace image build now.
image

Gitpod PR 362 has been merged live 🚀
I am removing the workaround and will report the final on results here.

@apolopena apolopena added in-dev-qa and removed awaiting-gitpod-internal-merge A fix has been provided, awaiting merge of PR into master workaround-implemented labels Mar 23, 2021
@apolopena apolopena added passed-dev-qa Optional state. Use this when QAing other peoples fixes in another branch.ready to be merged to main and removed in-dev-qa labels Mar 23, 2021
@apolopena
Copy link
Owner Author

Apache logs are built by the gitpod image now. Workaround has been removed.

@apolopena
Copy link
Owner Author

will keep open untill pushed live.

@apolopena apolopena reopened this Mar 23, 2021
apolopena added a commit that referenced this issue Mar 24, 2021
* 📖 DOC: #58 Readme: Revamp and add TOC

* 🐛 FIX: #45

* 🤖 TEST: phpmyadmin

* 🐛 FIX: #45

* 🐛 FIX: path

* 🐛 FIX: typo in path

* 🐛 FIX: #45

* 🐛 FIX: remove quotes in sed for phpmyadmin

* 🤖 TEST: special chars

* 🤖 TEST: restore test back to dynamic state

* 🐛 FIX: phpmyadmin config

* 🐛 FIX: @ breaks things when generated string starts with one

* 🐛 FIX: create phpmyadmin db

* 🐛 FIX: spinner

* 🐛 FIX: #45

* 🐛 FIX: credentials

* 🐛 FIX: go back to cp of config.sample.inc.php

* 🤖 TEST: rsync progress

* 👌 IMPROVE: #62

* 🐛 FIX: tweak rsync progress

* 🐛 FIX: tweak rsync progress

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: rsync stats, restored spinner for speed

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: colorized rsync stats

* 🐛 FIX: log messages

* 👌 IMPROVE: remove auth, edit comments

* 👌 IMPROVE: Installtion information API for #61

* 📖 DOC: comments

* 🤖 TEST: call yarn installs less

* 🤖 TEST: call yarn installs less

* 🐛 FIX: refactor to save calls to yarn install

* 🐛 FIX: refactor to save calls to yarn install

* 🤖 TEST: refactor to save calls to yarn install

* 🐛 FIX: load spinner

* 🐛 FIX: error mix not found

* 🐛 FIX: tweak order

* 🐛 FIX: line 130: printf: --: invalid option

* 🐛 FIX: line 130: printf: --: invalid option

* 🐛 FIX: tweaks

* 🤖 TEST: fix npm error

* 🤖 TEST: error in npm when install react scaffolding

* 🤖 TEST: with no yarn run dev after node modules are installed

* 🤖 TEST: installs

* 🐛 FIX: tweaks for less npm installs can rless running of laravel mix

* 🤖 TEST: tweaks for installs

* 🐛 FIX: install info API, bad regexp

* 🐛 FIX: new logic for installs

* 🐛 FIX: run_laraval_mix_twice

* 🐛 FIX: run_laravel_mix twice in the wrong spot

* 🤖 TEST: run larvel mix twice

* 🤖 TEST: run larvel mix twice

* 🐛 FIX: fresh start on getting out of this hole

* 🤖 TEST: vue install

* 🤖 TEST: adding in laravel mix run when installing laravel/ui

* 🤖 TEST: adding in laravel mix run when installing laravel/ui, remove extraneous condition

* 🤖 TEST: no npm install after install of larvel/ui

* 🤖 TEST: remove inistal npm install

* 🤖 TEST: remove inistal npm install

* 🤖 TEST: remove inistal npm install

* 🤖 TEST: react install

* 🤖 TEST: no front end scaffolding installs, still install node modules

* 🐛 FIX: typo

* 🤖 TEST: no front end scaffolding installs

* 🐛 FIX: conditional

* 📖 DOC: comments

* 🐛 FIX: make successes a silent log

* 🐛 FIX: install conditions, ready to test

* 📖 DOC: fixed and tested one-liners for project creation

* 🐛 FIX: typo in condition

* 🐛 FIX: install node modules blindly to avoid frontend scaffolding overwrite

* 🐛 FIX: remove uneccessary  function

* 🐛 FIX: phpmyadmin install

* 🐛 FIX: path to public/phpmyadmin/config.inc.php

* 👌 IMPROVE: enhanced phpmyadmin setup logic

* 👌 IMPROVE: #64 Support .starter.env for sensitive data like phpmyadmin credentials

* 🐛 FIX: refactor #64, works good

* 🐛 FIX: rename and fix

* 🐛 FIX: path

* 🐛 FIX: file name

* 📖 DOC: #66 Add phpMyAdmin section to README.md

* 👌 IMPROVE: no trailing newline for .txt files

* 👌 IMPROVE: #65 Add log message to summary

* 📖 DOC: improve message

* 📖 DOC: improve message

* 🐛 FIX: #67 'before' tasks should be logged to file but not to the console

* 👌 IMPROVE: log messages

* 👌 IMPROVE: #68 Add help alias

* 👌 IMPROVE: success messages are logged silently

* 👌 IMPROVE: add silent log

* 🐛 FIX: log messages

* 🐛 FIX: logs and comments

* 🐛 FIX: #63

* 🐛 FIX: #41 Rename test-app to laravel8-starter

* 🤖 TEST: force workspace image build

* 🐛 FIX: rsync path

* 🐛 FIX: log message

* 🐛 FIX: message

* 🐛 FIX: message

* 🐛 FIX: message

* 👌 IMPROVE: #39 Expand Gitlog with additional emoji and git aliases

* 🐛 FIX: #39 change add to ad, add noadd aliases

* 📖 DOC: update as per #39

* 🐛 FIX: summary message

* 🐛 FIX: messaging

* 🐛 FIX: #69

* 🐛 FIX: fine tune, logic and logs

* 🐛 FIX: wording

* 🐛 FIX: edit log message

* 🐛 FIX: alias: add changed to ad

* 🐛 FIX: log silent on env injection success

* 🐛 FIX: log msg

* 🤖 TEST: fix broken web preview spinner

* 🤖 TEST: fix for hung preview

* 👌 IMPROVE: hung preview fix

* 🤖 TEST: preview browser fix

* 🤖 TEST: phpmyadmin install=0

* ♻️ REFACTOR: preview browser

* 👌 IMPROVE: preview browser message

* 🐛 FIX: removed preview browser open msg since #19 is a gitpod internal bug

* 🤖 TEST: barebones install

* 🤖 TEST: changelog generator

* 🤖 TEST: force workspace image build

* 🤖 TEST: changelog generator

* ⚰️ REMOVE: workaround code for #46

* 🤖 TEST: force workspace image build

* 🐛 FIX: init scripts should not depend on eachothers success

* 🤖 TEST: force workspace image build

* 📖 DOC: edit and enhance README

* 🐛 FIX: removed ... from log messages
apolopena added a commit that referenced this issue Mar 24, 2021
* 📖 DOC: #58 Readme: Revamp and add TOC

* 🐛 FIX: #45

* 🤖 TEST: phpmyadmin

* 🐛 FIX: #45

* 🐛 FIX: path

* 🐛 FIX: typo in path

* 🐛 FIX: #45

* 🐛 FIX: remove quotes in sed for phpmyadmin

* 🤖 TEST: special chars

* 🤖 TEST: restore test back to dynamic state

* 🐛 FIX: phpmyadmin config

* 🐛 FIX: @ breaks things when generated string starts with one

* 🐛 FIX: create phpmyadmin db

* 🐛 FIX: spinner

* 🐛 FIX: #45

* 🐛 FIX: credentials

* 🐛 FIX: go back to cp of config.sample.inc.php

* 🤖 TEST: rsync progress

* 👌 IMPROVE: #62

* 🐛 FIX: tweak rsync progress

* 🐛 FIX: tweak rsync progress

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: rsync stats, restored spinner for speed

* 🐛 FIX: use native rsync progress option

* 🐛 FIX: colorized rsync stats

* 🐛 FIX: log messages

* 👌 IMPROVE: remove auth, edit comments

* 👌 IMPROVE: Installtion information API for #61

* 📖 DOC: comments

* 🤖 TEST: call yarn installs less

* 🤖 TEST: call yarn installs less

* 🐛 FIX: refactor to save calls to yarn install

* 🐛 FIX: refactor to save calls to yarn install

* 🤖 TEST: refactor to save calls to yarn install

* 🐛 FIX: load spinner

* 🐛 FIX: error mix not found

* 🐛 FIX: tweak order

* 🐛 FIX: line 130: printf: --: invalid option

* 🐛 FIX: line 130: printf: --: invalid option

* 🐛 FIX: tweaks

* 🤖 TEST: fix npm error

* 🤖 TEST: error in npm when install react scaffolding

* 🤖 TEST: with no yarn run dev after node modules are installed

* 🤖 TEST: installs

* 🐛 FIX: tweaks for less npm installs can rless running of laravel mix

* 🤖 TEST: tweaks for installs

* 🐛 FIX: install info API, bad regexp

* 🐛 FIX: new logic for installs

* 🐛 FIX: run_laraval_mix_twice

* 🐛 FIX: run_laravel_mix twice in the wrong spot

* 🤖 TEST: run larvel mix twice

* 🤖 TEST: run larvel mix twice

* 🐛 FIX: fresh start on getting out of this hole

* 🤖 TEST: vue install

* 🤖 TEST: adding in laravel mix run when installing laravel/ui

* 🤖 TEST: adding in laravel mix run when installing laravel/ui, remove extraneous condition

* 🤖 TEST: no npm install after install of larvel/ui

* 🤖 TEST: remove inistal npm install

* 🤖 TEST: remove inistal npm install

* 🤖 TEST: remove inistal npm install

* 🤖 TEST: react install

* 🤖 TEST: no front end scaffolding installs, still install node modules

* 🐛 FIX: typo

* 🤖 TEST: no front end scaffolding installs

* 🐛 FIX: conditional

* 📖 DOC: comments

* 🐛 FIX: make successes a silent log

* 🐛 FIX: install conditions, ready to test

* 📖 DOC: fixed and tested one-liners for project creation

* 🐛 FIX: typo in condition

* 🐛 FIX: install node modules blindly to avoid frontend scaffolding overwrite

* 🐛 FIX: remove uneccessary  function

* 🐛 FIX: phpmyadmin install

* 🐛 FIX: path to public/phpmyadmin/config.inc.php

* 👌 IMPROVE: enhanced phpmyadmin setup logic

* 👌 IMPROVE: #64 Support .starter.env for sensitive data like phpmyadmin credentials

* 🐛 FIX: refactor #64, works good

* 🐛 FIX: rename and fix

* 🐛 FIX: path

* 🐛 FIX: file name

* 📖 DOC: #66 Add phpMyAdmin section to README.md

* 👌 IMPROVE: no trailing newline for .txt files

* 👌 IMPROVE: #65 Add log message to summary

* 📖 DOC: improve message

* 📖 DOC: improve message

* 🐛 FIX: #67 'before' tasks should be logged to file but not to the console

* 👌 IMPROVE: log messages

* 👌 IMPROVE: #68 Add help alias

* 👌 IMPROVE: success messages are logged silently

* 👌 IMPROVE: add silent log

* 🐛 FIX: log messages

* 🐛 FIX: logs and comments

* 🐛 FIX: #63

* 🐛 FIX: #41 Rename test-app to laravel8-starter

* 🤖 TEST: force workspace image build

* 🐛 FIX: rsync path

* 🐛 FIX: log message

* 🐛 FIX: message

* 🐛 FIX: message

* 🐛 FIX: message

* 👌 IMPROVE: #39 Expand Gitlog with additional emoji and git aliases

* 🐛 FIX: #39 change add to ad, add noadd aliases

* 📖 DOC: update as per #39

* 🐛 FIX: summary message

* 🐛 FIX: messaging

* 🐛 FIX: #69

* 🐛 FIX: fine tune, logic and logs

* 🐛 FIX: wording

* 🐛 FIX: edit log message

* 🐛 FIX: alias: add changed to ad

* 🐛 FIX: log silent on env injection success

* 🐛 FIX: log msg

* 🤖 TEST: fix broken web preview spinner

* 🤖 TEST: fix for hung preview

* 👌 IMPROVE: hung preview fix

* 🤖 TEST: preview browser fix

* 🤖 TEST: phpmyadmin install=0

* ♻️ REFACTOR: preview browser

* 👌 IMPROVE: preview browser message

* 🐛 FIX: removed preview browser open msg since #19 is a gitpod internal bug

* 🤖 TEST: barebones install

* 🤖 TEST: changelog generator

* 🤖 TEST: force workspace image build

* 🤖 TEST: changelog generator

* ⚰️ REMOVE: workaround code for #46

* 🤖 TEST: force workspace image build

* 🐛 FIX: init scripts should not depend on eachothers success

* 🤖 TEST: force workspace image build

* 📖 DOC: edit and enhance README

* 🐛 FIX: removed ... from log messages

* 📖 DOC: Gitpod Caveats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal-gitpod-bug Bug in the Gitpod platform itself passed-dev-qa Optional state. Use this when QAing other peoples fixes in another branch.ready to be merged to main
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants