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

Frontend wont start #4

Closed
vivek779 opened this issue Nov 21, 2015 · 26 comments
Closed

Frontend wont start #4

vivek779 opened this issue Nov 21, 2015 · 26 comments

Comments

@vivek779
Copy link

Hello there
i tried to installed your galleon smtp server with front end i followed your installation. Md galleon is installed and stated successfully but i tried to install seasscape it is installed bt it is not showing front end
.After installation i tries to access front end on 2095 port it show error 404
please guide what mistake i am doing

@schahriar
Copy link
Owner

Does it show this error? 404 - Not Found!

In that case try http://localhost:2095**/home** and let me know if you see the interface.

@vivek779
Copy link
Author

Thanks for the quick revert
yes its shows this error 404 - Not Found!
i am able to see interface with http://lFQDN:2095/home
Bt its just an interface no link is working

@schahriar schahriar added the bug label Nov 21, 2015
@schahriar
Copy link
Owner

I can confirm that there is an issue with Seascape. It should re-build resources using gulp with the given port. I'll commit a bunch of updates to the repository in the upcoming days to fix this issue.

@vivek779
Copy link
Author

Ok thanks for the quick revert

@schahriar
Copy link
Owner

This issue is currently partially fixed. There is a bug within Galleon with how CORS (Cross-Origin Resource Sharing) is handled. I'll commit a fix for that today.

@schahriar schahriar mentioned this issue Nov 21, 2015
@schahriar
Copy link
Owner

Try the following steps to fix your current instance of Galleon:

npm install -g galleon@0.3.1
npm remove -g galleon-seascape
galleon install seascape
galleon config seascape api "http://FQDN:3080/"

Just replace the FQDN in the last command with your Fully Qualified Domain Name and you should be good to go.

@vivek779
Copy link
Author

I have followed your steps
now i am able to as see interface at "http://FQDN:2095/"
but the problem prevails not a single link are working and
I also tried to access with "http://FQDN:3080/"
it is showing error like
{"error":"Not Authenticated","definition":"NOT AUTHENTICATED"}

@schahriar schahriar reopened this Nov 23, 2015
@schahriar
Copy link
Owner

The error shown at port 3080 is correct but Seascape fails to identify access url to login into the API. The issue is with how URLs are set. I had an issue in my NGINX setup and patched the code to work with it either way and now it is causing issues with the recent changes. I've modified the code (b23d844) and published it to npm as 0.4.0 (Changes break API).

You'll need to follow these steps to re-install Galleon:

npm remove -g galleon-seascape
npm install -g galleon@0.4.0
galleon install seascape
galleon config seascape api "http://FQDN:3080/"
galleon add info@fqdn.com --password="somepassword" --name="User"
galleon start && galleon restart

Note that Sails-Memory doesn't store users appropriately. You should see a login page once you access port 2095. Let me know if this works.

@vivek779
Copy link
Author

Followed your steps
Not able to add a mails with password and user of my choice
for eg
galleon add info@fqdn.com --password="vivek" --name="root"
or any mail id
However i am able to create user with your command
galleon add info@fqdn.com --password="somepassword" --name="User"
but still same error occurred on FQDN 3080 {"error":"Not Authenticated","definition":"NOT AUTHENTICATED"}
But on port Fqdn2095 it show a screen with email id and password to be filled for authentication so
I entered the mail id and password and it shows a blank screen

@schahriar
Copy link
Owner

I've identified two more issue with Seascape that I'll list here:

  1. Some of the files in the recent changes didn't make it to the published version.
  2. CORS Ajax requests weren't set properly. CORS Cookies not set Seascape#3

Fixed: here schahriar/Seascape@b11120e & here schahriar/Seascape@c036036 and I've deprecated versions below 2.1.1

Quick fix:

npm install galleon-seascape@2.1.1
galleon restart

Note that the inbox will be flashing gray until you receive emails.

Regarding the issue with adding users, the password is validated before creation and should be at least 6 letters. I'll add a force option in the next release (#7).

More info on the validation:
https://github.com/schahriar/Galleon/blob/master/Galleon.js#L244-L249

Let me know how it goes.

@vivek779
Copy link
Author

Installed galleon-seascape@2.1.1
restarted galleon
I am able to send test mail on 25 port but it is not receiving on my id
and I am able to add user of my choice but
Same response on 2095 as well as 3080 port
A login screen come on 2095 port when i entered the respected credentials green screen came with nothing on it to click.
On 3080 port {"error":"Not Authenticated","definition":"NOT AUTHENTICATED"}

@schahriar
Copy link
Owner

The error 403 on port 3080 is correct as you should authenticate with a post request. I've tried this setup and it works as intended using the MongoDB & Disk drivers (databases) so I suggest that you try a clean install first:

npm remove -g galleon galleon-seascape
npm install -g galleon
galleon install seascape
galleon setup
galleon start

See if this works. Otherwise try opening the Developer Console (Ctrl+Shift+I in Chrome) and select network tab. Then reload the page and try logging in and see if there are any requests sent and if so whether they succeed. You should also checkout the console tab for any JS errors. Let me know if you can get results. I'll setup a test instance tomorrow to see if I can reproduce the issue.

