[Read Me](README.md) > FAQ
# Frequently Asked Questions
## Problem 1
Getting error:
> unable to set up TCP listener: Permission denied (os error 13)
### Solution
Run `rws` with administrator privileges (`sudo` on Linux/macOS, run as Administrator on Windows).
## Problem 2
Getting error:
> unable to set up TCP listener: Address already in use (os error 48)
### Solution
Another process is already using that port. Find and stop it:
```bash
sudo lsof -i :7878 # macOS and Linux
sudo fuser 7878/tcp # Linux only
```
## Problem 3
Started `rws` on `127.0.0.1` but cannot reach it from other devices on the local network.
### Solution
`127.0.0.1` is the loopback address — it only accepts connections from the same machine. Start `rws` bound to the machine's network IP or `0.0.0.0`:
```bash
rws --ip=0.0.0.0
```
## Problem 4
Getting error in the console:
> unable to parse request: invalid utf-8 sequence of _n_ bytes from index _m_
### Solution
The server received a request that is not valid UTF-8. This can happen when a client sends binary data or when a browser connects via HTTP to an HTTPS-only server. Safe to ignore.
## Problem 5
Getting error in the console:
> unable to parse request: Unable to parse method, request uri and http version
### Solution
The server received a malformed or unexpected request (e.g. a port scanner or protocol mismatch). Safe to ignore.
## Problem 6
Getting error on Linux:
> unable to set up TCP listener: Cannot assign requested address (os error 99)
### Solution
The IP address you specified is not assigned to any local interface. Use `ip addr` to list available addresses.
## Problem 7
How do I start the server on IPv6?
### Solution
```bash
rws --ip=::
```
## Problem 8
Started with `--ip=::` but cannot connect via `fe80::...` link-local address.
### Solution
Use the interface's `inet` (IPv4) address instead. It will be mapped internally to `[::ffff:192.168.x.y]`.
## Problem 9
Trying to open a directory URL gets a _404 Not Found_ error.
### Solution
Directory listing is intentionally not supported (a security decision). Create an `index.html` file in the directory, or link to the files explicitly in an HTML page.
## Problem 10
Cannot connect to server:
> Failed to connect to 192.168.x.y port N: Connection refused
### Solution
A firewall is likely blocking the port. Temporarily disable the firewall and retry.
## Problem 11
Cannot start server as root:
> Command not found
### Solution
`/usr/local/bin` or `~/.cargo/bin` is not in root's `$PATH`. Use the full path:
```bash
sudo /usr/local/bin/rws
# or
sudo ~/.cargo/bin/rws
```
## Problem 12
Build fails with:
> linker 'cc' not found
### Solution
Install the C development toolchain:
```bash
sudo apt-get install build-essential # Debian/Ubuntu
sudo dnf group install "Development Tools" # Fedora/RHEL
sudo pacman -S base-devel # Arch Linux
```
## Problem 13
Build fails in IDE with:
> error[E0514]: found crate `NAME` compiled by an incompatible version of rustc
### Solution
```bash
cargo clean
cargo build
```
## Problem 14
Build fails with registry lock error:
> failed open - 'PATH.git/FETCH_HEAD' is locked: Permission denied
### Solution
```bash
sudo cargo clean
sudo cargo build
```
## Problem 15
Getting error when pulling sources:
> The following untracked working tree files would be overwritten by merge: Cargo.lock
### Solution
```bash
rm Cargo.lock
```
It will be regenerated on the next build.
## Problem 16
Why do some methods start with `_`?
### Solution
Rust warns about unused items. The leading underscore suppresses that warning for intentionally kept-but-unused public API methods.
## Problem 17
How do I view server logs over HTTP?
### Solution
Redirect stdout to a file and serve it:
```bash
rws &> out.txt &
```
Then open `http://hostname:port/out.txt`. The file grows over time; watch its size.
## Problem 18
Started `rws` but HTTPS / HTTP/2 / HTTP/3 is not working.
### Solution
No TLS certificate is configured. Provide certificate and key paths:
```bash
rws --tls-cert-file=/path/to/cert.pem --tls-key-file=/path/to/key.pem
```
Without a certificate the server falls back to plain HTTP/1.1 automatically. See [CONFIGURE](CONFIGURE.md) for all configuration options.
## Problem 19
Getting a TLS error on startup:
> TLS setup failed: failed to read cert file ...
### Solution
The certificate or key file path is wrong or the process does not have read permission. Verify the paths and permissions. Both files must be in PEM format.
## Problem 20
Browser shows a security warning when connecting to the local HTTPS server.
### Solution
Self-signed certificates are not trusted by browsers by default. For local development, add the certificate to your system trust store. For production, use a certificate from [Let's Encrypt](https://letsencrypt.org/).