Appcelerator Titanium build error about log-server-port masks the real error - appcelerator-titanium

This is relatively minor, and I wasn't able to find any other record of this issue, but it cost me several stressful hours. I'm considering opening an Appcelerator Jira ticket about this bug, so any feed back is welcome before I do so. Questions: Are there any other workarounds besides what I wrote below? What are some better ways to log the actual error?
Environment
Titanium SDK: 7.0.2.GA
Javascript Engine: V8
Platform & version: iOS 11.2
Device Details: iOS simulator (iPhone 7+)
Host Operating System: OS X 10.13 64 bit
Node Version: 7.10.0
Titanium CLI: 5.0.14
Npm Version: 4.2.0
Description
When building an iOS app and there is an issue connecting to the iOS log-server, it always output "Another process is currently bound to port xxxxx" even if there is another server connection issue such as the port not existing.
Workaround
Figure out the real issue by logging the actual error within the sdk itself (at ~/Library/Application Support/Titanium/mobilesdk/osx/7.0.2.GA/iphone/cli/commands/_build.js in the determineLogServerPort function).
Steps to Reproduce
Create a different type of error with the server. For example, my /etc/hosts file did not have an entry for 127.0.0.1 localhost, so the actual node error was 'ENOTFOUND'.
Create a new titanium app with appc ti new.
Build with appc ti build -p ios
Actual Result
Build errors out with following text:
[ERROR] Another process is currently bound to port 27973
[ERROR] Set a unique <log-server-port> between 1024 and 65535 in the <ios> section of the tiapp.xml
Expected Result
More detailed error. I.E. Something like:
Failed to create/connect to log server port with error "[error given by node net package]".
Followed by suggested solution. For example if the node error was EADDRINUSE, then you could still use the existing error message. But if it's another error, log accordingly so the user has the best information for solving the issue.

Close current emulator running and try again
when emulator was opened by xcode, I got such issue

Please make sure you are executing the app with same App name and ID.
If there is a change, please delete the app from device and retake the build.

I opened the ticket with appcelerator here: https://jira.appcelerator.org/browse/TIMOB-25872
They have just marked it as closed so it will hopefully be included in the next sdk version.

The solution for me was what was mentioned as a solution in the JIRA ticket on appcelerator https://jira.appcelerator.org/browse/TIMOB-25872.
I had recently moved to a new Mac and migrated everything, it created a copy of my host file renaming it but didn't update main one so it had no reference to the localhost in there. Once this was fixed it was building no problem again.
Below is what is in the host file.
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
Hope that helps someone, didn't see the answer on JIRA at first glance.

Related

Django app on Windows Server 2012 - HTTP Error 500.0 - The FastCGI process exited unexpectedly

I setup a django "hello world" app IIS (Windows Server 2012). The application is run successfully using the Django web server. However, when I tried to install in on IIS (following the instructions provided here) I get an HTTP 500 error with the message "python.exe - The FastCGI process exited unexpectedly".
I have seen numerous related posts on stackoverflow, but nothing seems to work for me. Based on the guidance
I have checked file permissions on both the app and virtual environment folder but they in my opinion this should not be the issue as the users IUSR and IIS_IUSRS can Read & execute, Read and List folder contents.
I have tried also to run wfastcgi-enable based on the instructions provided by this post but I get the error "ensure your user has sufficient privileges and try again". Please note that I tried running it both from an "elevated" command line and also power shell with no results.
I have reinstalled python to make sure it is installed for "all users" (as suggested by this post) but I get an error "0x80070659 - This installation is forbidden by system policy".
I looked in the Event viewer but I could not find something useful.
My questions:
Is there a specific log that I should check? How could I find it?
My django app does not have a web.config file. Should I create one?
My setup: Windows Server 2012 R2, IIS 8.5, Python 3.9.1

Get err_connection_refused accessing django running on wsl2 from Windows but can curl from Windows terminal

