Comments (6)
well... it works again, weird.
I use npm start
with production config, and it works for the moment.
I noticed there is a new start.sh
script there in the current version. I tried it, but it doesn't work. console outputs:
> [email protected] production /home/ubuntu/projects/konga
> concurrently "(cd backend && node app.js --prod)" "(cd frontend && node server.js)"
[1] Server running on 3000...
[0] Initializing `apianalytics` hook... (requests to monitored routes will be logged!)
[0]
[0] .-..-.
[0]
[0] Sails <| .-..-.
[0] v0.11.2 |\
[0] /|.\
[0] / || \
[0] ,' |' \
[0] .-'.-==|/_--'
[0] `--'-------'
[0] __---___--___---___--___---___--___
[0] ____---___--___---___--___---___--___-__
[0]
[0] Server lifted in `/home/ubuntu/projects/konga/backend`
[0] To see your app, visit http://localhost:3000
[0] To shut down Sails, press <CTRL> + C at any time.
[0]
[0]
[0] --------------------------------------------------------
[0] :: Sun Feb 26 2017 13:20:28 GMT+0000 (UTC)
[0] Environment : production
[0] Port : 3000
[0] --------------------------------------------------------
[0] events.js:160
[0] throw er; // Unhandled 'error' event
[0] ^
[0]
[0] Error: listen EADDRINUSE :::3000
[0] at Object.exports._errnoException (util.js:1022:11)
[0] at exports._exceptionWithHostPort (util.js:1045:20)
[0] at Server._listen2 (net.js:1259:14)
[0] at listen (net.js:1295:10)
[0] at Server.listen (net.js:1391:5)
[0] at Array.start (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/hooks/http/start.js:29:35)
[0] at /home/ubuntu/projects/konga/backend/node_modules/sails/node_modules/async/lib/async.js:484:38
[0] at _each (/home/ubuntu/projects/konga/backend/node_modules/sails/node_modules/async/lib/async.js:46:13)
[0] at Object.async.auto (/home/ubuntu/projects/konga/backend/node_modules/sails/node_modules/async/lib/async.js:455:9)
[0] at Sails.startServer (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/hooks/http/start.js:16:11)
[0] at emitNone (events.js:86:13)
[0] at Sails.emit (events.js:185:7)
[0] at Sails.emitter.emit (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/app/private/after.js:50:11)
[0] at afterBootstrap (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/app/private/initialize.js:56:11)
[0] at bootstrapDone (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/app/private/bootstrap.js:51:14)
[0] at Object.bootstrap (/home/ubuntu/projects/konga/backend/config/bootstrap.js:20:3)
[0] (cd backend && node app.js --prod) exited with code 1
I use 3000
and 8080
for my backend and frontend respectively.
In other words, npm start
works (which automatically in the production mode although I type development
in the backend's config file), but npm run production
doesn't work with errors as before.
from konga.
Hello @tumluliu,
start.shrefers to the docker implemenation. It's not to be used when running Konga from source.
The error you posted, is showing that another process is occupying port 3000. You should search for that process and kill it. Maybe the frontend was lifted on a previous attempt on port 3000 and is still running.
You should be able to run Konga in production mode by doing:
$ cd frontend
$ gilp dist
$ cd ..
$ npm run production
from konga.
thanks @pantsel for your reply. But it doesn't work with your given commands. To make it clear, I use 3000 port for the backend, 8081 (development) and 8080 (production) for the frontend. My local.js
config for the backend:
'use strict';
module.exports = {
/**
* The default fallback URL to Kong's admin API.
*/
kong_admin_url : process.env.KONG_ADMIN_URL || 'http://127.0.0.1:8001',
connections: {
},
models: {
},
session: {
secret: '' // Add your own SECRET string here
},
port: 3000,
environment: 'development',
log: {
level: 'info'
}
};
And the config.json
for frontend is:
{
"backendUrl": "http://PUBLIC_IP_ADDR_OF_MY_SERVER:3000",
"frontend": {
"ports": {
"production": 8080,
"development": 8081
}
}
}
They work just fine before the dev
branch has been merged to master
. But the following errors are reported if I execute the commands in your comment. It seems that the backend is running on 3000 with no problem. But the frontend always tries to connect to http://localhost:3000
and tries to listen 3000 port instead of 8080. Is there any hard coding in the source? Or I changed the wrong config file?
> [email protected] production /home/ubuntu/projects/konga
> concurrently "(cd backend && node app.js --prod)" "(cd frontend && node server.js)"
[1] Server running on 3000...
[0] Initializing `apianalytics` hook... (requests to monitored routes will be logged!)
[0]
[0] .-..-.
[0]
[0] Sails <| .-..-.
[0] v0.11.2 |\
[0] /|.\
[0] / || \
[0] ,' |' \
[0] .-'.-==|/_--'
[0] `--'-------'
[0] __---___--___---___--___---___--___
[0] ____---___--___---___--___---___--___-__
[0]
[0] Server lifted in `/home/ubuntu/projects/konga/backend`
[0] To see your app, visit http://localhost:3000
[0] To shut down Sails, press <CTRL> + C at any time.
[0]
[0] --------------------------------------------------------
[0] :: Thu Mar 09 2017 11:07:18 GMT+0000 (UTC)
[0] Environment : production
[0] Port : 3000
[0] --------------------------------------------------------
[0]
[0] events.js:160
[0] throw er; // Unhandled 'error' event
[0] ^
[0]
[0] Error: listen EADDRINUSE :::3000
[0] at Object.exports._errnoException (util.js:1022:11)
[0] at exports._exceptionWithHostPort (util.js:1045:20)
[0] at Server._listen2 (net.js:1259:14)
[0] at listen (net.js:1295:10)
[0] at Server.listen (net.js:1391:5)
[0] at Array.start (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/hooks/http/start.js:29:35)
[0] at /home/ubuntu/projects/konga/backend/node_modules/sails/node_modules/async/lib/async.js:484:38
[0] at _each (/home/ubuntu/projects/konga/backend/node_modules/sails/node_modules/async/lib/async.js:46:13)
[0] at Object.async.auto (/home/ubuntu/projects/konga/backend/node_modules/sails/node_modules/async/lib/async.js:455:9)
[0] at Sails.startServer (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/hooks/http/start.js:16:11)
[0] at emitNone (events.js:86:13)
[0] at Sails.emit (events.js:185:7)
[0] at Sails.emitter.emit (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/app/private/after.js:50:11)
[0] at afterBootstrap (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/app/private/initialize.js:56:11)
[0] at bootstrapDone (/home/ubuntu/projects/konga/backend/node_modules/sails/lib/app/private/bootstrap.js:51:14)
[0] at Object.bootstrap (/home/ubuntu/projects/konga/backend/config/bootstrap.js:20:3)
[0] (cd backend && node app.js --prod) exited with code 1
^C[1] (cd frontend && node server.js) exited with code null
from konga.
let me check it out and i will get back to you.
from konga.
Check out the new release https://github.com/pantsel/konga/releases/tag/v0.5.0
from konga.
@pantsel I have deployed the 0.5.1 version. It's great to see the amazing changes especially the compatibility with kong 0.10. Great job! And the config problem is gone. But I met another problem, see #30
from konga.
Related Issues (20)
- [deleted]
- access konga failed HOT 1
- Dead Project? HOT 3
- Mask Api Keys of Consumers
- konga docker startup happen error HOT 2
- failed to restart to Konga with LocalDb
- an issue when i install konga
- pongo shell command does not launch Postgre SQL docker instance
- 无法通过API 激活 Connections kong node HOT 1
- support AD/LDAP failover by allowing configuration of multiple AD hosts
- [INFO] King GUI for Kong which could replace Konga HOT 2
- custom_fields_by_lua not handled properly by UI
- Missing feature to PROVISION basic configuration (create admin user directly from environment variables in Docker)
- Unnecessary files are added to the Docker container
- Insecure behaviour by default: a vanilla run asks for admin creation
- How to fix Kong timers always running and not response?
- least-connection algorithm missing over Konga
- CVE-2023-39791
- CVE-2023-39792
- Unexpected behavior in Konga dashboard: Accepted & Handled count increment on dashboard reload
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from konga.