Troubleshooting
The following are a list of frequently observed issues with our tech stack configuration.
2nd Docker Container Hangs On Vercel TurboRepo Authentication
Issue:
You've already attached to a running Docker container successfully. When you try to attach to a second Docker container, your browser window opens, and you see that it's trying to contact Vercel to authenticate, but it hangs.
Solution:
It hangs for the 2nd Docker container because the first Docker container is still sitting on the port, 9789, that Vercel uses for authentication. Go to the your ports tab in the first Docker container and delete the port. Clicking on the port number, 9789, should reveal an X that you can click on to delete the port.
Now when you attach to the 2nd Docker container, it will be able to authenticate with Vercel.
PNPM Install fails due to Connection Reset by Peer
Issue:
When running your Docker, PNPM install or other outbound calls fail with the following error:
Recv failure: Connection reset by peer
or
A "socket" was not created for HTTP request before 600001ms
Solution:
Confirm that localhost:9000 is not responding on your local machine (not inside the container) by running this command:
curl http://localhost:9000
If that fails, the issue is very likely caused by having PHP installed on your local machine. There are a few solutions:
- Preferred - Remove PHP from your local machine and use the Docker container that Mohsen provides for everyone.
- Just stop PHP from auto loading on boot... which will still be problematic when you try to load PHP later.
- Alter the listening port in PHP to something other than 9000. For documentation, look here: https://www.ans.co.uk/docs/operatingsystems/linux/php-fpm/phpfpmsetup/
Bad interpreter: No such file or directory
Issue:
When running pnpm localsetup, you get the following error:
sh: ./docker-install.sh: /bin/bash^M: bad interpreter: No such file or directory ELIFECYCLE Command failed with exit code 126.
Solution:
You need to unset autoCRLF in git config - it is converting to Windows-style Line breaks.
git config --global --unset core.autocrlf
Git clone/pull failures (Github)
Issue: Unable resolve proxy while cloning a new github repository.
Error: error: Could not resolve proxy: proxy.schwab.net
Solution: Run below commands
On Zscaler: (WiseN Wifi or other network)
git config --global http.proxy http://host.docker.internal:9000
In Office (Ethernet ONLY):
git config --global http.proxy http://{USERNAME}:{PASSWORD}@proxy.schwab.com:8080
Git PUSH failures (40X errors)
Issue: GIT is trying to push your changes up to GitHub through the proxy, so disable the proxy for GIT. You also may have to restart the docker container or the device (mac/windows).
Error: error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403 send-pack: unexpected disconnect while reading sideband packet
Solution: Run below commands
git config --global core.compression 0
git config --add remote.origin.proxy ""
You may have to reset your git origin
git remote set-url https://{first}-{last}_schwab:{YourGitHubPersonalAccessToken}}@github.com/charlesschwab/nextjs-web.git
If the above options do not solve the problem, try re-installing Zscaler through self-service.
ProGet/Maven/SOL 40X Error when pulling @schwab dependencies
Issue: 40X errors when pulling Schwab dependencies from ProGet/Sol/MavenRepo
Error Examples:
npm ERR! 401 Unauthorized - PUT https://sol.schwab.com/npm/npm-feed/-/user/org.couchdb.user:karthik.vechalapu - Invalid username/password.
ERR_PNPM_FETCH_403 GET https://sol.schwab.com/npm/npm-feed/@schwab/everest-css/-/everest-css-3.9.0.tgz: Forbidden - 403
Solution:
Run these commands:
export NO_PROXY=*.schwab.com
export HTTPS_PROXY=http://host.docker.internal:9000
export HTTP_PROXY=http://host.docker.internal:9000
npm login --registry=https://sol.schwab.com/npm/npm-feed/ --scope=@schwab --always-auth --auto-auth=true
In MyAccess request the "apw_ProgetFeeds_Registrar" or "apw_ProGetFeeds_Developers"
Nextjs-docker helper not available in Self-Service
Issue: Can not install the "nextjs-docker helper" on Mac because it's not available in JAMF/Self-Service App
Solution:
- Check to make sure you are logged into JAMF/Self-Service (bottom left corner of the window)
- Check to ensure you all required entitlements.
- Open the Mac Terminal app.
- Run this command:
sudo jamf recon - Quit Self-Service App and reopen it.
- You should now see it
Access denied to Docker/harbor.schwab.com
Issue: Can not create a Docker Image with new Generated token from Github
Error Examples:
Error response from daemon: Access to harbor.schwab.com is restricted by your Docker organization. To access this registry, ask your Docker administrator to add it to your organization's allowed registries.
Solution:
- Update .npmrc file with new password if it is not updated.
- Run proxyOn and proxyOff command in terminal.
- If command not found error occurred then reset Proxy using Proxy Config Reset from self service and then run showProxy in terminal to check proxy is set or not. Run step 2.
- Logout from Docker app and Login again with Schwab email.
- Create new container in VS code, if the command gets stuck at /home/setup.sh then open the execute tab in the new docker image and run ./setup.sh
DockerHub/Docker.io Authentication Error
Issue:
Windows Docker Desktop Authentication failure
Solution:
If you have a Docker.io account already setup with your Schwab.com email address, you will DEACTIVATE that account and re-signup with your schwab.com email AND create the username for Docker.io in this format:
firstlastschwab (i.e. tomjonesschwab or jagishkorrapaitschwab)
You will need to "Verify your email address" prior to the authentication being successful.
docker: context deadline exceeded Error
Issue:
Mac Docker Desktop context-deadline exceeded.
Solution:
It might be because the proxy settings was set to manual. Go to Setting → Resources → Proxies and uncheck Manual proxy configuration. If you are unable to open the settings via the GUI. Navigate to
If you are unable to open the settings using docker desktop gui without sign-in then update proxyHttpMode value to empty string("") in docker's settings.json file in ~/Library/Group Containers/group.com.docker/settings.json. Ensure Save the file, close and re-open the docker desktop.
Resources: https://docs.docker.com/desktop/settings/mac/
Windows VDI Github Login Blocked
Issue:
When attempting to authenticate to GitHub on a Schwab VDI you get blocked by the Blue Coat proxy.
Solution:
You need to request to be added to this AD Group: pol_Proxy_CASB_Github_Access
It is not available in MyAccess, instead you have to request it through a MyIT request:
https://myit.schwab.com/dwp/app/#/itemprofile/3201
Windows Docker Desktop WSL Kernel version too low
Issue:
Windows Docker Desktop Error: Docker Desktop requires a newer version of WSL.
Solution:
In Command Prompt, run the following command:
wsl --update
Note: If you don't already have them, you will need elevated privileges. Go to MyAccess and request "Add Workstation for Elevations" and "Run Elevated"
input device is not a TTY - windows docker
Issue:
The input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty' ELIFECYCLE Command failed with exit code 1.
The above error occurs when creating docker container using cms-local-environment-setup repo in windows box:
Solution:
Run below command in git bash:
alias docker="winpty docker"
Input to Copilot Chat Hangs In Drupal Container
Issue:
You are running a Drupal Docker container. When you try to enter a prompt into GitHub Copilot, it hangs or is very slow to respond. Sometimes, pressing carriage return does nothing. Activity Monitor (MacOS) shows that it's using a huge amount of CPU.
Observation: VSCode is spending massive CPU and I/O resources to index the entire Drupal container because the container is opened at the root "/". It does this so that operations like file search, change detection, "go to definition", and autocomplete can function properly.
Solution:
Sometimes, merely going to File->Open Folder... and opening the folder at /var/www will solve this issue. However, that might not be optimal for your work.
If you need the entire file hierarchy open, do the two solutions below.
- In your Drupal container, create a settings.json file here if it doesn't already exist:
/.vscode/settings.json
Add this to the file:
{
"files.watcherExclude": {
"**/proc/**": true,
"**/sys/**": true,
"**/dev/**": true,
"**/boot/**": true,
"**/tmp/**": true,
"**/var/log/**": true,
"**/var/cache/**": true,
"**/usr/**": true,
"**/lib/**": true,
"**/lib64/**": true,
"**/bin/**": true,
"**/sbin/**": true,
"**/opt/**": true
},
"files.exclude": {
"**/proc": true,
"**/sys": true,
"**/dev": true,
"**/boot": true
},
"search.exclude": {
"**/proc/**": true,
"**/sys/**": true,
"**/dev/**": true,
"**/boot/**": true,
"**/tmp/**": true,
"**/var/log/**": true,
"**/usr/**": true,
"**/lib/**": true,
"**/lib64/**": true
}
}
- When Copilot Chat analyzes your prompt, it launches
ripgrepto search for relevant code, and it searches the entire filesystem which can really slow your Docker container down and use a lot of CPU and I/O resources.
In your Drupal container, create a /.ignore file to tell ripgrep (the rg command used by VS Code and Copilot for searching) to ignore those directories when performing searches. Ripgrep automatically looks for .ignore files in the workspace root and respects them.
Add this to the /.ignore file:
/proc/
/sys/
/dev/
/boot/
/tmp/
/var/log/
/var/cache/
/usr/
/lib/
/lib64/
/bin/
/sbin/
/opt/
/run/
/etc/
/root/.vscode-server/
I Created A New GitHub Token But I have Existing Next.js Docker Containers
Issue:
When you create a new GitHub token -- presumably because your old one expired -- you need to update any Docker Containers that you have already created because they have the old Github token baked in.
Solution:
Go to a terminal window in your Docker container.
% cd /home/schwab-scripts
% ./setup-env-pnpm.sh
% ./setup-env-git.sh
:::info
If you try to use git and you see the message:
```text
remote: The 'charlesschwab' organization has enabled or enforced SAML SSO.
remote: To access this repository, visit https://github.com/enterprises/schwab/sso?authorization_request=BPPIIQBUNAISGRVL3FU3PJTJCS4HRA5NMNZGKZDFNZ2GSYLML5UWJUYAAAAABE27WG726Y3SMVSGK3TUNFQWYX3UPFYGLK2PMF2XI2CBMNRWK43TV5XXEZ3BNZUXUYLUNFXW4X3JMTJQAAAAAACWQG7I and try your request again.
Go to the link and then try your git operation again. :::
That will reset it to your new token.
This is a temporary fix. Once you've created your PR (or as soon as practical), delete your container and create a new one.
I Created A New Jira Token But I have Existing Next.js Docker Containers
Issue:
When you create a new Jira token -- presumably because your old one expired -- you need to update any Docker Containers that you have already created because they have the old Jira token baked in.
Solution:
There is no script-based solution for this yet. You can fix it manually, tho.
Type this in a terminal window:
export JIRA_TOKEN=<new Jira token value>
This is a temporary fix. Once you've created your PR (or as soon as practical), delete your container and create a new one.
before running schwab commit