I got the err_connection_refused when trying to accessing django running on wsl2 (http://localhost:8000) from Windows but when I use curl http://localhost:8000 from Windows terminal bash, it's working fine. I have tried to add a new firewall inbound rule for port 8000 but it's still not working. Is there anything else I need to take care of.
Thanks a lot
Seems like a forwarding problem. WSL2's interface is NAT'd, whereas WSL1 was bridged by default. WSL seems to do some "auto-forwarding" of ports, but only on localhost. However, sometimes this auto-forwarding mechanism seems to "break down". The main culprit seems to be hibernation or Windows Fast Startup (which are both closely-related features).
Does the problem resolve if you do a wsl --shutdown and then restart the WSL2 session? If so, try disabling Windows' Fast Startup. I already had Fast Startup disabled due to a different (non-WSL issue) on my system, so that could be related to why I am not able to reproduce.
Along the same lines, do you Hibernate instead of powering off? In that case, a wsl --shutdown might resolve as well.
For future readers, note that the above two points seem to resolve the issue for most people who have upvoted and responded in the comments. However, if that does not work for you, the following were my original "additional suggestions":
For some additional ideas, see this github issue. There are some suggestions on services that might be needed. (Side question - Are you running Windows Home or Professional?)
Is there any chance that your Windows hosts file (e.g. c:\windows\system32\drivers\etc\hosts) points localhost to an IP other than 127.0.0.1? If I attempt to access via my local Windows IP address, rather than 127.0.0.1 or localhost, I get an ERR_CONNECTION_REFUSED as well.
Since you were looking at the firewall rules, maybe look at a forwarding rule instead of just an inbound allow?
If all else fails, try exporting/backing up the WSL2 session (see wsl --export), then import it in as a new WSL1 session. See if it works there.
On my WSL2/Ubuntu 20.04 system, I attempted to reproduce (but haven't been able to yet) with the following steps:
mkdir -p ~/src/dj-test
cd ~/src/dj-test
python3 -m venv dj
source dj/bin/activate
pip install Django
django-admin startproject config .
python manage.py runserver
(although I used activate.fish since I'm running the fish shell)
From Vivaldi web browser in Windows, accessed localhost:8000, which returned "The install worked successfully! Congratulations! ..."
curl under Powershell Core worked as well.

Localhost Coldfusion install showing cfquery parameters on page (Not speaking with ODBC)

Goal:
Run cfquery of remote server on local Coldfusion install.
Problem/Symptoms:
The cfquery parameters are printing onto the screen, instead of running query on remote.Example of cfquery parameter printout on screen
Facts:
Running Mac OS X Mojave (10.14.3).
Coldfusion is installed. I can access the CF Admin panel at http://localhost:8500/CFIDE/administrator/index.cfm
Data Source is installed in Coldfusion Admin and status is "OK"
Using Mamp Pro 5.3. It's running -- can start and stop Apache.
Apache is running on port 80
Updated ODBC Actual SQL Server drivers (Version 4.2.0 from ActualTech). Tested connection to server with driver and it is working.
Remote database is using port 1433
I'm sure there are more questions to answer, but hopefully that's a decent start. What am I doing wrong?
Update: 3/17/2019
Feeling stuck here. I've uninstalled and reinstalled CF2018 and MAMP Pro. I've used the wsconfig applet for Adobe Coldfusion (ACF) as described by Brian Lang and I've also tried the manual approach as described by Adobe.
Update: 4/19/2019
I may have figured this out, now that there is a release of Mac OS 10.14.4. Going to test it on another computer to confirm that the process works and that I have all the steps documented, then will share answers.
The solution to this problem had to do with a conflict with Mac OS X and Coldfusion/Apache. Because Mac OS X 10.14.4 fixed the "mod_jk" file that was conflicting with Apache, Coldfusion 2018 can now run on Mac OS X.
In order to solve the problem, I needed to:
upgrade Mac OS X to 10.14.4
stop all other servers
install Coldfusion 2018
set up Coldfusion Apache Connector
set up local virtual host
I confirmed that it worked on another computer, and have documented detailed instructions in this post: https://www.steckinsights.com/configuring-coldfusion-2018-with-apache-on-mac-os-x-mojave/
Fair warning: I think that the mod_jk issue in Mac OS 10.14.3 and prior was the issue, but there were so many different aspects I tested in the process, that there may be unique issues related to your particular computer's configuration. I hope hope this helps anyone out there having issues.

We couldn't find a server running on this port – are you sure there is a server running? Ruby on Rails at Nitrous.IO

Hi I am complete new to web technologies. I am learning Ruby on rails right now. I am using service from www.nitrous.io. The problem is when I tried to view my work I always get following error:
We couldn't find a server running on this port – are you sure there is
a server running? Make sure to bind your server to host 0.0.0.0
(instead of localhost/127.0.0.1).
Please refer to this support article for more details.
I tried all the ports 3000, 4000, 8080 and it still didn't worked. If some expert can pin point the problem it would be great.
try this command:
rails s -b 0.0.0.0
This might seem obvious, but just in case: you need to actually start your Rails server in the Nitrous console before you hit the preview tab. Type:
rails s
You can have multiple consoles open (just click the + tab), so you'll often have the server running in one console and the other open for typing commands.
I highly recommend you carefully follow this guide through to get up and running. Read it all and read it again if you're not sure what you did. Good luck!
http://guides.rubyonrails.org/getting_started.html
Just use rails s -b 0.0.0.0 and ensure you are in the application directory when tuning Rails.

PyCharm and Django Shell Networking

(My Python is installed via Homebrew and correctly refered to by the preferences as my project interpreter)
I have a problem with PyCharms Django Shell. If I start the django shell, it runs the command (ports are changing):
/usr/local/Cellar/python/2.7.3/bin/python2.7 -u /Applications/PyCharm.app/helpers/pydev/pydevconsole.py 52135 52136
Now, this wont work, it justs states "PyDev Console: starting" and after a while, it stops.
BUT when I'm disabling my Wifi, it works! Now, what could this be?
(I'm running the latest Mountain Lion OSX, firewall disabled, PyCharm 2.5.2, Django 1.4)
It looks like the problem is related to Mac OS DNS resolution specifics. While trying to resolve this problem with #ruffy, what fixed it was changing the LAN DNS server to Google (8.8.8.8).
I've logged this issue in PyCharm tracker so that we can provide a workaround for it in the future updates.
Related topics:
Mac OSX Lion DNS lookup order
Mac OS X Lion, /etc/hosts Bugs, and DNS Resolution
I had this problem too, but this was caused because my hostname was 'localhost'.
Once I changed my hostname to something else (from the sharing section in Preferences) - it worked like a (Py)Charm.
The problem was somewhere in pydev-console, and I don't know why my solution worked - I only guessed it was the problem because originally the console worked, and then it didn't and the only thing had changed was my hostname (due to some fiddling at work)
start terminal
nano /Applications/PyCharm.app/helpers/pydev/pydevconsole.py
after line 160 add:
160 def process_exec_queue(interpreter):
+ 161 print 'here'
162 while 1:
163 # etcetera
save and run shell again, does it show the print message? If it does, move it into the while loop and repeat the process until you've narrowed down the problem