@vivek779
Copy link
Author

Done a clean installation and added a user also same response i got attaching screenshot of developer console screen
screenshot from 2015-11-25 13 11 33
screenshot from 2015-11-25 13 12 00

@schahriar
Copy link
Owner

Your API is set to localhost.

Try:

galleon config seascape api "http://mac.bakemoon.net:3080/"

I am currently not sure if Seascape configures this properly but try this url:

http://FQDN:2095/GETAPIURL

Your should get http://FQDN:3080/. Note that your FQDN is mac.bakemoon.net

@vivek779
Copy link
Author

First used
galleon config seascape api "http://mac.bakemoon.net:3080/"
then tried http://mac.bakemoon.net:2095/GETAPIURL and page showing
{"url":"http://localhost:3080/"}
not working

@schahriar
Copy link
Owner

Front-end modules are started on galleon start and galleon restart. There is currently no implementation to reset the config after an instance has started. For now try restarting galleon

galleon restart

This works on my end.

http://FQDN:2095/GETAPIURL should show {"url":"http://FQDN:3080/"}

@vivek779
Copy link
Author

I have done complete fresh installation starting from os reinstallation
Yes it also showing the same on my end also
http://FQDN:2095/GETAPIURL shows {"url":"http://FQDN:3080/"}

@schahriar
Copy link
Owner

Does the front-end work? I suggest that you send an email to yourself and see if it shows up in the inbox folder. Make sure you've set your MX records.

@vivek779
Copy link
Author

ok could you please tell me the path where mx records are created for this server so that i can set this on my domain
nope front end wont work it showing interface at 2905 port bt links are not working

@schahriar
Copy link
Owner

Galleon automatically listens to port 25 of your IP address. All you need to do is to put Mail Exchange (MX) records in your DNS. The easiest way of doing this on a server that is not a mail provider (as in you are not using the server to serve multiple domains' email addresses) is to set an A record like so:

A    @    <ip-address>

You can set this record in with your DNS provider (sometimes found under advanced DNS). The type of record is an A record with a name @ and value of your IP address.

An example of this is:

A    @    127.0.0.1

Links normally don't show any indication since all your boxes are empty. Try setting up the A records and test if you can receive and send an email.

@vivek779
Copy link
Author

I added the records following your steps . I tried to send test mail from. from the application it shows successfully send but when i checked my inbox and spam no mails came i tried both domain id as well as gmail id but no mail is received

@schahriar
Copy link
Owner

What driver/database are you using? Try checking the developer console again and see if there are any errors.

Alternatively try http://FQDN:3080/ after you login and see if it returns results.

@schahriar
Copy link
Owner

Try this link for SMTP diagnostics. Your instance of Galleon seems to be working and receiving emails. (for mac.bakemoon.net url your setup may be wrong as your subdomain (mac) is not pointing to the main domain this means emails are received for anything@mac.bakemoon.net) I suggest that you check here http://mac.bakemoon.net:2095/GETAPIURL again since it's not showing the correct format http://mac.bakemoon.net:3080. It is most likely an issue with Seascape.

Although you still want to check your database manually if possible to check whether the emails were recorded or try cding to '~/.galleon` and see if the emails are stored in the raw folder.

@vivek779
Copy link
Author

You are right it is showing {"url":"http://localhost:3080/"} instead of http://mac.bakemoon.net:3080 so what should i do to solve this issue of seascape . Let put aside galleon mail delivery .
I was impress with galleon server along with seascape as it shows it is fast with user management also your seascape interface is also nice
I want to test how it is doing it so please fix the issue of seascape and give me chance to use it

@schahriar
Copy link
Owner

I believe this issue is fixable with a few improvements to modules. Might have suggested this before but give this another try and see if it works:

galleon config seascape api "http://mac.bakemoon.net:3080"
galleon restart

I'll make a bunch of improvements and commits over the weekend and publish it to npm under 4.0.1. I am currently running Seascape behind NGINX and haven't had much issues with it so I would recommend that you give that a try until I make some improvements to Galleon modules (especially Seascape).

Glad to hear that you like Galleon. I would be happy to help you resolve this issue with Seascape. My goal is to make email handling as easy as possible so I appreciate reports of these bugs to make sure that usage of Galleon is smoother for upcoming users.

References:
NGINX Server Blocks
Seascape NGINX Sites-available config source

@schahriar
Copy link
Owner

I've made a bunch of changes (#10, #11) and published to NPM as Galleon@0.4.4 and Seascape@2.2.1.

Try removing all your previous config before reinstalling:

rm -rf ~/.galleon
npm remove -g galleon galleon-seascape

And

npm install -g galleon@0.4.4
galleon install seascape
galleon setup
authbind --deep galleon start
galleon config seascape api "http://FQDN:3080/"
galleon restart

And check http://FQDN:2095/GETAPIURL, you should see http://FQDN:3080/.

Note that you can reconfigure in real-time:

galleon config seascape port "9084"

Seascape would re-launch on port 9084 without the need for galleon restart. Same thing applies to API url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants