Troubleshooting#
Common issues and solutions for GeoServer CLI.
Connection Issues#
Cannot Connect to GeoServer#
Symptom: connection refused or timeout errors
Solutions:
Verify GeoServer is running:
1curl http://localhost:8080/geoserver/rest/about/version.jsonCheck base URL:
1 2 3# Must include /rest at the end ./geoserver-cli config show # base_url should be: http://localhost:8080/geoserver/restVerify credentials:
1 2# Test with curl curl -u admin:geoserver http://localhost:8080/geoserver/rest/workspaces.jsonCheck firewall/network:
- Ensure port 8080 is open
- Check if VPN or proxy is interfering
- Try accessing GeoServer web UI
Authentication Failed#
Symptom: 401 Unauthorized errors
Solutions:
Verify credentials:
1 2# Check what's being used ./geoserver-cli config showReset admin password in GeoServer:
- Access GeoServer web UI
- Security → Users → admin
Check for special characters:
1 2# Passwords with special characters need quotes password = "p@ssw0rd!"
SSL/TLS Errors#
Symptom: certificate verify failed or SSL errors
Solutions:
For self-signed certificates (dev only):
1 2# Skip TLS verification (NOT for production) export GODEBUG=http2debug=2Use HTTP instead of HTTPS (dev only):
1base_url = "http://localhost:8080/geoserver/rest"
Configuration Issues#
Config File Not Found#
Symptom: config file not found errors
Solutions:
Initialize config:
1./geoserver-cli config initCheck config path:
1 2 3 4 5# Should output: .githooks (or empty) git config --get core.hooksPath # Set if needed export GEOSRVCLI_CONFIG=defaultVerify file exists:
1ls -la configs/default.config.toml
Environment Variables Not Working#
Symptom: Config values not being applied
Solutions:
Check precedence:
1 2 3 4 5# CLI flags override everything ./geoserver-cli workspace list --base-url http://example.com/geoserver/rest # Environment variables override config file export GEOSRVCLI_ENDPOINT=http://example.com/geoserver/restVerify environment variables:
1env | grep GEOSRVCLICheck spelling:
- Must be
GEOSRVCLI_prefix (notGEOSERVER_) - Use
GEOSRVCLI_ENDPOINT(notGEOSRVCLI_BASE_URL)
- Must be
Publishing Issues#
PostGIS Connection Failed#
Symptom: Cannot publish layers from PostGIS
Solutions:
Test PostGIS connection:
1psql -h localhost -U postgres -d gis -c "SELECT PostGIS_version();"Check PostGIS config:
1 2./geoserver-cli config show # Verify postgis sectionTest with publish dry-run:
1./geoserver-cli publish postgis --all -w test --dry-run
No Spatial Tables Found#
Symptom: no publishable layers selected
Solutions:
Verify spatial tables exist:
1 2 3SELECT f_table_name, f_geometry_column, srid, type FROM geometry_columns WHERE f_table_schema = 'public';Check schema:
1 2# Specify correct schema ./geoserver-cli publish postgis --all -w test --pg-schema public
File Import Failed#
Symptom: Importer extension errors
Solutions:
Verify Importer extension is installed:
- Check GeoServer web UI → About → Extensions
- Should see “Importer Extension”
Install if missing:
- Download from GeoServer downloads
- Copy JAR to
webapps/geoserver/WEB-INF/lib/ - Restart GeoServer
Check file format:
1 2 3 4 5# Shapefile must be zipped zip -r data.zip data.shp data.shx data.dbf data.prj # GeoTIFF should work directly ./geoserver-cli publish file --file data.tif -w test
Layer Issues#
Layer Not Visible in QGIS#
Symptom: Layer exists but doesn’t show in QGIS
Solutions:
Check layer is advertised:
1./geoserver-cli layer update my_layer --advertised trueVerify layer is enabled:
1./geoserver-cli layer update my_layer --enabled trueCheck QGIS auth configuration:
Style Not Applied#
Symptom: Layer uses default style instead of custom
Solutions:
Set default style:
1./geoserver-cli layer update my_layer --default-style my_styleVerify style exists:
1./geoserver-cli style list | grep my_style
Performance Issues#
Slow Commands#
Symptom: Commands take too long
Solutions:
Increase timeout:
1./geoserver-cli workspace list --timeout 60sCheck GeoServer performance:
- GeoServer web UI → Server Status
- Check memory usage
Use concurrency for bulk operations:
1 2# Adjust based on your system ./geoserver-cli publish postgis --all -w test --concurrency 4
Memory Issues#
Symptom: Out of memory errors
Solutions:
Process in batches:
1 2# Instead of --all, use --layers with small batches ./geoserver-cli publish postgis --layers table1,table2,table3 -w testIncrease GeoServer memory:
1 2# In GeoServer startup script JAVA_OPTS="-Xms512m -Xmx2048m"
Development Issues#
Pre-commit Hook Failing#
Symptom: Cannot commit due to hook errors
Solutions:
Install required tools:
1./scripts/install-tools.shRun checks manually:
1 2 3 4gofmt -w . go vet ./... ./bin/golangci-lint run ./... go test ./...Bypass (emergency only):
1git commit --no-verify -m "message"
Build Failures#
Symptom: go build fails
Solutions:
Check Go version:
1go version # Should be 1.24 or laterUpdate dependencies:
1 2go mod download go mod tidyClean and rebuild:
1 2 3go clean -cache rm geoserver-cli go build -o geoserver-cli ./cmd/geoserver-cli
Getting Help#
Check Logs#
Enable verbose output:
| |
Report Issues#
If you can’t resolve the issue:
- Check existing issues: https://gitlab.com/aice/geoserver-cli/-/issues
- Create a new issue with:
- CLI version:
./geoserver-cli version - Command that failed
- Full error message
- Configuration (redact passwords!)
- CLI version:
Community Support#
- GitLab Issues: Report bugs and feature requests
- Discussions: Ask questions and share tips
- Contributing Guide: Learn how to contribute fixes
Quick Diagnostics#
Run these commands to gather diagnostic information:
| |